From b2a4f4f9beba50b959b990c218ceee607ba94fb4 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Wed, 2 Aug 2023 19:15:08 -0700 Subject: [PATCH 1/6] Init push --- sdk/applicationinsights/ci.yml | 10 - sdk/operationalinsights/ci.yml | 11 - ...anager.RecoveryServicesDataReplication.sln | 65 ++ .../CHANGELOG.md | 17 + .../Directory.Build.props | 6 + .../README.md | 80 ++ .../assets.json | 6 + ...veryServicesDataReplication.Samples.csproj | 10 + .../samples/autorest.tests.md | 13 + ...ger.RecoveryServicesDataReplication.csproj | 8 + ...veryServicesDataReplicationModelFactory.cs | 911 +++++++++++++++ .../src/Generated/DraModelCollection.cs | 340 ++++++ .../src/Generated/DraModelData.cs | 51 + .../src/Generated/DraModelResource.cs | 661 +++++++++++ .../EmailConfigurationModelCollection.cs | 340 ++++++ .../Generated/EmailConfigurationModelData.cs | 51 + .../EmailConfigurationModelResource.cs | 518 +++++++++ .../src/Generated/EventModelCollection.cs | 262 +++++ .../src/Generated/EventModelData.cs | 51 + .../src/Generated/EventModelResource.cs | 153 +++ ...coveryServicesDataReplicationExtensions.cs | 539 +++++++++ .../ResourceGroupResourceExtensionClient.cs | 124 ++ .../SubscriptionResourceExtensionClient.cs | 210 ++++ .../src/Generated/FabricModelCollection.cs | 343 ++++++ .../src/Generated/FabricModelData.cs | 49 + .../src/Generated/FabricModelResource.cs | 737 ++++++++++++ .../DraModelOperationSource.cs | 40 + .../FabricModelOperationSource.cs | 40 + .../PlannedFailoverModelOperationSource.cs | 31 + .../PolicyModelOperationSource.cs | 40 + .../ProtectedItemModelOperationSource.cs | 40 + ...veryServicesDataReplicationArmOperation.cs | 70 ++ ...yServicesDataReplicationArmOperationOfT.cs | 76 ++ ...eplicationExtensionModelOperationSource.cs | 40 + .../VaultModelOperationSource.cs | 40 + ...StackHCIClusterProperties.Serialization.cs | 76 ++ .../Models/AzStackHCIClusterProperties.cs | 59 + ...IDraModelCustomProperties.Serialization.cs | 41 + .../AzStackHCIDraModelCustomProperties.cs | 26 + ...bricModelCustomProperties.Serialization.cs | 104 ++ .../AzStackHCIFabricModelCustomProperties.cs | 71 ++ ...heckNameAvailabilityModel.Serialization.cs | 31 + .../Models/CheckNameAvailabilityModel.cs | 23 + ...AvailabilityResponseModel.Serialization.cs | 49 + .../CheckNameAvailabilityResponseModel.cs | 36 + .../DeploymentPreflightModel.Serialization.cs | 59 + .../Models/DeploymentPreflightModel.cs | 32 + ...ploymentPreflightResource.Serialization.cs | 81 ++ .../Models/DeploymentPreflightResource.cs | 42 + .../DraModelCollection.Serialization.cs | 50 + .../Generated/Models/DraModelCollection.cs | 37 + .../DraModelCustomProperties.Serialization.cs | 41 + .../Models/DraModelCustomProperties.cs | 32 + .../Models/DraModelData.Serialization.cs | 98 ++ .../DraModelProperties.Serialization.cs | 132 +++ .../Generated/Models/DraModelProperties.cs | 102 ++ ...figurationModelCollection.Serialization.cs | 50 + .../EmailConfigurationModelCollection.cs | 37 + ...ailConfigurationModelData.Serialization.cs | 98 ++ ...figurationModelProperties.Serialization.cs | 78 ++ .../EmailConfigurationModelProperties.cs | 42 + .../Models/ErrorModel.Serialization.cs | 74 ++ .../src/Generated/Models/ErrorModel.cs | 54 + .../EventModelCollection.Serialization.cs | 50 + .../Generated/Models/EventModelCollection.cs | 37 + ...ventModelCustomProperties.Serialization.cs | 30 + .../Models/EventModelCustomProperties.cs | 32 + .../Models/EventModelData.Serialization.cs | 79 ++ .../EventModelProperties.Serialization.cs | 102 ++ .../Generated/Models/EventModelProperties.cs | 86 ++ .../FabricModelCollection.Serialization.cs | 50 + .../Generated/Models/FabricModelCollection.cs | 37 + ...bricModelCustomProperties.Serialization.cs | 41 + .../Models/FabricModelCustomProperties.cs | 32 + .../Models/FabricModelData.Serialization.cs | 106 ++ .../Models/FabricModelPatch.Serialization.cs | 37 + .../src/Generated/Models/FabricModelPatch.cs | 28 + .../FabricModelProperties.Serialization.cs | 89 ++ .../Generated/Models/FabricModelProperties.cs | 70 ++ .../src/Generated/Models/FabricType.cs | 66 ++ ...erProtectedItemProperties.Serialization.cs | 74 ++ .../Models/FailoverProtectedItemProperties.cs | 54 + ...flowModelCustomProperties.Serialization.cs | 64 ++ .../FailoverWorkflowModelCustomProperties.cs | 36 + .../Models/HealthErrorModel.Serialization.cs | 139 +++ .../src/Generated/Models/HealthErrorModel.cs | 94 ++ .../src/Generated/Models/HealthStatus.cs | 54 + ...eDraModelCustomProperties.Serialization.cs | 41 + .../HyperVMigrateDraModelCustomProperties.cs | 26 + ...bricModelCustomProperties.Serialization.cs | 80 ++ ...yperVMigrateFabricModelCustomProperties.cs | 58 + ...perVToAzStackHCIDiskInput.Serialization.cs | 91 ++ .../Models/HyperVToAzStackHCIDiskInput.cs | 69 ++ ...ventModelCustomProperties.Serialization.cs | 63 ++ ...VToAzStackHCIEventModelCustomProperties.cs | 51 + ...yperVToAzStackHCINicInput.Serialization.cs | 71 ++ .../Models/HyperVToAzStackHCINicInput.cs | 60 + ...overModelCustomProperties.Serialization.cs | 49 + ...HCIPlannedFailoverModelCustomProperties.cs | 33 + ...licyModelCustomProperties.Serialization.cs | 65 ++ ...ToAzStackHCIPolicyModelCustomProperties.cs | 54 + ...CIProtectedDiskProperties.Serialization.cs | 105 ++ ...perVToAzStackHCIProtectedDiskProperties.cs | 74 ++ ...ItemModelCustomProperties.Serialization.cs | 418 +++++++ ...ckHCIProtectedItemModelCustomProperties.cs | 240 ++++ ...HCIProtectedNicProperties.Serialization.cs | 67 ++ ...yperVToAzStackHCIProtectedNicProperties.cs | 48 + ...ointModelCustomProperties.Serialization.cs | 49 + ...ckHCIRecoveryPointModelCustomProperties.cs | 35 + ...sionModelCustomProperties.Serialization.cs | 164 +++ ...plicationExtensionModelCustomProperties.cs | 102 ++ .../Models/IdentityModel.Serialization.cs | 74 ++ .../src/Generated/Models/IdentityModel.cs | 54 + .../InnerHealthErrorModel.Serialization.cs | 102 ++ .../Generated/Models/InnerHealthErrorModel.cs | 70 ++ .../Models/OperationStatus.Serialization.cs | 57 + .../src/Generated/Models/OperationStatus.cs | 50 + .../PlannedFailoverModel.Serialization.cs | 41 + .../Generated/Models/PlannedFailoverModel.cs | 39 + ...overModelCustomProperties.Serialization.cs | 40 + .../PlannedFailoverModelCustomProperties.cs | 32 + ...edFailoverModelProperties.Serialization.cs | 41 + .../Models/PlannedFailoverModelProperties.cs | 37 + .../PolicyModelCollection.Serialization.cs | 50 + .../Generated/Models/PolicyModelCollection.cs | 37 + ...licyModelCustomProperties.Serialization.cs | 40 + .../Models/PolicyModelCustomProperties.cs | 32 + .../Models/PolicyModelData.Serialization.cs | 98 ++ .../PolicyModelProperties.Serialization.cs | 51 + .../Generated/Models/PolicyModelProperties.cs | 52 + .../Models/ProtectedItemActiveLocation.cs | 51 + ...edItemDynamicMemoryConfig.Serialization.cs | 57 + .../ProtectedItemDynamicMemoryConfig.cs | 31 + ...rotectedItemJobProperties.Serialization.cs | 78 ++ .../Models/ProtectedItemJobProperties.cs | 54 + ...tectedItemModelCollection.Serialization.cs | 50 + .../Models/ProtectedItemModelCollection.cs | 37 + ...ItemModelCustomProperties.Serialization.cs | 40 + .../ProtectedItemModelCustomProperties.cs | 32 + .../ProtectedItemModelData.Serialization.cs | 98 ++ ...tectedItemModelProperties.Serialization.cs | 285 +++++ .../Models/ProtectedItemModelProperties.cs | 169 +++ ...ModelPropertiesCurrentJob.Serialization.cs | 78 ++ .../ProtectedItemModelPropertiesCurrentJob.cs | 32 + ...FailedEnableProtectionJob.Serialization.cs | 78 ++ ...PropertiesLastFailedEnableProtectionJob.cs | 32 + ...tFailedPlannedFailoverJob.Serialization.cs | 78 ++ ...lPropertiesLastFailedPlannedFailoverJob.cs | 32 + ...ertiesLastTestFailoverJob.Serialization.cs | 78 ++ ...dItemModelPropertiesLastTestFailoverJob.cs | 32 + .../src/Generated/Models/ProtectionState.cs | 201 ++++ .../src/Generated/Models/ProvisioningState.cs | 66 ++ ...overyPointModelCollection.Serialization.cs | 50 + .../Models/RecoveryPointModelCollection.cs | 37 + ...ointModelCustomProperties.Serialization.cs | 30 + .../RecoveryPointModelCustomProperties.cs | 32 + .../RecoveryPointModelData.Serialization.cs | 79 ++ ...overyPointModelProperties.Serialization.cs | 46 + .../Models/RecoveryPointModelProperties.cs | 45 + .../src/Generated/Models/RecoveryPointType.cs | 51 + ...nExtensionModelCollection.Serialization.cs | 50 + .../ReplicationExtensionModelCollection.cs | 37 + ...sionModelCustomProperties.Serialization.cs | 40 + ...plicationExtensionModelCustomProperties.cs | 32 + ...icationExtensionModelData.Serialization.cs | 98 ++ ...nExtensionModelProperties.Serialization.cs | 51 + .../ReplicationExtensionModelProperties.cs | 52 + .../src/Generated/Models/ReplicationType.cs | 63 ++ .../Generated/Models/ReplicationVaultType.cs | 51 + .../Models/ResynchronizationState.cs | 57 + ...torageContainerProperties.Serialization.cs | 49 + .../Models/StorageContainerProperties.cs | 34 + .../Models/TaskModel.Serialization.cs | 91 ++ .../src/Generated/Models/TaskModel.cs | 60 + ...TaskModelCustomProperties.Serialization.cs | 33 + .../Models/TaskModelCustomProperties.cs | 29 + .../src/Generated/Models/TaskState.cs | 63 ++ ...flowModelCustomProperties.Serialization.cs | 55 + ...verCleanupWorkflowModelCustomProperties.cs | 34 + .../src/Generated/Models/TestFailoverState.cs | 72 ++ ...flowModelCustomProperties.Serialization.cs | 64 ++ ...stFailoverWorkflowModelCustomProperties.cs | 36 + ...nDraModelCustomProperties.Serialization.cs | 41 + .../Models/UnknownDraModelCustomProperties.cs | 20 + ...ventModelCustomProperties.Serialization.cs | 33 + .../UnknownEventModelCustomProperties.cs | 20 + ...bricModelCustomProperties.Serialization.cs | 41 + .../UnknownFabricModelCustomProperties.cs | 20 + ...overModelCustomProperties.Serialization.cs | 41 + ...ownPlannedFailoverModelCustomProperties.cs | 20 + ...licyModelCustomProperties.Serialization.cs | 41 + .../UnknownPolicyModelCustomProperties.cs | 20 + ...ItemModelCustomProperties.Serialization.cs | 41 + ...knownProtectedItemModelCustomProperties.cs | 20 + ...ointModelCustomProperties.Serialization.cs | 33 + ...knownRecoveryPointModelCustomProperties.cs | 20 + ...sionModelCustomProperties.Serialization.cs | 41 + ...plicationExtensionModelCustomProperties.cs | 20 + ...flowModelCustomProperties.Serialization.cs | 49 + .../UnknownWorkflowModelCustomProperties.cs | 23 + ...eDraModelCustomProperties.Serialization.cs | 57 + .../Models/VMwareDraModelCustomProperties.cs | 46 + ...bricModelCustomProperties.Serialization.cs | 57 + ...MwareMigrateFabricModelCustomProperties.cs | 46 + ...wareToAzStackHCIDiskInput.Serialization.cs | 91 ++ .../Models/VMwareToAzStackHCIDiskInput.cs | 69 ++ ...MwareToAzStackHCINicInput.Serialization.cs | 79 ++ .../Models/VMwareToAzStackHCINicInput.cs | 67 ++ ...overModelCustomProperties.Serialization.cs | 49 + ...HCIPlannedFailoverModelCustomProperties.cs | 33 + ...licyModelCustomProperties.Serialization.cs | 65 ++ ...ToAzStackHCIPolicyModelCustomProperties.cs | 54 + ...CIProtectedDiskProperties.Serialization.cs | 105 ++ ...wareToAzStackHCIProtectedDiskProperties.cs | 74 ++ ...ItemModelCustomProperties.Serialization.cs | 493 ++++++++ ...ckHCIProtectedItemModelCustomProperties.cs | 268 +++++ ...HCIProtectedNicProperties.Serialization.cs | 83 ++ ...MwareToAzStackHCIProtectedNicProperties.cs | 56 + ...sionModelCustomProperties.Serialization.cs | 164 +++ ...plicationExtensionModelCustomProperties.cs | 102 ++ .../Models/VMwareToAzureMigrateResyncState.cs | 54 + .../VaultModelCollection.Serialization.cs | 50 + .../Generated/Models/VaultModelCollection.cs | 37 + .../Models/VaultModelData.Serialization.cs | 113 ++ .../Models/VaultModelPatch.Serialization.cs | 37 + .../src/Generated/Models/VaultModelPatch.cs | 28 + .../VaultModelProperties.Serialization.cs | 64 ++ .../Generated/Models/VaultModelProperties.cs | 36 + .../src/Generated/Models/VmNicSelection.cs | 57 + .../Generated/Models/WorkflowDetailsType.cs | 57 + .../WorkflowModelCollection.Serialization.cs | 50 + .../Models/WorkflowModelCollection.cs | 37 + ...flowModelCustomProperties.Serialization.cs | 32 + .../Models/WorkflowModelCustomProperties.cs | 40 + .../Models/WorkflowModelData.Serialization.cs | 79 ++ .../WorkflowModelProperties.Serialization.cs | 174 +++ .../Models/WorkflowModelProperties.cs | 116 ++ .../Generated/Models/WorkflowObjectType.cs | 69 ++ .../src/Generated/Models/WorkflowState.cs | 72 ++ .../src/Generated/PolicyModelCollection.cs | 340 ++++++ .../src/Generated/PolicyModelData.cs | 51 + .../src/Generated/PolicyModelResource.cs | 661 +++++++++++ .../Generated/ProtectedItemModelCollection.cs | 340 ++++++ .../src/Generated/ProtectedItemModelData.cs | 51 + .../Generated/ProtectedItemModelResource.cs | 786 +++++++++++++ .../src/Generated/ProviderConstants.cs | 16 + .../Generated/RecoveryPointModelCollection.cs | 258 +++++ .../src/Generated/RecoveryPointModelData.cs | 51 + .../Generated/RecoveryPointModelResource.cs | 153 +++ .../ReplicationExtensionModelCollection.cs | 340 ++++++ .../ReplicationExtensionModelData.cs | 51 + .../ReplicationExtensionModelResource.cs | 661 +++++++++++ ...overyManagementServiceAPIRestOperations.cs | 208 ++++ .../DraOperationStatusRestOperations.cs | 130 +++ .../RestOperations/DraRestOperations.cs | 443 ++++++++ .../EmailConfigurationRestOperations.cs | 377 +++++++ .../RestOperations/EventRestOperations.cs | 299 +++++ .../FabricOperationsStatusRestOperations.cs | 124 ++ .../RestOperations/FabricRestOperations.cs | 644 +++++++++++ .../PolicyOperationStatusRestOperations.cs | 130 +++ .../RestOperations/PolicyRestOperations.cs | 443 ++++++++ ...tectedItemOperationStatusRestOperations.cs | 130 +++ .../ProtectedItemRestOperations.cs | 535 +++++++++ .../RecoveryPointsRestOperations.cs | 299 +++++ ...nExtensionOperationStatusRestOperations.cs | 130 +++ .../ReplicationExtensionRestOperations.cs | 443 ++++++++ .../VaultOperationStatusRestOperations.cs | 124 ++ .../RestOperations/VaultRestOperations.cs | 644 +++++++++++ .../WorkflowOperationStatusRestOperations.cs | 130 +++ .../RestOperations/WorkflowRestOperations.cs | 299 +++++ .../src/Generated/VaultModelCollection.cs | 343 ++++++ .../src/Generated/VaultModelData.cs | 43 + .../src/Generated/VaultModelResource.cs | 1002 +++++++++++++++++ .../src/Generated/WorkflowModelCollection.cs | 262 +++++ .../src/Generated/WorkflowModelData.cs | 51 + .../src/Generated/WorkflowModelResource.cs | 228 ++++ .../src/Properties/AssemblyInfo.cs | 9 + .../src/autorest.md | 49 + ...coveryServicesDataReplication.Tests.csproj | 5 + ...rvicesDataReplicationManagementTestBase.cs | 43 + ...ataReplicationManagementTestEnvironment.cs | 11 + .../ci.mgmt.yml | 23 + sdk/resourcemanager/ci.mgmt.yml | 4 +- 283 files changed, 30590 insertions(+), 23 deletions(-) delete mode 100644 sdk/applicationinsights/ci.yml delete mode 100644 sdk/operationalinsights/ci.yml create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Directory.Build.props create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/assets.json create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Azure.ResourceManager.RecoveryServicesDataReplication.csproj create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PlannedFailoverModelOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ProtectedItemModelOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperation.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperationOfT.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemActiveLocation.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzureMigrateResyncState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VmNicSelection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowObjectType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProviderConstants.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestBase.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestEnvironment.cs create mode 100644 sdk/recoveryservices-datareplication/ci.mgmt.yml diff --git a/sdk/applicationinsights/ci.yml b/sdk/applicationinsights/ci.yml deleted file mode 100644 index a8f462befe27..000000000000 --- a/sdk/applicationinsights/ci.yml +++ /dev/null @@ -1,10 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. -trigger: none -pr: none - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: applicationinsights - ArtifactName: packages - Artifacts: diff --git a/sdk/operationalinsights/ci.yml b/sdk/operationalinsights/ci.yml deleted file mode 100644 index 670ea5db71e9..000000000000 --- a/sdk/operationalinsights/ci.yml +++ /dev/null @@ -1,11 +0,0 @@ -# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - -trigger: none -pr: none - -extends: - template: /eng/pipelines/templates/stages/archetype-sdk-client.yml - parameters: - ServiceDirectory: operationalinsights - ArtifactName: packages - Artifacts: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln new file mode 100644 index 000000000000..94c36cd5ffbd --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln @@ -0,0 +1,65 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{6AF6D140-2565-4017-9028-35EA2A1EF975}") = "Azure.ResourceManager.RecoveryServicesDataReplication", "src\Azure.ResourceManager.RecoveryServicesDataReplication.csproj", "{E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}" +EndProject +Project("{6AF6D140-2565-4017-9028-35EA2A1EF975}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Tests", "tests\Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj", "{8E18E0C1-6736-4F6B-A42C-D8F5E780F802}" +EndProject +Project("{6AF6D140-2565-4017-9028-35EA2A1EF975}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Samples", "samples\Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj", "{CA06473B-F372-4D6D-B876-19491DE88DA1}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D5B52D32-C0C0-4902-9DCD-B6485EEE5227} + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x64.ActiveCfg = Debug|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x64.Build.0 = Debug|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x86.ActiveCfg = Debug|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x86.Build.0 = Debug|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|Any CPU.Build.0 = Release|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x64.ActiveCfg = Release|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x64.Build.0 = Release|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x86.ActiveCfg = Release|Any CPU + {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x86.Build.0 = Release|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x64.ActiveCfg = Debug|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x64.Build.0 = Debug|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x86.ActiveCfg = Debug|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x86.Build.0 = Debug|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|Any CPU.Build.0 = Release|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x64.ActiveCfg = Release|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x64.Build.0 = Release|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x86.ActiveCfg = Release|Any CPU + {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x86.Build.0 = Release|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x64.ActiveCfg = Debug|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x64.Build.0 = Debug|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x86.ActiveCfg = Debug|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x86.Build.0 = Debug|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|Any CPU.Build.0 = Release|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x64.ActiveCfg = Release|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x64.Build.0 = Release|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x86.ActiveCfg = Release|Any CPU + {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md new file mode 100644 index 000000000000..23f86d1e896e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md @@ -0,0 +1,17 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### General New Features + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). + +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Directory.Build.props b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md new file mode 100644 index 000000000000..24b442c6a37c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure RecoveryServicesDataReplication management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure RecoveryServicesDataReplication management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.RecoveryServicesDataReplication --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://docs.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/assets.json b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/assets.json new file mode 100644 index 000000000000..e72f176676f3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net//Azure.ResourceManager.RecoveryServicesDataReplication", + "Tag": "" +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj new file mode 100644 index 000000000000..c240fb83a566 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md new file mode 100644 index 000000000000..15376defe308 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/autorest.tests.md @@ -0,0 +1,13 @@ +# Generated code configuration + +Run `dotnet build /t:GenerateTests` to generate code. + +# Azure.ResourceManager.RecoveryServicesDataReplication.Tests + +> see https://aka.ms/autorest +``` yaml +require: ../src/autorest.md +include-x-ms-examples-original-file: true +testgen: + sample: true +``` \ No newline at end of file diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Azure.ResourceManager.RecoveryServicesDataReplication.csproj b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Azure.ResourceManager.RecoveryServicesDataReplication.csproj new file mode 100644 index 000000000000..940b8edcae0b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Azure.ResourceManager.RecoveryServicesDataReplication.csproj @@ -0,0 +1,8 @@ + + + 1.0.0-beta.1 + Azure.ResourceManager.RecoveryServicesDataReplication + Azure Resource Manager client SDK for Azure resource provider RecoveryServicesDataReplication. + azure;management;arm;resource manager;recoveryservicesdatareplication + + diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs new file mode 100644 index 000000000000..ed3adf9fe882 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs @@ -0,0 +1,911 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Model factory for models. + public static partial class ArmRecoveryServicesDataReplicationModelFactory + { + /// Initializes a new instance of DraModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Dra model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static DraModelData DraModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DraModelProperties properties = null, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new DraModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of DraModelProperties. + /// Gets or sets the Dra correlation Id. + /// Gets or sets the machine Id where Dra is running. + /// Gets or sets the machine name where Dra is running. + /// Identity model. + /// Identity model. + /// Gets or sets a value indicating whether Dra is responsive. + /// Gets or sets the time when last heartbeat was sent by the Dra. + /// Gets or sets the Dra version. + /// Gets or sets the provisioning state of the Dra. + /// Gets or sets the list of health errors. + /// + /// Dra model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static DraModelProperties DraModelProperties(string correlationId = null, string machineId = null, string machineName = null, IdentityModel authenticationIdentity = null, IdentityModel resourceAccessIdentity = null, bool? isResponsive = null, DateTimeOffset? lastHeartbeat = null, string versionNumber = null, ProvisioningState? provisioningState = null, IEnumerable healthErrors = null, DraModelCustomProperties customProperties = null) + { + healthErrors ??= new List(); + + return new DraModelProperties(correlationId, machineId, machineName, authenticationIdentity, resourceAccessIdentity, isResponsive, lastHeartbeat, versionNumber, provisioningState, healthErrors?.ToList(), customProperties); + } + + /// Initializes a new instance of HealthErrorModel. + /// Gets or sets the type of affected resource type. + /// + /// Gets or sets the list of affected resource correlation Ids. This can be used to + /// uniquely identify the count of items affected by a specific category and severity + /// as well as count of item affected by an specific issue. + /// + /// Gets or sets a list of child health errors associated with this error. + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + /// A new instance for mocking. + public static HealthErrorModel HealthErrorModel(string affectedResourceType = null, IEnumerable affectedResourceCorrelationIds = null, IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) + { + affectedResourceCorrelationIds ??= new List(); + childErrors ??= new List(); + + return new HealthErrorModel(affectedResourceType, affectedResourceCorrelationIds?.ToList(), childErrors?.ToList(), code, healthCategory, category, severity, source, createdOn, isCustomerResolvable, summary, message, causes, recommendation); + } + + /// Initializes a new instance of InnerHealthErrorModel. + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + /// A new instance for mocking. + public static InnerHealthErrorModel InnerHealthErrorModel(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) + { + return new InnerHealthErrorModel(code, healthCategory, category, severity, source, createdOn, isCustomerResolvable, summary, message, causes, recommendation); + } + + /// Initializes a new instance of OperationStatus. + /// Gets or sets the Id. + /// Gets or sets the operation name. + /// + /// Gets or sets the status of the operation. ARM expects the terminal status to be one of + /// Succeeded/ Failed/ Canceled. All other values imply that the operation is still running. + /// + /// Gets or sets the start time. + /// Gets or sets the end time. + /// A new instance for mocking. + public static OperationStatus OperationStatus(string id = null, string name = null, string status = null, string startTime = null, string endTime = null) + { + return new OperationStatus(id, name, status, startTime, endTime); + } + + /// Initializes a new instance of EmailConfigurationModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Email configuration model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static EmailConfigurationModelData EmailConfigurationModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EmailConfigurationModelProperties properties = null, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new EmailConfigurationModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of EventModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Event model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static EventModelData EventModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EventModelProperties properties = null, IReadOnlyDictionary tags = null) + { + tags ??= new Dictionary(); + + return new EventModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of EventModelProperties. + /// Gets or sets the resource type. + /// Gets or sets the resource name. + /// Gets or sets the event type. + /// Gets or sets the event name. + /// Gets or sets the time at which the event occurred at source. + /// Gets or sets the event severity. + /// Gets or sets the event description. + /// Gets or sets the event correlation Id. + /// Gets or sets the errors associated with this event. + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static EventModelProperties EventModelProperties(string resourceType = null, string resourceName = null, string eventType = null, string eventName = null, DateTimeOffset? timeOfOccurrence = null, string severity = null, string description = null, string correlationId = null, IEnumerable healthErrors = null, EventModelCustomProperties customProperties = null) + { + healthErrors ??= new List(); + + return new EventModelProperties(resourceType, resourceName, eventType, eventName, timeOfOccurrence, severity, description, correlationId, healthErrors?.ToList(), customProperties); + } + + /// Initializes a new instance of FabricModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Fabric model properties. + /// A new instance for mocking. + public static FabricModelData FabricModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, FabricModelProperties properties = null) + { + tags ??= new Dictionary(); + + return new FabricModelData(id, name, resourceType, systemData, tags, location, properties); + } + + /// Initializes a new instance of FabricModelProperties. + /// Gets or sets the provisioning state of the fabric. + /// Gets or sets the service endpoint. + /// Gets or sets the service resource Id. + /// Gets or sets the fabric health. + /// Gets or sets the list of health errors. + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static FabricModelProperties FabricModelProperties(ProvisioningState? provisioningState = null, string serviceEndpoint = null, string serviceResourceId = null, HealthStatus? health = null, IEnumerable healthErrors = null, FabricModelCustomProperties customProperties = null) + { + healthErrors ??= new List(); + + return new FabricModelProperties(provisioningState, serviceEndpoint, serviceResourceId, health, healthErrors?.ToList(), customProperties); + } + + /// Initializes a new instance of PolicyModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Policy model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static PolicyModelData PolicyModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PolicyModelProperties properties = null, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new PolicyModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of PolicyModelProperties. + /// Gets or sets the provisioning state of the policy. + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static PolicyModelProperties PolicyModelProperties(ProvisioningState? provisioningState = null, PolicyModelCustomProperties customProperties = null) + { + return new PolicyModelProperties(provisioningState, customProperties); + } + + /// Initializes a new instance of ProtectedItemModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Protected item model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static ProtectedItemModelData ProtectedItemModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProtectedItemModelProperties properties = null, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new ProtectedItemModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of ProtectedItemModelProperties. + /// Gets or sets the policy name. + /// Gets or sets the replication extension name. + /// Gets or sets the protected item correlation Id. + /// Gets or sets the provisioning state of the Dra. + /// Gets or sets the protection state. + /// Gets or sets the protection state description. + /// Gets or sets the test failover state. + /// Gets or sets the Test failover state description. + /// Gets or sets the resynchronization state. + /// Gets or sets the fabric object Id. + /// Gets or sets the fabric object name. + /// Gets or sets the source fabric provider Id. + /// Gets or sets the target fabric provider Id. + /// Gets or sets the fabric Id. + /// Gets or sets the target fabric Id. + /// Gets or sets the DRA Id. + /// Gets or sets the target DRA Id. + /// Gets or sets a value indicating whether resynchronization is required or not. + /// Gets or sets the Last successful planned failover time. + /// Gets or sets the Last successful unplanned failover time. + /// Gets or sets the Last successful test failover time. + /// + /// Gets or sets the allowed scenarios on the protected item. + /// + /// + /// + /// Gets or sets protected item replication health. + /// Gets or sets the list of health errors. + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static ProtectedItemModelProperties ProtectedItemModelProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, ProvisioningState? provisioningState = null, ProtectionState? protectionState = null, string protectionStateDescription = null, TestFailoverState? testFailoverState = null, string testFailoverStateDescription = null, ResynchronizationState? resynchronizationState = null, string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string draId = null, string targetDraId = null, bool? resyncRequired = null, DateTimeOffset? lastSuccessfulPlannedFailoverOn = null, DateTimeOffset? lastSuccessfulUnplannedFailoverOn = null, DateTimeOffset? lastSuccessfulTestFailoverOn = null, ProtectedItemModelPropertiesCurrentJob currentJob = null, IEnumerable allowedJobs = null, ProtectedItemModelPropertiesLastFailedEnableProtectionJob lastFailedEnableProtectionJob = null, ProtectedItemModelPropertiesLastFailedPlannedFailoverJob lastFailedPlannedFailoverJob = null, ProtectedItemModelPropertiesLastTestFailoverJob lastTestFailoverJob = null, HealthStatus? replicationHealth = null, IEnumerable healthErrors = null, ProtectedItemModelCustomProperties customProperties = null) + { + allowedJobs ??= new List(); + healthErrors ??= new List(); + + return new ProtectedItemModelProperties(policyName, replicationExtensionName, correlationId, provisioningState, protectionState, protectionStateDescription, testFailoverState, testFailoverStateDescription, resynchronizationState, fabricObjectId, fabricObjectName, sourceFabricProviderId, targetFabricProviderId, fabricId, targetFabricId, draId, targetDraId, resyncRequired, lastSuccessfulPlannedFailoverOn, lastSuccessfulUnplannedFailoverOn, lastSuccessfulTestFailoverOn, currentJob, allowedJobs?.ToList(), lastFailedEnableProtectionJob, lastFailedPlannedFailoverJob, lastTestFailoverJob, replicationHealth, healthErrors?.ToList(), customProperties); + } + + /// Initializes a new instance of ProtectedItemModelPropertiesCurrentJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + /// A new instance for mocking. + public static ProtectedItemModelPropertiesCurrentJob ProtectedItemModelPropertiesCurrentJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) + { + return new ProtectedItemModelPropertiesCurrentJob(scenarioName, id, name, displayName, state, startOn, endOn); + } + + /// Initializes a new instance of ProtectedItemJobProperties. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + /// A new instance for mocking. + public static ProtectedItemJobProperties ProtectedItemJobProperties(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) + { + return new ProtectedItemJobProperties(scenarioName, id, name, displayName, state, startOn, endOn); + } + + /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedEnableProtectionJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + /// A new instance for mocking. + public static ProtectedItemModelPropertiesLastFailedEnableProtectionJob ProtectedItemModelPropertiesLastFailedEnableProtectionJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) + { + return new ProtectedItemModelPropertiesLastFailedEnableProtectionJob(scenarioName, id, name, displayName, state, startOn, endOn); + } + + /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + /// A new instance for mocking. + public static ProtectedItemModelPropertiesLastFailedPlannedFailoverJob ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) + { + return new ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(scenarioName, id, name, displayName, state, startOn, endOn); + } + + /// Initializes a new instance of ProtectedItemModelPropertiesLastTestFailoverJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + /// A new instance for mocking. + public static ProtectedItemModelPropertiesLastTestFailoverJob ProtectedItemModelPropertiesLastTestFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) + { + return new ProtectedItemModelPropertiesLastTestFailoverJob(scenarioName, id, name, displayName, state, startOn, endOn); + } + + /// Initializes a new instance of RecoveryPointModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Recovery point model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static RecoveryPointModelData RecoveryPointModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RecoveryPointModelProperties properties = null, IReadOnlyDictionary tags = null) + { + tags ??= new Dictionary(); + + return new RecoveryPointModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of RecoveryPointModelProperties. + /// Gets or sets the recovery point time. + /// Gets or sets the recovery point type. + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// is null. + /// A new instance for mocking. + public static RecoveryPointModelProperties RecoveryPointModelProperties(DateTimeOffset recoveryPointOn = default, RecoveryPointType recoveryPointType = default, RecoveryPointModelCustomProperties customProperties = null) + { + if (customProperties == null) + { + throw new ArgumentNullException(nameof(customProperties)); + } + + return new RecoveryPointModelProperties(recoveryPointOn, recoveryPointType, customProperties); + } + + /// Initializes a new instance of ReplicationExtensionModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Replication extension model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static ReplicationExtensionModelData ReplicationExtensionModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationExtensionModelProperties properties = null, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new ReplicationExtensionModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of ReplicationExtensionModelProperties. + /// Gets or sets the provisioning state of the replication extension. + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static ReplicationExtensionModelProperties ReplicationExtensionModelProperties(ProvisioningState? provisioningState = null, ReplicationExtensionModelCustomProperties customProperties = null) + { + return new ReplicationExtensionModelProperties(provisioningState, customProperties); + } + + /// Initializes a new instance of CheckNameAvailabilityResponseModel. + /// Gets or sets a value indicating whether resource name is available or not. + /// Gets or sets the reason for resource name unavailability. + /// Gets or sets the message for resource name unavailability. + /// A new instance for mocking. + public static CheckNameAvailabilityResponseModel CheckNameAvailabilityResponseModel(bool? nameAvailable = null, string reason = null, string message = null) + { + return new CheckNameAvailabilityResponseModel(nameAvailable, reason, message); + } + + /// Initializes a new instance of VaultModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Vault properties. + /// A new instance for mocking. + public static VaultModelData VaultModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, VaultModelProperties properties = null) + { + tags ??= new Dictionary(); + + return new VaultModelData(id, name, resourceType, systemData, tags, location, properties); + } + + /// Initializes a new instance of VaultModelProperties. + /// Gets or sets the provisioning state of the vault. + /// Gets or sets the service resource Id. + /// Gets or sets the type of vault. + /// A new instance for mocking. + public static VaultModelProperties VaultModelProperties(ProvisioningState? provisioningState = null, string serviceResourceId = null, ReplicationVaultType? vaultType = null) + { + return new VaultModelProperties(provisioningState, serviceResourceId, vaultType); + } + + /// Initializes a new instance of WorkflowModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Workflow model properties. + /// Gets or sets the resource tags. + /// A new instance for mocking. + public static WorkflowModelData WorkflowModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkflowModelProperties properties = null, IReadOnlyDictionary tags = null) + { + tags ??= new Dictionary(); + + return new WorkflowModelData(id, name, resourceType, systemData, properties, tags); + } + + /// Initializes a new instance of WorkflowModelProperties. + /// Gets or sets the friendly display name. + /// Gets or sets the workflow state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Gets or sets the affected object Id. + /// Gets or sets the affected object name. + /// Gets or sets the affected object internal Id. + /// Gets or sets the affected object internal name. + /// Gets or sets the object type. + /// Gets or sets the replication provider. + /// Gets or sets the source fabric provider. + /// Gets or sets the target fabric provider. + /// Gets or sets the list of allowed actions on the workflow. + /// Gets or sets the workflow activity id. + /// Gets or sets the list of tasks. + /// Gets or sets the list of errors. + /// + /// Workflow model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static WorkflowModelProperties WorkflowModelProperties(string displayName = null, WorkflowState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, WorkflowObjectType? objectType = null, string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, IEnumerable allowedActions = null, string activityId = null, IEnumerable tasks = null, IEnumerable errors = null, WorkflowModelCustomProperties customProperties = null) + { + allowedActions ??= new List(); + tasks ??= new List(); + errors ??= new List(); + + return new WorkflowModelProperties(displayName, state, startOn, endOn, objectId, objectName, objectInternalId, objectInternalName, objectType, replicationProviderId, sourceFabricProviderId, targetFabricProviderId, allowedActions?.ToList(), activityId, tasks?.ToList(), errors?.ToList(), customProperties); + } + + /// Initializes a new instance of TaskModel. + /// Gets or sets the task name. + /// Gets or sets the task state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Task model custom properties. + /// Gets or sets the list of children workflow models. + /// A new instance for mocking. + public static TaskModel TaskModel(string taskName = null, TaskState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string customInstanceType = null, IEnumerable childrenWorkflows = null) + { + childrenWorkflows ??= new List(); + + return new TaskModel(taskName, state, startOn, endOn, customInstanceType != null ? new TaskModelCustomProperties(customInstanceType) : null, childrenWorkflows?.ToList()); + } + + /// Initializes a new instance of ErrorModel. + /// Gets or sets the error code. + /// Gets or sets the error type. + /// Gets or sets the error severity. + /// Gets or sets the creation time of error. + /// Gets or sets the error message. + /// Gets or sets the possible causes of error. + /// Gets or sets the recommended action to resolve error. + /// A new instance for mocking. + public static ErrorModel ErrorModel(string code = null, string errorModelType = null, string severity = null, DateTimeOffset? createdOn = null, string message = null, string causes = null, string recommendation = null) + { + return new ErrorModel(code, errorModelType, severity, createdOn, message, causes, recommendation); + } + + /// Initializes a new instance of WorkflowModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets any custom properties of the affected object. + /// A new instance for mocking. + public static WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = "Unknown", IReadOnlyDictionary affectedObjectDetails = null) + { + affectedObjectDetails ??= new Dictionary(); + + return new UnknownWorkflowModelCustomProperties(instanceType, affectedObjectDetails); + } + + /// Initializes a new instance of AzStackHCIFabricModelCustomProperties. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the Appliance name. + /// AzStackHCI cluster properties. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the Migration solution ARM Id. + /// Gets or sets the migration hub Uri. + /// A new instance for mocking. + public static AzStackHCIFabricModelCustomProperties AzStackHCIFabricModelCustomProperties(string azStackHciSiteId = null, IEnumerable applianceName = null, AzStackHCIClusterProperties cluster = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, Uri migrationHubUri = null) + { + applianceName ??= new List(); + + return new AzStackHCIFabricModelCustomProperties(FabricType.AzStackHCI, azStackHciSiteId, applianceName?.ToList(), cluster, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); + } + + /// Initializes a new instance of FailoverProtectedItemProperties. + /// Gets or sets the protected item name. + /// Gets or sets the VM name. + /// Gets or sets the test VM name. + /// Gets or sets the recovery point Id. + /// Gets or sets the recovery point time. + /// Gets or sets the network name. + /// Gets or sets the network subnet. + /// A new instance for mocking. + public static FailoverProtectedItemProperties FailoverProtectedItemProperties(string protectedItemName = null, string vmName = null, string testVmName = null, string recoveryPointId = null, DateTimeOffset? recoveryPointOn = null, string networkName = null, string subnet = null) + { + return new FailoverProtectedItemProperties(protectedItemName, vmName, testVmName, recoveryPointId, recoveryPointOn, networkName, subnet); + } + + /// Initializes a new instance of FailoverWorkflowModelCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the failed over protected item details. + /// A new instance for mocking. + public static FailoverWorkflowModelCustomProperties FailoverWorkflowModelCustomProperties(IReadOnlyDictionary affectedObjectDetails = null, IEnumerable protectedItemDetails = null) + { + affectedObjectDetails ??= new Dictionary(); + protectedItemDetails ??= new List(); + + return new FailoverWorkflowModelCustomProperties(WorkflowDetailsType.FailoverWorkflowDetails, affectedObjectDetails, protectedItemDetails?.ToList()); + } + + /// Initializes a new instance of HyperVMigrateFabricModelCustomProperties. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the migration solution ARM Id. + /// Gets or sets the migration hub Uri. + /// A new instance for mocking. + public static HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelCustomProperties(string hyperVSiteId = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, Uri migrationHubUri = null) + { + return new HyperVMigrateFabricModelCustomProperties(FabricType.HyperVMigrate, hyperVSiteId, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); + } + + /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. + /// Gets or sets the friendly name of the source which has raised this health event. + /// Gets or sets the protected item friendly name. + /// Gets or sets the source appliance name. + /// Gets or sets the source target name. + /// Gets or sets the server type. + /// A new instance for mocking. + public static HyperVToAzStackHCIEventModelCustomProperties HyperVToAzStackHCIEventModelCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) + { + return new HyperVToAzStackHCIEventModelCustomProperties(ReplicationType.HyperVToAzStackHCI, eventSourceFriendlyName, protectedItemFriendlyName, sourceApplianceName, targetApplianceName, serverType); + } + + /// Initializes a new instance of HyperVToAzStackHCINicInput. + /// Gets or sets the NIC Id. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// A new instance for mocking. + public static HyperVToAzStackHCINicInput HyperVToAzStackHCINicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default) + { + return new HyperVToAzStackHCINicInput(nicId, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + } + + /// Initializes a new instance of HyperVToAzStackHCIProtectedDiskProperties. + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + /// Gets or sets the disk type. + /// A new instance for mocking. + public static HyperVToAzStackHCIProtectedDiskProperties HyperVToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null) + { + return new HyperVToAzStackHCIProtectedDiskProperties(storageContainerId, storageContainerLocalPath, sourceDiskId, sourceDiskName, seedDiskName, testMigrateDiskName, migrateDiskName, isOSDisk, capacityInBytes, isDynamic, diskType); + } + + /// Initializes a new instance of HyperVToAzStackHCIProtectedItemModelCustomProperties. + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the target VM display name. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the hypervisor generation of the virtual machine. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the Run As account Id. + /// Gets or sets the source DRA name. + /// Gets or sets the target DRA name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// + /// Gets or sets the initial replication progress percentage. This is calculated based on + /// total bytes processed for all disks in the source VM. + /// + /// + /// Gets or sets the resync progress percentage. This is calculated based on total bytes + /// processed for all disks in the source VM. + /// + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the latest timestamp that replication status is updated. + /// A new instance for mocking. + public static HyperVToAzStackHCIProtectedItemModelCustomProperties HyperVToAzStackHCIProtectedItemModelCustomProperties(ProtectedItemActiveLocation? activeLocation = null, string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string fabricDiscoveryMachineId = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string targetVmName = null, string targetResourceGroupId = null, string storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceived = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? resyncProgressPercentage = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, DateTimeOffset? lastReplicationUpdateOn = null) + { + disksToInclude ??= new List(); + nicsToInclude ??= new List(); + protectedDisks ??= new List(); + protectedNics ??= new List(); + + return new HyperVToAzStackHCIProtectedItemModelCustomProperties(ReplicationType.HyperVToAzStackHCI, activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, fabricDiscoveryMachineId, disksToInclude?.ToList(), nicsToInclude?.ToList(), sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, targetVmName, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, osType, osName, firmwareType, targetLocation, customLocationRegion, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, resyncProgressPercentage, protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, lastReplicationUpdateOn); + } + + /// Initializes a new instance of HyperVToAzStackHCIProtectedNicProperties. + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// A new instance for mocking. + public static HyperVToAzStackHCIProtectedNicProperties HyperVToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) + { + return new HyperVToAzStackHCIProtectedNicProperties(nicId, macAddress, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + } + + /// Initializes a new instance of HyperVToAzStackHCIRecoveryPointModelCustomProperties. + /// Gets or sets the list of the disk Ids. + /// A new instance for mocking. + public static HyperVToAzStackHCIRecoveryPointModelCustomProperties HyperVToAzStackHCIRecoveryPointModelCustomProperties(IEnumerable diskIds = null) + { + diskIds ??= new List(); + + return new HyperVToAzStackHCIRecoveryPointModelCustomProperties(ReplicationType.HyperVToAzStackHCI, diskIds?.ToList()); + } + + /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. + /// Gets or sets the ARM Id of the source HyperV fabric. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + /// A new instance for mocking. + public static HyperVToAzStackHCIReplicationExtensionModelCustomProperties HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId = null, string hyperVSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) + { + return new HyperVToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType.HyperVToAzStackHCI, hyperVFabricArmId, hyperVSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); + } + + /// Initializes a new instance of TestFailoverCleanupWorkflowModelCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the test failover cleanup comments. + /// A new instance for mocking. + public static TestFailoverCleanupWorkflowModelCustomProperties TestFailoverCleanupWorkflowModelCustomProperties(IReadOnlyDictionary affectedObjectDetails = null, string comments = null) + { + affectedObjectDetails ??= new Dictionary(); + + return new TestFailoverCleanupWorkflowModelCustomProperties(WorkflowDetailsType.TestFailoverCleanupWorkflowDetails, affectedObjectDetails, comments); + } + + /// Initializes a new instance of TestFailoverWorkflowModelCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the test VM details. + /// A new instance for mocking. + public static TestFailoverWorkflowModelCustomProperties TestFailoverWorkflowModelCustomProperties(IReadOnlyDictionary affectedObjectDetails = null, IEnumerable protectedItemDetails = null) + { + affectedObjectDetails ??= new Dictionary(); + protectedItemDetails ??= new List(); + + return new TestFailoverWorkflowModelCustomProperties(WorkflowDetailsType.TestFailoverWorkflowDetails, affectedObjectDetails, protectedItemDetails?.ToList()); + } + + /// Initializes a new instance of VMwareToAzStackHCINicInput. + /// Gets or sets the NIC Id. + /// Gets or sets the NIC label. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// A new instance for mocking. + public static VMwareToAzStackHCINicInput VMwareToAzStackHCINicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default) + { + return new VMwareToAzStackHCINicInput(nicId, label, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + } + + /// Initializes a new instance of VMwareToAzStackHCIProtectedDiskProperties. + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + /// Gets or sets the disk type. + /// A new instance for mocking. + public static VMwareToAzStackHCIProtectedDiskProperties VMwareToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null) + { + return new VMwareToAzStackHCIProtectedDiskProperties(storageContainerId, storageContainerLocalPath, sourceDiskId, sourceDiskName, seedDiskName, testMigrateDiskName, migrateDiskName, isOSDisk, capacityInBytes, isDynamic, diskType); + } + + /// Initializes a new instance of VMwareToAzStackHCIProtectedItemModelCustomProperties. + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the target VM display name. + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the run as account Id. + /// Gets or sets the source DRA name. + /// Gets or sets the target DRA name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// + /// Gets or sets the initial replication progress percentage. This is calculated based on + /// total bytes processed for all disks in the source VM. + /// + /// Gets or sets the migration progress percentage. + /// Gets or sets the resume progress percentage. + /// + /// Gets or sets the resync progress percentage. This is calculated based on total bytes + /// processed for all disks in the source VM. + /// + /// Gets or sets the resync retry count. + /// Gets or sets a value indicating whether resync is required. + /// Gets or sets the resync state. + /// Gets or sets a value indicating whether auto resync is to be done. + /// Gets or sets the resume retry count. + /// Gets or sets the latest timestamp that replication status is updated. + /// A new instance for mocking. + public static VMwareToAzStackHCIProtectedItemModelCustomProperties VMwareToAzStackHCIProtectedItemModelCustomProperties(ProtectedItemActiveLocation? activeLocation = null, string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string storageContainerId = null, string targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string osType = null, string osName = null, string firmwareType = null, string fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceived = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? migrationProgressPercentage = null, int? resumeProgressPercentage = null, int? resyncProgressPercentage = null, long? resyncRetryCount = null, bool? resyncRequired = null, VMwareToAzureMigrateResyncState? resyncState = null, bool? performAutoResync = null, long? resumeRetryCount = null, DateTimeOffset? lastReplicationUpdateOn = null) + { + disksToInclude ??= new List(); + nicsToInclude ??= new List(); + protectedDisks ??= new List(); + protectedNics ??= new List(); + + return new VMwareToAzStackHCIProtectedItemModelCustomProperties(ReplicationType.VMwareToAzStackHCI, activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, storageContainerId, targetResourceGroupId, targetLocation, customLocationRegion, disksToInclude?.ToList(), nicsToInclude?.ToList(), protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, targetVmName, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, osType, osName, firmwareType, fabricDiscoveryMachineId, sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, migrationProgressPercentage, resumeProgressPercentage, resyncProgressPercentage, resyncRetryCount, resyncRequired, resyncState, performAutoResync, resumeRetryCount, lastReplicationUpdateOn); + } + + /// Initializes a new instance of VMwareToAzStackHCIProtectedNicProperties. + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the NIC label. + /// Gets or sets a value indicating whether this is the primary NIC. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// A new instance for mocking. + public static VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) + { + return new VMwareToAzStackHCIProtectedNicProperties(nicId, macAddress, label, isPrimaryNic, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + } + + /// Initializes a new instance of VMwareToAzStackHCIReplicationExtensionModelCustomProperties. + /// Gets or sets the ARM Id of the source VMware fabric. + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + /// A new instance for mocking. + public static VMwareToAzStackHCIReplicationExtensionModelCustomProperties VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId = null, string vmwareSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) + { + return new VMwareToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType.VMwareToAzStackHCI, vmwareFabricArmId, vmwareSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs new file mode 100644 index 000000000000..8bacd0130e23 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDraModels method from an instance of . + /// + public partial class DraModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _draModelDraClientDiagnostics; + private readonly DraRestOperations _draModelDraRestClient; + + /// Initializes a new instance of the class for mocking. + protected DraModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DraModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _draModelDraClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DraModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DraModelResource.ResourceType, out string draModelDraApiVersion); + _draModelDraRestClient = new DraRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, draModelDraApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != FabricModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FabricModelResource.ResourceType), nameof(id)); + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Dra name. + /// Dra model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string draName, DraModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Dra name. + /// Dra model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string draName, DraModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// Dra name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Get"); + scope.Start(); + try + { + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// Dra name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Get"); + scope.Start(); + try + { + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of fabric agents in the given fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents + /// + /// + /// Operation Id + /// Dra_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of fabric agents in the given fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents + /// + /// + /// Operation Id + /// Dra_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// Dra name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Exists"); + scope.Start(); + try + { + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// Dra name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Exists"); + scope.Start(); + try + { + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs new file mode 100644 index 000000000000..ef5d0156e47f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DraModel data model. + /// Dra model. + /// + public partial class DraModelData : ResourceData + { + /// Initializes a new instance of DraModelData. + /// Dra model properties. + /// is null. + public DraModelData(DraModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DraModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Dra model properties. + /// Gets or sets the resource tags. + internal DraModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DraModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Dra model properties. + public DraModelProperties Properties { get; set; } + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs new file mode 100644 index 000000000000..717802ce7ebf --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs @@ -0,0 +1,661 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DraModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDraModelResource method. + /// Otherwise you can get one from its parent resource using the GetDraModel method. + /// + public partial class DraModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string draName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _draModelDraClientDiagnostics; + private readonly DraRestOperations _draModelDraRestClient; + private readonly ClientDiagnostics _draOperationStatusClientDiagnostics; + private readonly DraOperationStatusRestOperations _draOperationStatusRestClient; + private readonly DraModelData _data; + + /// Initializes a new instance of the class for mocking. + protected DraModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DraModelResource(ArmClient client, DraModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DraModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _draModelDraClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string draModelDraApiVersion); + _draModelDraRestClient = new DraRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, draModelDraApiVersion); + _draOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _draOperationStatusRestClient = new DraOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationFabrics/fabricAgents"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DraModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Get"); + scope.Start(); + try + { + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Get"); + scope.Start(); + try + { + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Delete"); + scope.Start(); + try + { + var response = await _draModelDraRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Delete"); + scope.Start(); + try + { + var response = _draModelDraRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Dra model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DraModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Update"); + scope.Start(); + try + { + var response = await _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Dra model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DraModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Update"); + scope.Start(); + try + { + var response = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName}/operations/{operationId} + /// + /// + /// Operation Id + /// DraOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetDraOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _draOperationStatusClientDiagnostics.CreateScope("DraModelResource.GetDraOperationStatu"); + scope.Start(); + try + { + var response = await _draOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName}/operations/{operationId} + /// + /// + /// Operation Id + /// DraOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetDraOperationStatu(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _draOperationStatusClientDiagnostics.CreateScope("DraModelResource.GetDraOperationStatu"); + scope.Start(); + try + { + var response = _draOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags[key] = value; + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.Remove(key); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs new file mode 100644 index 000000000000..c215e3c6e335 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEmailConfigurationModels method from an instance of . + /// + public partial class EmailConfigurationModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _emailConfigurationModelEmailConfigurationClientDiagnostics; + private readonly EmailConfigurationRestOperations _emailConfigurationModelEmailConfigurationRestClient; + + /// Initializes a new instance of the class for mocking. + protected EmailConfigurationModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal EmailConfigurationModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _emailConfigurationModelEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", EmailConfigurationModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EmailConfigurationModelResource.ResourceType, out string emailConfigurationModelEmailConfigurationApiVersion); + _emailConfigurationModelEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, emailConfigurationModelEmailConfigurationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != VaultModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _emailConfigurationModelEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _emailConfigurationModelEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// Email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Get"); + scope.Start(); + try + { + var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// Email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Get"); + scope.Start(); + try + { + var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of alert configuration settings for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings + /// + /// + /// Operation Id + /// EmailConfiguration_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of alert configuration settings for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings + /// + /// + /// Operation Id + /// EmailConfiguration_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// Email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Exists"); + scope.Start(); + try + { + var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// Email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Exists"); + scope.Start(); + try + { + var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs new file mode 100644 index 000000000000..79dbbb0d5b21 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the EmailConfigurationModel data model. + /// Email configuration model. + /// + public partial class EmailConfigurationModelData : ResourceData + { + /// Initializes a new instance of EmailConfigurationModelData. + /// Email configuration model properties. + /// is null. + public EmailConfigurationModelData(EmailConfigurationModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of EmailConfigurationModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Email configuration model properties. + /// Gets or sets the resource tags. + internal EmailConfigurationModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EmailConfigurationModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Email configuration model properties. + public EmailConfigurationModelProperties Properties { get; set; } + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs new file mode 100644 index 000000000000..6fabaa51c587 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing an EmailConfigurationModel along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEmailConfigurationModelResource method. + /// Otherwise you can get one from its parent resource using the GetEmailConfigurationModel method. + /// + public partial class EmailConfigurationModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _emailConfigurationModelEmailConfigurationClientDiagnostics; + private readonly EmailConfigurationRestOperations _emailConfigurationModelEmailConfigurationRestClient; + private readonly EmailConfigurationModelData _data; + + /// Initializes a new instance of the class for mocking. + protected EmailConfigurationModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EmailConfigurationModelResource(ArmClient client, EmailConfigurationModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal EmailConfigurationModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _emailConfigurationModelEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string emailConfigurationModelEmailConfigurationApiVersion); + _emailConfigurationModelEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, emailConfigurationModelEmailConfigurationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/alertSettings"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual EmailConfigurationModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Get"); + scope.Start(); + try + { + var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Get"); + scope.Start(); + try + { + var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Update"); + scope.Start(); + try + { + var response = await _emailConfigurationModelEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Update"); + scope.Start(); + try + { + var response = _emailConfigurationModelEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags[key] = value; + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.Remove(key); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs new file mode 100644 index 000000000000..b0c97b5c3472 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEventModels method from an instance of . + /// + public partial class EventModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _eventModelEventClientDiagnostics; + private readonly EventRestOperations _eventModelEventRestClient; + + /// Initializes a new instance of the class for mocking. + protected EventModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal EventModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _eventModelEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", EventModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EventModelResource.ResourceType, out string eventModelEventApiVersion); + _eventModelEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, eventModelEventApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != VaultModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// Event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Get"); + scope.Start(); + try + { + var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// Event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Get"); + scope.Start(); + try + { + var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of events in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events + /// + /// + /// Operation Id + /// Event_List + /// + /// + /// + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of events in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events + /// + /// + /// Operation Id + /// Event_List + /// + /// + /// + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// Event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Exists"); + scope.Start(); + try + { + var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// Event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Exists"); + scope.Start(); + try + { + var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs new file mode 100644 index 000000000000..ae34c01c4c6a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the EventModel data model. + /// Event model. + /// + public partial class EventModelData : ResourceData + { + /// Initializes a new instance of EventModelData. + /// Event model properties. + /// is null. + internal EventModelData(EventModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of EventModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Event model properties. + /// Gets or sets the resource tags. + internal EventModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EventModelProperties properties, IReadOnlyDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Event model properties. + public EventModelProperties Properties { get; } + /// Gets or sets the resource tags. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs new file mode 100644 index 000000000000..9920ed88e4c2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing an EventModel along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEventModelResource method. + /// Otherwise you can get one from its parent resource using the GetEventModel method. + /// + public partial class EventModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string eventName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _eventModelEventClientDiagnostics; + private readonly EventRestOperations _eventModelEventRestClient; + private readonly EventModelData _data; + + /// Initializes a new instance of the class for mocking. + protected EventModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EventModelResource(ArmClient client, EventModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal EventModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _eventModelEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string eventModelEventApiVersion); + _eventModelEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, eventModelEventApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/events"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual EventModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelResource.Get"); + scope.Start(); + try + { + var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelResource.Get"); + scope.Start(); + try + { + var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs new file mode 100644 index 000000000000..ea738c2d5eea --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// A class to add extension methods to Azure.ResourceManager.RecoveryServicesDataReplication. + public static partial class RecoveryServicesDataReplicationExtensions + { + private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource) + { + return resource.GetCachedClient(client => + { + return new ResourceGroupResourceExtensionClient(client, resource.Id); + }); + } + + private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier scope) + { + return client.GetResourceClient(() => + { + return new ResourceGroupResourceExtensionClient(client, scope); + }); + } + + private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmResource resource) + { + return resource.GetCachedClient(client => + { + return new SubscriptionResourceExtensionClient(client, resource.Id); + }); + } + + private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier scope) + { + return client.GetResourceClient(() => + { + return new SubscriptionResourceExtensionClient(client, scope); + }); + } + #region DraModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static DraModelResource GetDraModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + DraModelResource.ValidateResourceId(id); + return new DraModelResource(client, id); + } + ); + } + #endregion + + #region EmailConfigurationModelResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static EmailConfigurationModelResource GetEmailConfigurationModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + EmailConfigurationModelResource.ValidateResourceId(id); + return new EmailConfigurationModelResource(client, id); + } + ); + } + #endregion + + #region EventModelResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static EventModelResource GetEventModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + EventModelResource.ValidateResourceId(id); + return new EventModelResource(client, id); + } + ); + } + #endregion + + #region FabricModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static FabricModelResource GetFabricModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + FabricModelResource.ValidateResourceId(id); + return new FabricModelResource(client, id); + } + ); + } + #endregion + + #region PolicyModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static PolicyModelResource GetPolicyModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + PolicyModelResource.ValidateResourceId(id); + return new PolicyModelResource(client, id); + } + ); + } + #endregion + + #region ProtectedItemModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ProtectedItemModelResource GetProtectedItemModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ProtectedItemModelResource.ValidateResourceId(id); + return new ProtectedItemModelResource(client, id); + } + ); + } + #endregion + + #region RecoveryPointModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static RecoveryPointModelResource GetRecoveryPointModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + RecoveryPointModelResource.ValidateResourceId(id); + return new RecoveryPointModelResource(client, id); + } + ); + } + #endregion + + #region ReplicationExtensionModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static ReplicationExtensionModelResource GetReplicationExtensionModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + ReplicationExtensionModelResource.ValidateResourceId(id); + return new ReplicationExtensionModelResource(client, id); + } + ); + } + #endregion + + #region VaultModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static VaultModelResource GetVaultModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + VaultModelResource.ValidateResourceId(id); + return new VaultModelResource(client, id); + } + ); + } + #endregion + + #region WorkflowModelResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static WorkflowModelResource GetWorkflowModelResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + WorkflowModelResource.ValidateResourceId(id); + return new WorkflowModelResource(client, id); + } + ); + } + #endregion + + /// Gets a collection of FabricModelResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of FabricModelResources and their operations over a FabricModelResource. + public static FabricModelCollection GetFabricModels(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetFabricModels(); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The instance the method will execute against. + /// Fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetFabricModelAsync(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetFabricModels().GetAsync(fabricName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The instance the method will execute against. + /// Fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetFabricModel(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetFabricModels().Get(fabricName, cancellationToken); + } + + /// Gets a collection of VaultModelResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of VaultModelResources and their operations over a VaultModelResource. + public static VaultModelCollection GetVaultModels(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetVaultModels(); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The instance the method will execute against. + /// Vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetVaultModelAsync(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetVaultModels().GetAsync(vaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The instance the method will execute against. + /// Vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetVaultModel(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetVaultModels().Get(vaultName, cancellationToken); + } + + /// + /// Performs resource deployment validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight + /// + /// + /// + /// The instance the method will execute against. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public static async Task> DeploymentPreflightAsync(this ResourceGroupResource resourceGroupResource, string deploymentId, DeploymentPreflightModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + return await GetResourceGroupResourceExtensionClient(resourceGroupResource).DeploymentPreflightAsync(deploymentId, body, cancellationToken).ConfigureAwait(false); + } + + /// + /// Performs resource deployment validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight + /// + /// + /// + /// The instance the method will execute against. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public static Response DeploymentPreflight(this ResourceGroupResource resourceGroupResource, string deploymentId, DeploymentPreflightModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + return GetResourceGroupResourceExtensionClient(resourceGroupResource).DeploymentPreflight(deploymentId, body, cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// Fabric_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetFabricModelsAsync(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFabricModelsAsync(continuationToken, cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// Fabric_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetFabricModels(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFabricModels(continuationToken, cancellationToken); + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability + /// + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + public static async Task> CheckNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + { + return await GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailabilityAsync(location, body, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability + /// + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + public static Response CheckNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailability(location, body, cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// Vault_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetVaultModelsAsync(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVaultModelsAsync(continuationToken, cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// Vault_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetVaultModels(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVaultModels(continuationToken, cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs new file mode 100644 index 000000000000..4b46614f84c1 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// A class to add extension methods to ResourceGroupResource. + internal partial class ResourceGroupResourceExtensionClient : ArmResource + { + private ClientDiagnostics _defaultClientDiagnostics; + private AzureSiteRecoveryManagementServiceAPIRestOperations _defaultRestClient; + + /// Initializes a new instance of the class for mocking. + protected ResourceGroupResourceExtensionClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private AzureSiteRecoveryManagementServiceAPIRestOperations DefaultRestClient => _defaultRestClient ??= new AzureSiteRecoveryManagementServiceAPIRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of FabricModelResources in the ResourceGroupResource. + /// An object representing collection of FabricModelResources and their operations over a FabricModelResource. + public virtual FabricModelCollection GetFabricModels() + { + return GetCachedClient(Client => new FabricModelCollection(Client, Id)); + } + + /// Gets a collection of VaultModelResources in the ResourceGroupResource. + /// An object representing collection of VaultModelResources and their operations over a VaultModelResource. + public virtual VaultModelCollection GetVaultModels() + { + return GetCachedClient(Client => new VaultModelCollection(Client, Id)); + } + + /// + /// Performs resource deployment validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight + /// + /// + /// + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + public virtual async Task> DeploymentPreflightAsync(string deploymentId, DeploymentPreflightModel body = null, CancellationToken cancellationToken = default) + { + using var scope = DefaultClientDiagnostics.CreateScope("ResourceGroupResourceExtensionClient.DeploymentPreflight"); + scope.Start(); + try + { + var response = await DefaultRestClient.DeploymentPreflightAsync(Id.SubscriptionId, Id.ResourceGroupName, deploymentId, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs resource deployment validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight + /// + /// + /// + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + public virtual Response DeploymentPreflight(string deploymentId, DeploymentPreflightModel body = null, CancellationToken cancellationToken = default) + { + using var scope = DefaultClientDiagnostics.CreateScope("ResourceGroupResourceExtensionClient.DeploymentPreflight"); + scope.Start(); + try + { + var response = DefaultRestClient.DeploymentPreflight(Id.SubscriptionId, Id.ResourceGroupName, deploymentId, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs new file mode 100644 index 000000000000..915f202d57e2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// A class to add extension methods to SubscriptionResource. + internal partial class SubscriptionResourceExtensionClient : ArmResource + { + private ClientDiagnostics _fabricModelFabricClientDiagnostics; + private FabricRestOperations _fabricModelFabricRestClient; + private ClientDiagnostics _defaultClientDiagnostics; + private AzureSiteRecoveryManagementServiceAPIRestOperations _defaultRestClient; + private ClientDiagnostics _vaultModelVaultClientDiagnostics; + private VaultRestOperations _vaultModelVaultRestClient; + + /// Initializes a new instance of the class for mocking. + protected SubscriptionResourceExtensionClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics FabricModelFabricClientDiagnostics => _fabricModelFabricClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", FabricModelResource.ResourceType.Namespace, Diagnostics); + private FabricRestOperations FabricModelFabricRestClient => _fabricModelFabricRestClient ??= new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(FabricModelResource.ResourceType)); + private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private AzureSiteRecoveryManagementServiceAPIRestOperations DefaultRestClient => _defaultRestClient ??= new AzureSiteRecoveryManagementServiceAPIRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics VaultModelVaultClientDiagnostics => _vaultModelVaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", VaultModelResource.ResourceType.Namespace, Diagnostics); + private VaultRestOperations VaultModelVaultRestClient => _vaultModelVaultRestClient ??= new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(VaultModelResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// Fabric_ListBySubscription + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFabricModelsAsync(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricModelFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricModelFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// Fabric_ListBySubscription + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFabricModels(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricModelFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricModelFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability + /// + /// + /// + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + public virtual async Task> CheckNameAvailabilityAsync(AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + { + using var scope = DefaultClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailability"); + scope.Start(); + try + { + var response = await DefaultRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability + /// + /// + /// + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + public virtual Response CheckNameAvailability(AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + { + using var scope = DefaultClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailability"); + scope.Start(); + try + { + var response = DefaultRestClient.CheckNameAvailability(Id.SubscriptionId, location, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// Vault_ListBySubscription + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetVaultModelsAsync(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => VaultModelVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VaultModelVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// Vault_ListBySubscription + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetVaultModels(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => VaultModelVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VaultModelVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs new file mode 100644 index 000000000000..ccd5e3ce60d3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFabricModels method from an instance of . + /// + public partial class FabricModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _fabricModelFabricClientDiagnostics; + private readonly FabricRestOperations _fabricModelFabricRestClient; + + /// Initializes a new instance of the class for mocking. + protected FabricModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal FabricModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fabricModelFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", FabricModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FabricModelResource.ResourceType, out string fabricModelFabricApiVersion); + _fabricModelFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fabricModelFabricApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Fabric Name. + /// Fabric properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _fabricModelFabricRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Fabric Name. + /// Fabric properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _fabricModelFabricRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// Fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Get"); + scope.Start(); + try + { + var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// Fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Get"); + scope.Start(); + try + { + var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of fabrics in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// Fabric_List + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fabricModelFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fabricModelFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// Fabric_List + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fabricModelFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fabricModelFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// Fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Exists"); + scope.Start(); + try + { + var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// Fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Exists"); + scope.Start(); + try + { + var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelData.cs new file mode 100644 index 000000000000..6a34ff8b16c9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelData.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the FabricModel data model. + /// Fabric model. + /// + public partial class FabricModelData : TrackedResourceData + { + /// Initializes a new instance of FabricModelData. + /// The location. + /// Fabric model properties. + /// is null. + public FabricModelData(AzureLocation location, FabricModelProperties properties) : base(location) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of FabricModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Fabric model properties. + internal FabricModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, FabricModelProperties properties) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + } + + /// Fabric model properties. + public FabricModelProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs new file mode 100644 index 000000000000..e64cdef1b4c7 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs @@ -0,0 +1,737 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a FabricModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFabricModelResource method. + /// Otherwise you can get one from its parent resource using the GetFabricModel method. + /// + public partial class FabricModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _fabricModelFabricClientDiagnostics; + private readonly FabricRestOperations _fabricModelFabricRestClient; + private readonly ClientDiagnostics _fabricOperationsStatusClientDiagnostics; + private readonly FabricOperationsStatusRestOperations _fabricOperationsStatusRestClient; + private readonly FabricModelData _data; + + /// Initializes a new instance of the class for mocking. + protected FabricModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FabricModelResource(ArmClient client, FabricModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal FabricModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fabricModelFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string fabricModelFabricApiVersion); + _fabricModelFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fabricModelFabricApiVersion); + _fabricOperationsStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _fabricOperationsStatusRestClient = new FabricOperationsStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationFabrics"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual FabricModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DraModelResources in the FabricModel. + /// An object representing collection of DraModelResources and their operations over a DraModelResource. + public virtual DraModelCollection GetDraModels() + { + return GetCachedClient(Client => new DraModelCollection(Client, Id)); + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// Dra name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetDraModelAsync(string draName, CancellationToken cancellationToken = default) + { + return await GetDraModels().GetAsync(draName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// + /// + /// Operation Id + /// Dra_Get + /// + /// + /// + /// Dra name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetDraModel(string draName, CancellationToken cancellationToken = default) + { + return GetDraModels().Get(draName, cancellationToken); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Get"); + scope.Start(); + try + { + var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Get"); + scope.Start(); + try + { + var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Delete"); + scope.Start(); + try + { + var response = await _fabricModelFabricRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Delete"); + scope.Start(); + try + { + var response = _fabricModelFabricRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Fabric properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FabricModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Update"); + scope.Start(); + try + { + var response = await _fabricModelFabricRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Fabric properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FabricModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Update"); + scope.Start(); + try + { + var response = _fabricModelFabricRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/operations/{operationId} + /// + /// + /// Operation Id + /// FabricOperationsStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetFabricOperationsStatuAsync(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _fabricOperationsStatusClientDiagnostics.CreateScope("FabricModelResource.GetFabricOperationsStatu"); + scope.Start(); + try + { + var response = await _fabricOperationsStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/operations/{operationId} + /// + /// + /// Operation Id + /// FabricOperationsStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetFabricOperationsStatu(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _fabricOperationsStatusClientDiagnostics.CreateScope("FabricModelResource.GetFabricOperationsStatu"); + scope.Start(); + try + { + var response = _fabricOperationsStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FabricModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FabricModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FabricModelPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FabricModelPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FabricModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// Fabric_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FabricModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs new file mode 100644 index 000000000000..be5cabf93dc5 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DraModelOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DraModelOperationSource(ArmClient client) + { + _client = client; + } + + DraModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DraModelData.DeserializeDraModelData(document.RootElement); + return new DraModelResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DraModelData.DeserializeDraModelData(document.RootElement); + return new DraModelResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs new file mode 100644 index 000000000000..b7a7767db0e4 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class FabricModelOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FabricModelOperationSource(ArmClient client) + { + _client = client; + } + + FabricModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = FabricModelData.DeserializeFabricModelData(document.RootElement); + return new FabricModelResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = FabricModelData.DeserializeFabricModelData(document.RootElement); + return new FabricModelResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PlannedFailoverModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PlannedFailoverModelOperationSource.cs new file mode 100644 index 000000000000..6251359a249f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PlannedFailoverModelOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class PlannedFailoverModelOperationSource : IOperationSource + { + PlannedFailoverModel IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return PlannedFailoverModel.DeserializePlannedFailoverModel(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return PlannedFailoverModel.DeserializePlannedFailoverModel(document.RootElement); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs new file mode 100644 index 000000000000..0f38ddab0284 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class PolicyModelOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PolicyModelOperationSource(ArmClient client) + { + _client = client; + } + + PolicyModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = PolicyModelData.DeserializePolicyModelData(document.RootElement); + return new PolicyModelResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = PolicyModelData.DeserializePolicyModelData(document.RootElement); + return new PolicyModelResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ProtectedItemModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ProtectedItemModelOperationSource.cs new file mode 100644 index 000000000000..6a16833006b8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ProtectedItemModelOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class ProtectedItemModelOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ProtectedItemModelOperationSource(ArmClient client) + { + _client = client; + } + + ProtectedItemModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); + return new ProtectedItemModelResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); + return new ProtectedItemModelResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperation.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperation.cs new file mode 100644 index 000000000000..6c9ea67cac22 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperation.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ +#pragma warning disable SA1649 // File name should match first type name + internal class RecoveryServicesDataReplicationArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of RecoveryServicesDataReplicationArmOperation for mocking. + protected RecoveryServicesDataReplicationArmOperation() + { + } + + internal RecoveryServicesDataReplicationArmOperation(Response response) + { + _operation = OperationInternal.Succeeded(response); + } + + internal RecoveryServicesDataReplicationArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "RecoveryServicesDataReplicationArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + /// +#pragma warning disable CA1822 + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperationOfT.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperationOfT.cs new file mode 100644 index 000000000000..7912bde0baea --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperationOfT.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ +#pragma warning disable SA1649 // File name should match first type name + internal class RecoveryServicesDataReplicationArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + + /// Initializes a new instance of RecoveryServicesDataReplicationArmOperation for mocking. + protected RecoveryServicesDataReplicationArmOperation() + { + } + + internal RecoveryServicesDataReplicationArmOperation(Response response) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + } + + internal RecoveryServicesDataReplicationArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(source, pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "RecoveryServicesDataReplicationArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + /// +#pragma warning disable CA1822 + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public override string Id => throw new NotImplementedException(); +#pragma warning restore CA1822 + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs new file mode 100644 index 000000000000..a1ef2b595b19 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class ReplicationExtensionModelOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ReplicationExtensionModelOperationSource(ArmClient client) + { + _client = client; + } + + ReplicationExtensionModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); + return new ReplicationExtensionModelResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); + return new ReplicationExtensionModelResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs new file mode 100644 index 000000000000..20a236a2758c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class VaultModelOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal VaultModelOperationSource(ArmClient client) + { + _client = client; + } + + VaultModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = VaultModelData.DeserializeVaultModelData(document.RootElement); + return new VaultModelResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = VaultModelData.DeserializeVaultModelData(document.RootElement); + return new VaultModelResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.Serialization.cs new file mode 100644 index 000000000000..18cd94904067 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class AzStackHCIClusterProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("clusterName"u8); + writer.WriteStringValue(ClusterName); + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + writer.WritePropertyName("storageContainers"u8); + writer.WriteStartArray(); + foreach (var item in StorageContainers) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static AzStackHCIClusterProperties DeserializeAzStackHCIClusterProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterName = default; + string resourceName = default; + string storageAccountName = default; + IList storageContainers = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterName"u8)) + { + clusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountName"u8)) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainers"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StorageContainerProperties.DeserializeStorageContainerProperties(item)); + } + storageContainers = array; + continue; + } + } + return new AzStackHCIClusterProperties(clusterName, resourceName, storageAccountName, storageContainers); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.cs new file mode 100644 index 000000000000..e1549824e5ca --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// AzStackHCI cluster properties. + public partial class AzStackHCIClusterProperties + { + /// Initializes a new instance of AzStackHCIClusterProperties. + /// Gets or sets the AzStackHCICluster FQDN name. + /// Gets or sets the AzStackHCICluster resource name. + /// Gets or sets the Storage account name. + /// Gets or sets the list of AzStackHCICluster Storage Container. + /// , , or is null. + public AzStackHCIClusterProperties(string clusterName, string resourceName, string storageAccountName, IEnumerable storageContainers) + { + Argument.AssertNotNull(clusterName, nameof(clusterName)); + Argument.AssertNotNull(resourceName, nameof(resourceName)); + Argument.AssertNotNull(storageAccountName, nameof(storageAccountName)); + Argument.AssertNotNull(storageContainers, nameof(storageContainers)); + + ClusterName = clusterName; + ResourceName = resourceName; + StorageAccountName = storageAccountName; + StorageContainers = storageContainers.ToList(); + } + + /// Initializes a new instance of AzStackHCIClusterProperties. + /// Gets or sets the AzStackHCICluster FQDN name. + /// Gets or sets the AzStackHCICluster resource name. + /// Gets or sets the Storage account name. + /// Gets or sets the list of AzStackHCICluster Storage Container. + internal AzStackHCIClusterProperties(string clusterName, string resourceName, string storageAccountName, IList storageContainers) + { + ClusterName = clusterName; + ResourceName = resourceName; + StorageAccountName = storageAccountName; + StorageContainers = storageContainers; + } + + /// Gets or sets the AzStackHCICluster FQDN name. + public string ClusterName { get; set; } + /// Gets or sets the AzStackHCICluster resource name. + public string ResourceName { get; set; } + /// Gets or sets the Storage account name. + public string StorageAccountName { get; set; } + /// Gets or sets the list of AzStackHCICluster Storage Container. + public IList StorageContainers { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..eaa9eae1d65e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class AzStackHCIDraModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static AzStackHCIDraModelCustomProperties DeserializeAzStackHCIDraModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FabricType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new AzStackHCIDraModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs new file mode 100644 index 000000000000..070575689bcc --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// AzStackHCI DRA model custom properties. + public partial class AzStackHCIDraModelCustomProperties : DraModelCustomProperties + { + /// Initializes a new instance of AzStackHCIDraModelCustomProperties. + public AzStackHCIDraModelCustomProperties() + { + InstanceType = FabricType.AzStackHCI; + } + + /// Initializes a new instance of AzStackHCIDraModelCustomProperties. + /// Gets or sets the instance type. + internal AzStackHCIDraModelCustomProperties(FabricType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..858ab71063b2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class AzStackHCIFabricModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("azStackHciSiteId"u8); + writer.WriteStringValue(AzStackHciSiteId); + writer.WritePropertyName("cluster"u8); + writer.WriteObjectValue(Cluster); + writer.WritePropertyName("migrationSolutionId"u8); + writer.WriteStringValue(MigrationSolutionId); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static AzStackHCIFabricModelCustomProperties DeserializeAzStackHCIFabricModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string azStackHciSiteId = default; + Optional> applianceName = default; + AzStackHCIClusterProperties cluster = default; + Optional fabricResourceId = default; + Optional fabricContainerId = default; + string migrationSolutionId = default; + Optional migrationHubUri = default; + FabricType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azStackHciSiteId"u8)) + { + azStackHciSiteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("applianceName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + applianceName = array; + continue; + } + if (property.NameEquals("cluster"u8)) + { + cluster = AzStackHCIClusterProperties.DeserializeAzStackHCIClusterProperties(property.Value); + continue; + } + if (property.NameEquals("fabricResourceId"u8)) + { + fabricResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricContainerId"u8)) + { + fabricContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrationSolutionId"u8)) + { + migrationSolutionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrationHubUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationHubUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new AzStackHCIFabricModelCustomProperties(instanceType, azStackHciSiteId, Optional.ToList(applianceName), cluster, fabricResourceId.Value, fabricContainerId.Value, migrationSolutionId, migrationHubUri.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs new file mode 100644 index 000000000000..4fcfee18ec43 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// AzStackHCI fabric model custom properties. + public partial class AzStackHCIFabricModelCustomProperties : FabricModelCustomProperties + { + /// Initializes a new instance of AzStackHCIFabricModelCustomProperties. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// AzStackHCI cluster properties. + /// Gets or sets the Migration solution ARM Id. + /// , or is null. + public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, AzStackHCIClusterProperties cluster, string migrationSolutionId) + { + Argument.AssertNotNull(azStackHciSiteId, nameof(azStackHciSiteId)); + Argument.AssertNotNull(cluster, nameof(cluster)); + Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); + + AzStackHciSiteId = azStackHciSiteId; + ApplianceName = new ChangeTrackingList(); + Cluster = cluster; + MigrationSolutionId = migrationSolutionId; + InstanceType = FabricType.AzStackHCI; + } + + /// Initializes a new instance of AzStackHCIFabricModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the Appliance name. + /// AzStackHCI cluster properties. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the Migration solution ARM Id. + /// Gets or sets the migration hub Uri. + internal AzStackHCIFabricModelCustomProperties(FabricType instanceType, string azStackHciSiteId, IReadOnlyList applianceName, AzStackHCIClusterProperties cluster, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) + { + AzStackHciSiteId = azStackHciSiteId; + ApplianceName = applianceName; + Cluster = cluster; + FabricResourceId = fabricResourceId; + FabricContainerId = fabricContainerId; + MigrationSolutionId = migrationSolutionId; + MigrationHubUri = migrationHubUri; + InstanceType = instanceType; + } + + /// Gets or sets the ARM Id of the AzStackHCI site. + public string AzStackHciSiteId { get; set; } + /// Gets or sets the Appliance name. + public IReadOnlyList ApplianceName { get; } + /// AzStackHCI cluster properties. + public AzStackHCIClusterProperties Cluster { get; set; } + /// Gets or sets the fabric resource Id. + public string FabricResourceId { get; } + /// Gets or sets the fabric container Id. + public string FabricContainerId { get; } + /// Gets or sets the Migration solution ARM Id. + public string MigrationSolutionId { get; set; } + /// Gets or sets the migration hub Uri. + public Uri MigrationHubUri { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.Serialization.cs new file mode 100644 index 000000000000..44031190b0a6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class CheckNameAvailabilityModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.cs new file mode 100644 index 000000000000..bebc2a7431af --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Check name availability model. + public partial class CheckNameAvailabilityModel + { + /// Initializes a new instance of CheckNameAvailabilityModel. + public CheckNameAvailabilityModel() + { + } + + /// Gets or sets the resource name. + public string Name { get; set; } + /// Gets or sets the resource type. + public string ResourceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.Serialization.cs new file mode 100644 index 000000000000..c9f78c87e3a2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class CheckNameAvailabilityResponseModel + { + internal static CheckNameAvailabilityResponseModel DeserializeCheckNameAvailabilityResponseModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nameAvailable = default; + Optional reason = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nameAvailable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nameAvailable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new CheckNameAvailabilityResponseModel(Optional.ToNullable(nameAvailable), reason.Value, message.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.cs new file mode 100644 index 000000000000..88be6c51b3b3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Check name availability response model. + public partial class CheckNameAvailabilityResponseModel + { + /// Initializes a new instance of CheckNameAvailabilityResponseModel. + internal CheckNameAvailabilityResponseModel() + { + } + + /// Initializes a new instance of CheckNameAvailabilityResponseModel. + /// Gets or sets a value indicating whether resource name is available or not. + /// Gets or sets the reason for resource name unavailability. + /// Gets or sets the message for resource name unavailability. + internal CheckNameAvailabilityResponseModel(bool? nameAvailable, string reason, string message) + { + NameAvailable = nameAvailable; + Reason = reason; + Message = message; + } + + /// Gets or sets a value indicating whether resource name is available or not. + public bool? NameAvailable { get; } + /// Gets or sets the reason for resource name unavailability. + public string Reason { get; } + /// Gets or sets the message for resource name unavailability. + public string Message { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.Serialization.cs new file mode 100644 index 000000000000..103c7a0d18ef --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DeploymentPreflightModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static DeploymentPreflightModel DeserializeDeploymentPreflightModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> resources = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentPreflightResource.DeserializeDeploymentPreflightResource(item)); + } + resources = array; + continue; + } + } + return new DeploymentPreflightModel(Optional.ToList(resources)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.cs new file mode 100644 index 000000000000..fb28f4b1e420 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightModel.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Deployment preflight model. + public partial class DeploymentPreflightModel + { + /// Initializes a new instance of DeploymentPreflightModel. + public DeploymentPreflightModel() + { + Resources = new ChangeTrackingList(); + } + + /// Initializes a new instance of DeploymentPreflightModel. + /// Gets or sets the list of resources. + internal DeploymentPreflightModel(IList resources) + { + Resources = resources; + } + + /// Gets or sets the list of resources. + public IList Resources { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs new file mode 100644 index 000000000000..e85e838e008b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DeploymentPreflightResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(DeploymentPreflightResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(DeploymentPreflightResourceType); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + writer.WriteEndObject(); + } + + internal static DeploymentPreflightResource DeserializeDeploymentPreflightResource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional type = default; + Optional location = default; + Optional apiVersion = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + } + return new DeploymentPreflightResource(name.Value, type.Value, Optional.ToNullable(location), apiVersion.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs new file mode 100644 index 000000000000..22851bccd038 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Deployment preflight resource. + public partial class DeploymentPreflightResource + { + /// Initializes a new instance of DeploymentPreflightResource. + public DeploymentPreflightResource() + { + } + + /// Initializes a new instance of DeploymentPreflightResource. + /// Gets or sets the resource name. + /// Gets or sets the resource type. + /// Gets or sets the location of the resource. + /// Gets or sets the Api version. + internal DeploymentPreflightResource(string name, string deploymentPreflightResourceType, AzureLocation? location, string apiVersion) + { + Name = name; + DeploymentPreflightResourceType = deploymentPreflightResourceType; + Location = location; + ApiVersion = apiVersion; + } + + /// Gets or sets the resource name. + public string Name { get; set; } + /// Gets or sets the resource type. + public string DeploymentPreflightResourceType { get; set; } + /// Gets or sets the location of the resource. + public AzureLocation? Location { get; set; } + /// Gets or sets the Api version. + public string ApiVersion { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.Serialization.cs new file mode 100644 index 000000000000..41ee63b2859e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class DraModelCollection + { + internal static DraModelCollection DeserializeDraModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DraModelData.DeserializeDraModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DraModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.cs new file mode 100644 index 000000000000..71148bdedb5a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Dra model collection. + internal partial class DraModelCollection + { + /// Initializes a new instance of DraModelCollection. + internal DraModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DraModelCollection. + /// Gets or sets the list of Dras. + /// Gets or sets the value of next link. + internal DraModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of Dras. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..4b2d7b777f0a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DraModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static DraModelCustomProperties DeserializeDraModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzStackHCI": return AzStackHCIDraModelCustomProperties.DeserializeAzStackHCIDraModelCustomProperties(element); + case "HyperVMigrate": return HyperVMigrateDraModelCustomProperties.DeserializeHyperVMigrateDraModelCustomProperties(element); + case "VMware": return VMwareDraModelCustomProperties.DeserializeVMwareDraModelCustomProperties(element); + } + } + return UnknownDraModelCustomProperties.DeserializeUnknownDraModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs new file mode 100644 index 000000000000..83cebbfcb192 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Dra model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class DraModelCustomProperties + { + /// Initializes a new instance of DraModelCustomProperties. + protected DraModelCustomProperties() + { + } + + /// Initializes a new instance of DraModelCustomProperties. + /// Gets or sets the instance type. + internal DraModelCustomProperties(FabricType instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal FabricType InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs new file mode 100644 index 000000000000..e7f04dcca520 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DraModelData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static DraModelData DeserializeDraModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DraModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = DraModelProperties.DeserializeDraModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new DraModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.Serialization.cs new file mode 100644 index 000000000000..f01f8742bb38 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DraModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("machineId"u8); + writer.WriteStringValue(MachineId); + writer.WritePropertyName("machineName"u8); + writer.WriteStringValue(MachineName); + writer.WritePropertyName("authenticationIdentity"u8); + writer.WriteObjectValue(AuthenticationIdentity); + writer.WritePropertyName("resourceAccessIdentity"u8); + writer.WriteObjectValue(ResourceAccessIdentity); + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties); + writer.WriteEndObject(); + } + + internal static DraModelProperties DeserializeDraModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional correlationId = default; + string machineId = default; + string machineName = default; + IdentityModel authenticationIdentity = default; + IdentityModel resourceAccessIdentity = default; + Optional isResponsive = default; + Optional lastHeartbeat = default; + Optional versionNumber = default; + Optional provisioningState = default; + Optional> healthErrors = default; + DraModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("machineId"u8)) + { + machineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("machineName"u8)) + { + machineName = property.Value.GetString(); + continue; + } + if (property.NameEquals("authenticationIdentity"u8)) + { + authenticationIdentity = IdentityModel.DeserializeIdentityModel(property.Value); + continue; + } + if (property.NameEquals("resourceAccessIdentity"u8)) + { + resourceAccessIdentity = IdentityModel.DeserializeIdentityModel(property.Value); + continue; + } + if (property.NameEquals("isResponsive"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isResponsive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("lastHeartbeat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastHeartbeat = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("versionNumber"u8)) + { + versionNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DraModelCustomProperties.DeserializeDraModelCustomProperties(property.Value); + continue; + } + } + return new DraModelProperties(correlationId.Value, machineId, machineName, authenticationIdentity, resourceAccessIdentity, Optional.ToNullable(isResponsive), Optional.ToNullable(lastHeartbeat), versionNumber.Value, Optional.ToNullable(provisioningState), Optional.ToList(healthErrors), customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs new file mode 100644 index 000000000000..5baab8b38b8d --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Dra model properties. + public partial class DraModelProperties + { + /// Initializes a new instance of DraModelProperties. + /// Gets or sets the machine Id where Dra is running. + /// Gets or sets the machine name where Dra is running. + /// Identity model. + /// Identity model. + /// + /// Dra model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// , , , or is null. + public DraModelProperties(string machineId, string machineName, IdentityModel authenticationIdentity, IdentityModel resourceAccessIdentity, DraModelCustomProperties customProperties) + { + Argument.AssertNotNull(machineId, nameof(machineId)); + Argument.AssertNotNull(machineName, nameof(machineName)); + Argument.AssertNotNull(authenticationIdentity, nameof(authenticationIdentity)); + Argument.AssertNotNull(resourceAccessIdentity, nameof(resourceAccessIdentity)); + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + MachineId = machineId; + MachineName = machineName; + AuthenticationIdentity = authenticationIdentity; + ResourceAccessIdentity = resourceAccessIdentity; + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of DraModelProperties. + /// Gets or sets the Dra correlation Id. + /// Gets or sets the machine Id where Dra is running. + /// Gets or sets the machine name where Dra is running. + /// Identity model. + /// Identity model. + /// Gets or sets a value indicating whether Dra is responsive. + /// Gets or sets the time when last heartbeat was sent by the Dra. + /// Gets or sets the Dra version. + /// Gets or sets the provisioning state of the Dra. + /// Gets or sets the list of health errors. + /// + /// Dra model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal DraModelProperties(string correlationId, string machineId, string machineName, IdentityModel authenticationIdentity, IdentityModel resourceAccessIdentity, bool? isResponsive, DateTimeOffset? lastHeartbeat, string versionNumber, ProvisioningState? provisioningState, IReadOnlyList healthErrors, DraModelCustomProperties customProperties) + { + CorrelationId = correlationId; + MachineId = machineId; + MachineName = machineName; + AuthenticationIdentity = authenticationIdentity; + ResourceAccessIdentity = resourceAccessIdentity; + IsResponsive = isResponsive; + LastHeartbeat = lastHeartbeat; + VersionNumber = versionNumber; + ProvisioningState = provisioningState; + HealthErrors = healthErrors; + CustomProperties = customProperties; + } + + /// Gets or sets the Dra correlation Id. + public string CorrelationId { get; } + /// Gets or sets the machine Id where Dra is running. + public string MachineId { get; set; } + /// Gets or sets the machine name where Dra is running. + public string MachineName { get; set; } + /// Identity model. + public IdentityModel AuthenticationIdentity { get; set; } + /// Identity model. + public IdentityModel ResourceAccessIdentity { get; set; } + /// Gets or sets a value indicating whether Dra is responsive. + public bool? IsResponsive { get; } + /// Gets or sets the time when last heartbeat was sent by the Dra. + public DateTimeOffset? LastHeartbeat { get; } + /// Gets or sets the Dra version. + public string VersionNumber { get; } + /// Gets or sets the provisioning state of the Dra. + public ProvisioningState? ProvisioningState { get; } + /// Gets or sets the list of health errors. + public IReadOnlyList HealthErrors { get; } + /// + /// Dra model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public DraModelCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.Serialization.cs new file mode 100644 index 000000000000..0842d3d5db92 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class EmailConfigurationModelCollection + { + internal static EmailConfigurationModelCollection DeserializeEmailConfigurationModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EmailConfigurationModelData.DeserializeEmailConfigurationModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new EmailConfigurationModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.cs new file mode 100644 index 000000000000..6174f7813bec --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Email configuration model collection. + internal partial class EmailConfigurationModelCollection + { + /// Initializes a new instance of EmailConfigurationModelCollection. + internal EmailConfigurationModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of EmailConfigurationModelCollection. + /// Gets or sets the list of email configurations. + /// Gets or sets the value of next link. + internal EmailConfigurationModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of email configurations. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs new file mode 100644 index 000000000000..cf0b13159734 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class EmailConfigurationModelData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static EmailConfigurationModelData DeserializeEmailConfigurationModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EmailConfigurationModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = EmailConfigurationModelProperties.DeserializeEmailConfigurationModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new EmailConfigurationModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.Serialization.cs new file mode 100644 index 000000000000..8f21fa08b29e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class EmailConfigurationModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("sendToOwners"u8); + writer.WriteBooleanValue(SendToOwners); + if (Optional.IsCollectionDefined(CustomEmailAddresses)) + { + writer.WritePropertyName("customEmailAddresses"u8); + writer.WriteStartArray(); + foreach (var item in CustomEmailAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Locale)) + { + writer.WritePropertyName("locale"u8); + writer.WriteStringValue(Locale); + } + writer.WriteEndObject(); + } + + internal static EmailConfigurationModelProperties DeserializeEmailConfigurationModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool sendToOwners = default; + Optional> customEmailAddresses = default; + Optional locale = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sendToOwners"u8)) + { + sendToOwners = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("customEmailAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + customEmailAddresses = array; + continue; + } + if (property.NameEquals("locale"u8)) + { + locale = property.Value.GetString(); + continue; + } + } + return new EmailConfigurationModelProperties(sendToOwners, Optional.ToList(customEmailAddresses), locale.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.cs new file mode 100644 index 000000000000..2c4e856162a9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Email configuration model properties. + public partial class EmailConfigurationModelProperties + { + /// Initializes a new instance of EmailConfigurationModelProperties. + /// Gets or sets a value indicating whether to send email to subscription administrator. + public EmailConfigurationModelProperties(bool sendToOwners) + { + SendToOwners = sendToOwners; + CustomEmailAddresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of EmailConfigurationModelProperties. + /// Gets or sets a value indicating whether to send email to subscription administrator. + /// Gets or sets the custom email address for sending emails. + /// Gets or sets the locale for the email notification. + internal EmailConfigurationModelProperties(bool sendToOwners, IList customEmailAddresses, string locale) + { + SendToOwners = sendToOwners; + CustomEmailAddresses = customEmailAddresses; + Locale = locale; + } + + /// Gets or sets a value indicating whether to send email to subscription administrator. + public bool SendToOwners { get; set; } + /// Gets or sets the custom email address for sending emails. + public IList CustomEmailAddresses { get; } + /// Gets or sets the locale for the email notification. + public string Locale { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.Serialization.cs new file mode 100644 index 000000000000..1697ece847b8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ErrorModel + { + internal static ErrorModel DeserializeErrorModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional code = default; + Optional type = default; + Optional severity = default; + Optional creationTime = default; + Optional message = default; + Optional causes = default; + Optional recommendation = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("causes"u8)) + { + causes = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendation"u8)) + { + recommendation = property.Value.GetString(); + continue; + } + } + return new ErrorModel(code.Value, type.Value, severity.Value, Optional.ToNullable(creationTime), message.Value, causes.Value, recommendation.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.cs new file mode 100644 index 000000000000..9c5dd798caee --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Error model. + public partial class ErrorModel + { + /// Initializes a new instance of ErrorModel. + internal ErrorModel() + { + } + + /// Initializes a new instance of ErrorModel. + /// Gets or sets the error code. + /// Gets or sets the error type. + /// Gets or sets the error severity. + /// Gets or sets the creation time of error. + /// Gets or sets the error message. + /// Gets or sets the possible causes of error. + /// Gets or sets the recommended action to resolve error. + internal ErrorModel(string code, string errorModelType, string severity, DateTimeOffset? createdOn, string message, string causes, string recommendation) + { + Code = code; + ErrorModelType = errorModelType; + Severity = severity; + CreatedOn = createdOn; + Message = message; + Causes = causes; + Recommendation = recommendation; + } + + /// Gets or sets the error code. + public string Code { get; } + /// Gets or sets the error type. + public string ErrorModelType { get; } + /// Gets or sets the error severity. + public string Severity { get; } + /// Gets or sets the creation time of error. + public DateTimeOffset? CreatedOn { get; } + /// Gets or sets the error message. + public string Message { get; } + /// Gets or sets the possible causes of error. + public string Causes { get; } + /// Gets or sets the recommended action to resolve error. + public string Recommendation { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.Serialization.cs new file mode 100644 index 000000000000..8df70cc77914 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class EventModelCollection + { + internal static EventModelCollection DeserializeEventModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EventModelData.DeserializeEventModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new EventModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.cs new file mode 100644 index 000000000000..cb1bcb6f4b4f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Event model collection. + internal partial class EventModelCollection + { + /// Initializes a new instance of EventModelCollection. + internal EventModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of EventModelCollection. + /// Gets or sets the list of events. + /// Gets or sets the value of next link. + internal EventModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of events. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..ae8680e79743 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class EventModelCustomProperties + { + internal static EventModelCustomProperties DeserializeEventModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHCIEventModelCustomProperties.DeserializeHyperVToAzStackHCIEventModelCustomProperties(element); + } + } + return UnknownEventModelCustomProperties.DeserializeUnknownEventModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs new file mode 100644 index 000000000000..1f9cb2f00e41 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class EventModelCustomProperties + { + /// Initializes a new instance of EventModelCustomProperties. + protected EventModelCustomProperties() + { + } + + /// Initializes a new instance of EventModelCustomProperties. + /// Gets or sets the instance type. + internal EventModelCustomProperties(ReplicationType instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal ReplicationType InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs new file mode 100644 index 000000000000..3d8c0253fdce --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class EventModelData + { + internal static EventModelData DeserializeEventModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EventModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = EventModelProperties.DeserializeEventModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new EventModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.Serialization.cs new file mode 100644 index 000000000000..e35372ceaae8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class EventModelProperties + { + internal static EventModelProperties DeserializeEventModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional resourceType = default; + Optional resourceName = default; + Optional eventType = default; + Optional eventName = default; + Optional timeOfOccurrence = default; + Optional severity = default; + Optional description = default; + Optional correlationId = default; + Optional> healthErrors = default; + EventModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType"u8)) + { + resourceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("eventType"u8)) + { + eventType = property.Value.GetString(); + continue; + } + if (property.NameEquals("eventName"u8)) + { + eventName = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfOccurrence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfOccurrence = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = EventModelCustomProperties.DeserializeEventModelCustomProperties(property.Value); + continue; + } + } + return new EventModelProperties(resourceType.Value, resourceName.Value, eventType.Value, eventName.Value, Optional.ToNullable(timeOfOccurrence), severity.Value, description.Value, correlationId.Value, Optional.ToList(healthErrors), customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.cs new file mode 100644 index 000000000000..7c7789cc8864 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Event model properties. + public partial class EventModelProperties + { + /// Initializes a new instance of EventModelProperties. + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// is null. + internal EventModelProperties(EventModelCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of EventModelProperties. + /// Gets or sets the resource type. + /// Gets or sets the resource name. + /// Gets or sets the event type. + /// Gets or sets the event name. + /// Gets or sets the time at which the event occurred at source. + /// Gets or sets the event severity. + /// Gets or sets the event description. + /// Gets or sets the event correlation Id. + /// Gets or sets the errors associated with this event. + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal EventModelProperties(string resourceType, string resourceName, string eventType, string eventName, DateTimeOffset? timeOfOccurrence, string severity, string description, string correlationId, IReadOnlyList healthErrors, EventModelCustomProperties customProperties) + { + ResourceType = resourceType; + ResourceName = resourceName; + EventType = eventType; + EventName = eventName; + TimeOfOccurrence = timeOfOccurrence; + Severity = severity; + Description = description; + CorrelationId = correlationId; + HealthErrors = healthErrors; + CustomProperties = customProperties; + } + + /// Gets or sets the resource type. + public string ResourceType { get; } + /// Gets or sets the resource name. + public string ResourceName { get; } + /// Gets or sets the event type. + public string EventType { get; } + /// Gets or sets the event name. + public string EventName { get; } + /// Gets or sets the time at which the event occurred at source. + public DateTimeOffset? TimeOfOccurrence { get; } + /// Gets or sets the event severity. + public string Severity { get; } + /// Gets or sets the event description. + public string Description { get; } + /// Gets or sets the event correlation Id. + public string CorrelationId { get; } + /// Gets or sets the errors associated with this event. + public IReadOnlyList HealthErrors { get; } + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public EventModelCustomProperties CustomProperties { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.Serialization.cs new file mode 100644 index 000000000000..4a2fe1d6167c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class FabricModelCollection + { + internal static FabricModelCollection DeserializeFabricModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FabricModelData.DeserializeFabricModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new FabricModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.cs new file mode 100644 index 000000000000..2562fb649a4b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Fabric model collection. + internal partial class FabricModelCollection + { + /// Initializes a new instance of FabricModelCollection. + internal FabricModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of FabricModelCollection. + /// Gets or sets the list of fabrics. + /// Gets or sets the value of next link. + internal FabricModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of fabrics. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..7dc7aa352305 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class FabricModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static FabricModelCustomProperties DeserializeFabricModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzStackHCI": return AzStackHCIFabricModelCustomProperties.DeserializeAzStackHCIFabricModelCustomProperties(element); + case "HyperVMigrate": return HyperVMigrateFabricModelCustomProperties.DeserializeHyperVMigrateFabricModelCustomProperties(element); + case "VMwareMigrate": return VMwareMigrateFabricModelCustomProperties.DeserializeVMwareMigrateFabricModelCustomProperties(element); + } + } + return UnknownFabricModelCustomProperties.DeserializeUnknownFabricModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs new file mode 100644 index 000000000000..3d27facd6bdb --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class FabricModelCustomProperties + { + /// Initializes a new instance of FabricModelCustomProperties. + protected FabricModelCustomProperties() + { + } + + /// Initializes a new instance of FabricModelCustomProperties. + /// Gets or sets the instance type. + internal FabricModelCustomProperties(FabricType instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal FabricType InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelData.Serialization.cs new file mode 100644 index 000000000000..bccfd2171e4c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelData.Serialization.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class FabricModelData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static FabricModelData DeserializeFabricModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FabricModelProperties properties = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = FabricModelProperties.DeserializeFabricModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new FabricModelData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs new file mode 100644 index 000000000000..fd3633c56977 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class FabricModelPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs new file mode 100644 index 000000000000..f1c5eb7901a7 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Fabric model for update. + public partial class FabricModelPatch : ResourceData + { + /// Initializes a new instance of FabricModelPatch. + public FabricModelPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Fabric model properties. + public FabricModelProperties Properties { get; set; } + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.Serialization.cs new file mode 100644 index 000000000000..92522e27e10a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class FabricModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties); + writer.WriteEndObject(); + } + + internal static FabricModelProperties DeserializeFabricModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + Optional serviceEndpoint = default; + Optional serviceResourceId = default; + Optional health = default; + Optional> healthErrors = default; + FabricModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceEndpoint"u8)) + { + serviceEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceResourceId"u8)) + { + serviceResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new HealthStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = FabricModelCustomProperties.DeserializeFabricModelCustomProperties(property.Value); + continue; + } + } + return new FabricModelProperties(Optional.ToNullable(provisioningState), serviceEndpoint.Value, serviceResourceId.Value, Optional.ToNullable(health), Optional.ToList(healthErrors), customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.cs new file mode 100644 index 000000000000..4b1a91043b1f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Fabric model properties. + public partial class FabricModelProperties + { + /// Initializes a new instance of FabricModelProperties. + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + public FabricModelProperties(FabricModelCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of FabricModelProperties. + /// Gets or sets the provisioning state of the fabric. + /// Gets or sets the service endpoint. + /// Gets or sets the service resource Id. + /// Gets or sets the fabric health. + /// Gets or sets the list of health errors. + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal FabricModelProperties(ProvisioningState? provisioningState, string serviceEndpoint, string serviceResourceId, HealthStatus? health, IReadOnlyList healthErrors, FabricModelCustomProperties customProperties) + { + ProvisioningState = provisioningState; + ServiceEndpoint = serviceEndpoint; + ServiceResourceId = serviceResourceId; + Health = health; + HealthErrors = healthErrors; + CustomProperties = customProperties; + } + + /// Gets or sets the provisioning state of the fabric. + public ProvisioningState? ProvisioningState { get; } + /// Gets or sets the service endpoint. + public string ServiceEndpoint { get; } + /// Gets or sets the service resource Id. + public string ServiceResourceId { get; } + /// Gets or sets the fabric health. + public HealthStatus? Health { get; } + /// Gets or sets the list of health errors. + public IReadOnlyList HealthErrors { get; } + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FabricModelCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs new file mode 100644 index 000000000000..b2a2bfd7ba42 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the instance type. + internal readonly partial struct FabricType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FabricType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string VMwareValue = "VMware"; + private const string AVSValue = "AVS"; + private const string AzureValue = "Azure"; + private const string AzStackHCIValue = "AzStackHCI"; + private const string HyperVMigrateValue = "HyperVMigrate"; + private const string VMwareMigrateValue = "VMwareMigrate"; + + /// None. + public static FabricType None { get; } = new FabricType(NoneValue); + /// VMware. + public static FabricType VMware { get; } = new FabricType(VMwareValue); + /// AVS. + public static FabricType AVS { get; } = new FabricType(AVSValue); + /// Azure. + public static FabricType Azure { get; } = new FabricType(AzureValue); + /// AzStackHCI. + public static FabricType AzStackHCI { get; } = new FabricType(AzStackHCIValue); + /// HyperVMigrate. + public static FabricType HyperVMigrate { get; } = new FabricType(HyperVMigrateValue); + /// VMwareMigrate. + public static FabricType VMwareMigrate { get; } = new FabricType(VMwareMigrateValue); + /// Determines if two values are the same. + public static bool operator ==(FabricType left, FabricType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FabricType left, FabricType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FabricType(string value) => new FabricType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FabricType other && Equals(other); + /// + public bool Equals(FabricType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.Serialization.cs new file mode 100644 index 000000000000..f5727695d291 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class FailoverProtectedItemProperties + { + internal static FailoverProtectedItemProperties DeserializeFailoverProtectedItemProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional protectedItemName = default; + Optional vmName = default; + Optional testVmName = default; + Optional recoveryPointId = default; + Optional recoveryPointTime = default; + Optional networkName = default; + Optional subnet = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectedItemName"u8)) + { + protectedItemName = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmName"u8)) + { + vmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("testVmName"u8)) + { + testVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("recoveryPointId"u8)) + { + recoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("recoveryPointTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + } + return new FailoverProtectedItemProperties(protectedItemName.Value, vmName.Value, testVmName.Value, recoveryPointId.Value, Optional.ToNullable(recoveryPointTime), networkName.Value, subnet.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.cs new file mode 100644 index 000000000000..1718766f41d1 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Failover properties of the protected item. + public partial class FailoverProtectedItemProperties + { + /// Initializes a new instance of FailoverProtectedItemProperties. + internal FailoverProtectedItemProperties() + { + } + + /// Initializes a new instance of FailoverProtectedItemProperties. + /// Gets or sets the protected item name. + /// Gets or sets the VM name. + /// Gets or sets the test VM name. + /// Gets or sets the recovery point Id. + /// Gets or sets the recovery point time. + /// Gets or sets the network name. + /// Gets or sets the network subnet. + internal FailoverProtectedItemProperties(string protectedItemName, string vmName, string testVmName, string recoveryPointId, DateTimeOffset? recoveryPointOn, string networkName, string subnet) + { + ProtectedItemName = protectedItemName; + VmName = vmName; + TestVmName = testVmName; + RecoveryPointId = recoveryPointId; + RecoveryPointOn = recoveryPointOn; + NetworkName = networkName; + Subnet = subnet; + } + + /// Gets or sets the protected item name. + public string ProtectedItemName { get; } + /// Gets or sets the VM name. + public string VmName { get; } + /// Gets or sets the test VM name. + public string TestVmName { get; } + /// Gets or sets the recovery point Id. + public string RecoveryPointId { get; } + /// Gets or sets the recovery point time. + public DateTimeOffset? RecoveryPointOn { get; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the network subnet. + public string Subnet { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..169548401957 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class FailoverWorkflowModelCustomProperties + { + internal static FailoverWorkflowModelCustomProperties DeserializeFailoverWorkflowModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> protectedItemDetails = default; + WorkflowDetailsType instanceType = default; + Optional> affectedObjectDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectedItemDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailoverProtectedItemProperties.DeserializeFailoverProtectedItemProperties(item)); + } + protectedItemDetails = array; + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new WorkflowDetailsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + affectedObjectDetails = dictionary; + continue; + } + } + return new FailoverWorkflowModelCustomProperties(instanceType, Optional.ToDictionary(affectedObjectDetails), Optional.ToList(protectedItemDetails)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs new file mode 100644 index 000000000000..92f137fdbc26 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Failover workflow model custom properties. + public partial class FailoverWorkflowModelCustomProperties : WorkflowModelCustomProperties + { + /// Initializes a new instance of FailoverWorkflowModelCustomProperties. + internal FailoverWorkflowModelCustomProperties() + { + ProtectedItemDetails = new ChangeTrackingList(); + InstanceType = WorkflowDetailsType.FailoverWorkflowDetails; + } + + /// Initializes a new instance of FailoverWorkflowModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the failed over protected item details. + internal FailoverWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails) + { + ProtectedItemDetails = protectedItemDetails; + InstanceType = instanceType; + } + + /// Gets or sets the failed over protected item details. + public IReadOnlyList ProtectedItemDetails { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.Serialization.cs new file mode 100644 index 000000000000..87be337d0408 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HealthErrorModel + { + internal static HealthErrorModel DeserializeHealthErrorModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional affectedResourceType = default; + Optional> affectedResourceCorrelationIds = default; + Optional> childErrors = default; + Optional code = default; + Optional healthCategory = default; + Optional category = default; + Optional severity = default; + Optional source = default; + Optional creationTime = default; + Optional isCustomerResolvable = default; + Optional summary = default; + Optional message = default; + Optional causes = default; + Optional recommendation = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("affectedResourceType"u8)) + { + affectedResourceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("affectedResourceCorrelationIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + affectedResourceCorrelationIds = array; + continue; + } + if (property.NameEquals("childErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InnerHealthErrorModel.DeserializeInnerHealthErrorModel(item)); + } + childErrors = array; + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("healthCategory"u8)) + { + healthCategory = property.Value.GetString(); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isCustomerResolvable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isCustomerResolvable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("summary"u8)) + { + summary = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("causes"u8)) + { + causes = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendation"u8)) + { + recommendation = property.Value.GetString(); + continue; + } + } + return new HealthErrorModel(affectedResourceType.Value, Optional.ToList(affectedResourceCorrelationIds), Optional.ToList(childErrors), code.Value, healthCategory.Value, category.Value, severity.Value, source.Value, Optional.ToNullable(creationTime), Optional.ToNullable(isCustomerResolvable), summary.Value, message.Value, causes.Value, recommendation.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.cs new file mode 100644 index 000000000000..a5e1a25e9a37 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Health error model. + public partial class HealthErrorModel + { + /// Initializes a new instance of HealthErrorModel. + internal HealthErrorModel() + { + AffectedResourceCorrelationIds = new ChangeTrackingList(); + ChildErrors = new ChangeTrackingList(); + } + + /// Initializes a new instance of HealthErrorModel. + /// Gets or sets the type of affected resource type. + /// + /// Gets or sets the list of affected resource correlation Ids. This can be used to + /// uniquely identify the count of items affected by a specific category and severity + /// as well as count of item affected by an specific issue. + /// + /// Gets or sets a list of child health errors associated with this error. + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + internal HealthErrorModel(string affectedResourceType, IReadOnlyList affectedResourceCorrelationIds, IReadOnlyList childErrors, string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation) + { + AffectedResourceType = affectedResourceType; + AffectedResourceCorrelationIds = affectedResourceCorrelationIds; + ChildErrors = childErrors; + Code = code; + HealthCategory = healthCategory; + Category = category; + Severity = severity; + Source = source; + CreatedOn = createdOn; + IsCustomerResolvable = isCustomerResolvable; + Summary = summary; + Message = message; + Causes = causes; + Recommendation = recommendation; + } + + /// Gets or sets the type of affected resource type. + public string AffectedResourceType { get; } + /// + /// Gets or sets the list of affected resource correlation Ids. This can be used to + /// uniquely identify the count of items affected by a specific category and severity + /// as well as count of item affected by an specific issue. + /// + public IReadOnlyList AffectedResourceCorrelationIds { get; } + /// Gets or sets a list of child health errors associated with this error. + public IReadOnlyList ChildErrors { get; } + /// Gets or sets the error code. + public string Code { get; } + /// Gets or sets the health category. + public string HealthCategory { get; } + /// Gets or sets the error category. + public string Category { get; } + /// Gets or sets the error severity. + public string Severity { get; } + /// Gets or sets the error source. + public string Source { get; } + /// Gets or sets the error creation time. + public DateTimeOffset? CreatedOn { get; } + /// Gets or sets a value indicating whether the error is customer resolvable. + public bool? IsCustomerResolvable { get; } + /// Gets or sets the error summary. + public string Summary { get; } + /// Gets or sets the error message. + public string Message { get; } + /// Gets or sets possible causes of the error. + public string Causes { get; } + /// Gets or sets recommended action to resolve the error. + public string Recommendation { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs new file mode 100644 index 000000000000..3b93764cfe8a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the fabric health. + public readonly partial struct HealthStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HealthStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NormalValue = "Normal"; + private const string WarningValue = "Warning"; + private const string CriticalValue = "Critical"; + + /// Normal. + public static HealthStatus Normal { get; } = new HealthStatus(NormalValue); + /// Warning. + public static HealthStatus Warning { get; } = new HealthStatus(WarningValue); + /// Critical. + public static HealthStatus Critical { get; } = new HealthStatus(CriticalValue); + /// Determines if two values are the same. + public static bool operator ==(HealthStatus left, HealthStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HealthStatus left, HealthStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HealthStatus(string value) => new HealthStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HealthStatus other && Equals(other); + /// + public bool Equals(HealthStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..dbf2db622963 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVMigrateDraModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static HyperVMigrateDraModelCustomProperties DeserializeHyperVMigrateDraModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FabricType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new HyperVMigrateDraModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs new file mode 100644 index 000000000000..3754d0d4a480 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVMigrate DRA model custom properties. + public partial class HyperVMigrateDraModelCustomProperties : DraModelCustomProperties + { + /// Initializes a new instance of HyperVMigrateDraModelCustomProperties. + public HyperVMigrateDraModelCustomProperties() + { + InstanceType = FabricType.HyperVMigrate; + } + + /// Initializes a new instance of HyperVMigrateDraModelCustomProperties. + /// Gets or sets the instance type. + internal HyperVMigrateDraModelCustomProperties(FabricType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..734fcd51c5b3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVMigrateFabricModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("hyperVSiteId"u8); + writer.WriteStringValue(HyperVSiteId); + writer.WritePropertyName("migrationSolutionId"u8); + writer.WriteStringValue(MigrationSolutionId); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static HyperVMigrateFabricModelCustomProperties DeserializeHyperVMigrateFabricModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hyperVSiteId = default; + Optional fabricResourceId = default; + Optional fabricContainerId = default; + string migrationSolutionId = default; + Optional migrationHubUri = default; + FabricType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hyperVSiteId"u8)) + { + hyperVSiteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricResourceId"u8)) + { + fabricResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricContainerId"u8)) + { + fabricContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrationSolutionId"u8)) + { + migrationSolutionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrationHubUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationHubUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new HyperVMigrateFabricModelCustomProperties(instanceType, hyperVSiteId, fabricResourceId.Value, fabricContainerId.Value, migrationSolutionId, migrationHubUri.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs new file mode 100644 index 000000000000..b6a55ca361d5 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV migrate fabric model custom properties. + public partial class HyperVMigrateFabricModelCustomProperties : FabricModelCustomProperties + { + /// Initializes a new instance of HyperVMigrateFabricModelCustomProperties. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the migration solution ARM Id. + /// or is null. + public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migrationSolutionId) + { + Argument.AssertNotNull(hyperVSiteId, nameof(hyperVSiteId)); + Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); + + HyperVSiteId = hyperVSiteId; + MigrationSolutionId = migrationSolutionId; + InstanceType = FabricType.HyperVMigrate; + } + + /// Initializes a new instance of HyperVMigrateFabricModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the migration solution ARM Id. + /// Gets or sets the migration hub Uri. + internal HyperVMigrateFabricModelCustomProperties(FabricType instanceType, string hyperVSiteId, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) + { + HyperVSiteId = hyperVSiteId; + FabricResourceId = fabricResourceId; + FabricContainerId = fabricContainerId; + MigrationSolutionId = migrationSolutionId; + MigrationHubUri = migrationHubUri; + InstanceType = instanceType; + } + + /// Gets or sets the ARM Id of the HyperV site. + public string HyperVSiteId { get; set; } + /// Gets or sets the fabric resource Id. + public string FabricResourceId { get; } + /// Gets or sets the fabric container Id. + public string FabricContainerId { get; } + /// Gets or sets the migration solution ARM Id. + public string MigrationSolutionId { get; set; } + /// Gets or sets the migration hub Uri. + public Uri MigrationHubUri { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.Serialization.cs new file mode 100644 index 000000000000..5ee3af4bb8eb --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIDiskInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("diskId"u8); + writer.WriteStringValue(DiskId); + if (Optional.IsDefined(StorageContainerId)) + { + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + } + if (Optional.IsDefined(IsDynamic)) + { + writer.WritePropertyName("isDynamic"u8); + writer.WriteBooleanValue(IsDynamic.Value); + } + writer.WritePropertyName("diskSizeGB"u8); + writer.WriteNumberValue(DiskSizeGB); + writer.WritePropertyName("diskFileFormat"u8); + writer.WriteStringValue(DiskFileFormat); + writer.WritePropertyName("isOsDisk"u8); + writer.WriteBooleanValue(IsOSDisk); + writer.WriteEndObject(); + } + + internal static HyperVToAzStackHCIDiskInput DeserializeHyperVToAzStackHCIDiskInput(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string diskId = default; + Optional storageContainerId = default; + Optional isDynamic = default; + long diskSizeGB = default; + string diskFileFormat = default; + bool isOSDisk = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskId"u8)) + { + diskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskSizeGB"u8)) + { + diskSizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskFileFormat"u8)) + { + diskFileFormat = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + isOSDisk = property.Value.GetBoolean(); + continue; + } + } + return new HyperVToAzStackHCIDiskInput(diskId, storageContainerId.Value, Optional.ToNullable(isDynamic), diskSizeGB, diskFileFormat, isOSDisk); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.cs new file mode 100644 index 000000000000..c7d886cea5b1 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStack disk input. + public partial class HyperVToAzStackHCIDiskInput + { + /// Initializes a new instance of HyperVToAzStackHCIDiskInput. + /// Gets or sets the disk Id. + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + /// or is null. + public HyperVToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) + { + Argument.AssertNotNull(diskId, nameof(diskId)); + Argument.AssertNotNull(diskFileFormat, nameof(diskFileFormat)); + + DiskId = diskId; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + } + + /// Initializes a new instance of HyperVToAzStackHCIDiskInput. + /// Gets or sets the disk Id. + /// Gets or sets the target storage account ARM Id. + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + internal HyperVToAzStackHCIDiskInput(string diskId, string storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk) + { + DiskId = diskId; + StorageContainerId = storageContainerId; + IsDynamic = isDynamic; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + } + + /// Gets or sets the disk Id. + public string DiskId { get; set; } + /// Gets or sets the target storage account ARM Id. + public string StorageContainerId { get; set; } + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + public bool? IsDynamic { get; set; } + /// Gets or sets the disk size in GB. + public long DiskSizeGB { get; set; } + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + public string DiskFileFormat { get; set; } + /// Gets or sets a value indicating whether disk is os disk. + public bool IsOSDisk { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..5599bd656ec6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIEventModelCustomProperties + { + internal static HyperVToAzStackHCIEventModelCustomProperties DeserializeHyperVToAzStackHCIEventModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional eventSourceFriendlyName = default; + Optional protectedItemFriendlyName = default; + Optional sourceApplianceName = default; + Optional targetApplianceName = default; + Optional serverType = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventSourceFriendlyName"u8)) + { + eventSourceFriendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectedItemFriendlyName"u8)) + { + protectedItemFriendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceApplianceName"u8)) + { + sourceApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetApplianceName"u8)) + { + targetApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverType"u8)) + { + serverType = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new HyperVToAzStackHCIEventModelCustomProperties(instanceType, eventSourceFriendlyName.Value, protectedItemFriendlyName.Value, sourceApplianceName.Value, targetApplianceName.Value, serverType.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs new file mode 100644 index 000000000000..4e07c14f113c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// HyperV to AzStackHCI event model custom properties. This class provides provider specific + /// details for events of type DataContract.HealthEvents.HealthEventType.ProtectedItemHealth and + /// DataContract.HealthEvents.HealthEventType.AgentHealth. + /// + public partial class HyperVToAzStackHCIEventModelCustomProperties : EventModelCustomProperties + { + /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. + internal HyperVToAzStackHCIEventModelCustomProperties() + { + InstanceType = ReplicationType.HyperVToAzStackHCI; + } + + /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the friendly name of the source which has raised this health event. + /// Gets or sets the protected item friendly name. + /// Gets or sets the source appliance name. + /// Gets or sets the source target name. + /// Gets or sets the server type. + internal HyperVToAzStackHCIEventModelCustomProperties(ReplicationType instanceType, string eventSourceFriendlyName, string protectedItemFriendlyName, string sourceApplianceName, string targetApplianceName, string serverType) : base(instanceType) + { + EventSourceFriendlyName = eventSourceFriendlyName; + ProtectedItemFriendlyName = protectedItemFriendlyName; + SourceApplianceName = sourceApplianceName; + TargetApplianceName = targetApplianceName; + ServerType = serverType; + InstanceType = instanceType; + } + + /// Gets or sets the friendly name of the source which has raised this health event. + public string EventSourceFriendlyName { get; } + /// Gets or sets the protected item friendly name. + public string ProtectedItemFriendlyName { get; } + /// Gets or sets the source appliance name. + public string SourceApplianceName { get; } + /// Gets or sets the source target name. + public string TargetApplianceName { get; } + /// Gets or sets the server type. + public string ServerType { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.Serialization.cs new file mode 100644 index 000000000000..8c910bdf319e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCINicInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("nicId"u8); + writer.WriteStringValue(NicId); + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + writer.WritePropertyName("selectionTypeForFailover"u8); + writer.WriteStringValue(SelectionTypeForFailover.ToString()); + writer.WriteEndObject(); + } + + internal static HyperVToAzStackHCINicInput DeserializeHyperVToAzStackHCINicInput(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nicId = default; + Optional networkName = default; + string targetNetworkId = default; + string testNetworkId = default; + VmNicSelection selectionTypeForFailover = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + } + return new HyperVToAzStackHCINicInput(nicId, networkName.Value, targetNetworkId, testNetworkId, selectionTypeForFailover); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.cs new file mode 100644 index 000000000000..7dcc194a0b79 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStackHCI NIC properties. + public partial class HyperVToAzStackHCINicInput + { + /// Initializes a new instance of HyperVToAzStackHCINicInput. + /// Gets or sets the NIC Id. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// , or is null. + public HyperVToAzStackHCINicInput(string nicId, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + { + Argument.AssertNotNull(nicId, nameof(nicId)); + Argument.AssertNotNull(targetNetworkId, nameof(targetNetworkId)); + Argument.AssertNotNull(testNetworkId, nameof(testNetworkId)); + + NicId = nicId; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Initializes a new instance of HyperVToAzStackHCINicInput. + /// Gets or sets the NIC Id. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + internal HyperVToAzStackHCINicInput(string nicId, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + { + NicId = nicId; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Gets or sets the NIC Id. + public string NicId { get; set; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection SelectionTypeForFailover { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..7fca915da158 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIPlannedFailoverModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("shutdownSourceVM"u8); + writer.WriteBooleanValue(ShutdownSourceVm); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static HyperVToAzStackHCIPlannedFailoverModelCustomProperties DeserializeHyperVToAzStackHCIPlannedFailoverModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool shutdownSourceVm = default; + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("shutdownSourceVM"u8)) + { + shutdownSourceVm = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new HyperVToAzStackHCIPlannedFailoverModelCustomProperties(instanceType, shutdownSourceVm); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs new file mode 100644 index 000000000000..7f0b773474ff --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI planned failover model custom properties. + public partial class HyperVToAzStackHCIPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties + { + /// Initializes a new instance of HyperVToAzStackHCIPlannedFailoverModelCustomProperties. + /// Gets or sets a value indicating whether VM needs to be shut down. + public HyperVToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of HyperVToAzStackHCIPlannedFailoverModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets a value indicating whether VM needs to be shut down. + internal HyperVToAzStackHCIPlannedFailoverModelCustomProperties(string instanceType, bool shutdownSourceVm) : base(instanceType) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Gets or sets a value indicating whether VM needs to be shut down. + public bool ShutdownSourceVm { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..c374df26a63b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIPolicyModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("recoveryPointHistoryInMinutes"u8); + writer.WriteNumberValue(RecoveryPointHistoryInMinutes); + writer.WritePropertyName("crashConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(CrashConsistentFrequencyInMinutes); + writer.WritePropertyName("appConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(AppConsistentFrequencyInMinutes); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static HyperVToAzStackHCIPolicyModelCustomProperties DeserializeHyperVToAzStackHCIPolicyModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int recoveryPointHistoryInMinutes = default; + int crashConsistentFrequencyInMinutes = default; + int appConsistentFrequencyInMinutes = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointHistoryInMinutes"u8)) + { + recoveryPointHistoryInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("crashConsistentFrequencyInMinutes"u8)) + { + crashConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("appConsistentFrequencyInMinutes"u8)) + { + appConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new HyperVToAzStackHCIPolicyModelCustomProperties(instanceType, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs new file mode 100644 index 000000000000..19283563729e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV To AzStackHCI Policy model custom properties. + public partial class HyperVToAzStackHCIPolicyModelCustomProperties : PolicyModelCustomProperties + { + /// Initializes a new instance of HyperVToAzStackHCIPolicyModelCustomProperties. + /// + /// Gets or sets the duration in minutes until which the recovery points need to be + /// stored. + /// + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = ReplicationType.HyperVToAzStackHCI; + } + + /// Initializes a new instance of HyperVToAzStackHCIPolicyModelCustomProperties. + /// Gets or sets the instance type. + /// + /// Gets or sets the duration in minutes until which the recovery points need to be + /// stored. + /// + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + internal HyperVToAzStackHCIPolicyModelCustomProperties(ReplicationType instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = instanceType; + } + + /// + /// Gets or sets the duration in minutes until which the recovery points need to be + /// stored. + /// + public int RecoveryPointHistoryInMinutes { get; set; } + /// Gets or sets the crash consistent snapshot frequency (in minutes). + public int CrashConsistentFrequencyInMinutes { get; set; } + /// Gets or sets the app consistent snapshot frequency (in minutes). + public int AppConsistentFrequencyInMinutes { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs new file mode 100644 index 000000000000..e1d3c18cd907 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIProtectedDiskProperties + { + internal static HyperVToAzStackHCIProtectedDiskProperties DeserializeHyperVToAzStackHCIProtectedDiskProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional storageContainerId = default; + Optional storageContainerLocalPath = default; + Optional sourceDiskId = default; + Optional sourceDiskName = default; + Optional seedDiskName = default; + Optional testMigrateDiskName = default; + Optional migrateDiskName = default; + Optional isOSDisk = default; + Optional capacityInBytes = default; + Optional isDynamic = default; + Optional diskType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerLocalPath"u8)) + { + storageContainerLocalPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskId"u8)) + { + sourceDiskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskName"u8)) + { + sourceDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("seedDiskName"u8)) + { + seedDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("testMigrateDiskName"u8)) + { + testMigrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrateDiskName"u8)) + { + migrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isOSDisk = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("capacityInBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityInBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskType"u8)) + { + diskType = property.Value.GetString(); + continue; + } + } + return new HyperVToAzStackHCIProtectedDiskProperties(storageContainerId.Value, storageContainerLocalPath.Value, sourceDiskId.Value, sourceDiskName.Value, seedDiskName.Value, testMigrateDiskName.Value, migrateDiskName.Value, Optional.ToNullable(isOSDisk), Optional.ToNullable(capacityInBytes), Optional.ToNullable(isDynamic), diskType.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.cs new file mode 100644 index 000000000000..0c61f57100f9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStackHCI protected disk properties. + public partial class HyperVToAzStackHCIProtectedDiskProperties + { + /// Initializes a new instance of HyperVToAzStackHCIProtectedDiskProperties. + internal HyperVToAzStackHCIProtectedDiskProperties() + { + } + + /// Initializes a new instance of HyperVToAzStackHCIProtectedDiskProperties. + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + /// Gets or sets the disk type. + internal HyperVToAzStackHCIProtectedDiskProperties(string storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType) + { + StorageContainerId = storageContainerId; + StorageContainerLocalPath = storageContainerLocalPath; + SourceDiskId = sourceDiskId; + SourceDiskName = sourceDiskName; + SeedDiskName = seedDiskName; + TestMigrateDiskName = testMigrateDiskName; + MigrateDiskName = migrateDiskName; + IsOSDisk = isOSDisk; + CapacityInBytes = capacityInBytes; + IsDynamic = isDynamic; + DiskType = diskType; + } + + /// Gets or sets the ARM Id of the storage container. + public string StorageContainerId { get; } + /// Gets or sets the local path of the storage container. + public string StorageContainerLocalPath { get; } + /// Gets or sets the source disk Id. + public string SourceDiskId { get; } + /// Gets or sets the source disk Name. + public string SourceDiskName { get; } + /// Gets or sets the seed disk name. + public string SeedDiskName { get; } + /// Gets or sets the test failover clone disk. + public string TestMigrateDiskName { get; } + /// Gets or sets the failover clone disk. + public string MigrateDiskName { get; } + /// Gets or sets a value indicating whether the disk is the OS disk. + public bool? IsOSDisk { get; } + /// Gets or sets the disk capacity in bytes. + public long? CapacityInBytes { get; } + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + public bool? IsDynamic { get; } + /// Gets or sets the disk type. + public string DiskType { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..04ba97809b46 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs @@ -0,0 +1,418 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIProtectedItemModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("targetHciClusterId"u8); + writer.WriteStringValue(TargetHciClusterId); + writer.WritePropertyName("targetArcClusterCustomLocationId"u8); + writer.WriteStringValue(TargetArcClusterCustomLocationId); + writer.WritePropertyName("fabricDiscoveryMachineId"u8); + writer.WriteStringValue(FabricDiscoveryMachineId); + writer.WritePropertyName("disksToInclude"u8); + writer.WriteStartArray(); + foreach (var item in DisksToInclude) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("nicsToInclude"u8); + writer.WriteStartArray(); + foreach (var item in NicsToInclude) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(TargetVmName)) + { + writer.WritePropertyName("targetVmName"u8); + writer.WriteStringValue(TargetVmName); + } + writer.WritePropertyName("targetResourceGroupId"u8); + writer.WriteStringValue(TargetResourceGroupId); + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + writer.WritePropertyName("hyperVGeneration"u8); + writer.WriteStringValue(HyperVGeneration); + if (Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + if (Optional.IsDefined(TargetCpuCores)) + { + writer.WritePropertyName("targetCpuCores"u8); + writer.WriteNumberValue(TargetCpuCores.Value); + } + if (Optional.IsDefined(IsDynamicRam)) + { + writer.WritePropertyName("isDynamicRam"u8); + writer.WriteBooleanValue(IsDynamicRam.Value); + } + if (Optional.IsDefined(DynamicMemoryConfig)) + { + writer.WritePropertyName("dynamicMemoryConfig"u8); + writer.WriteObjectValue(DynamicMemoryConfig); + } + if (Optional.IsDefined(TargetMemoryInMegaBytes)) + { + writer.WritePropertyName("targetMemoryInMegaBytes"u8); + writer.WriteNumberValue(TargetMemoryInMegaBytes.Value); + } + writer.WritePropertyName("runAsAccountId"u8); + writer.WriteStringValue(RunAsAccountId); + writer.WritePropertyName("sourceDraName"u8); + writer.WriteStringValue(SourceDraName); + writer.WritePropertyName("targetDraName"u8); + writer.WriteStringValue(TargetDraName); + writer.WritePropertyName("customLocationRegion"u8); + writer.WriteStringValue(CustomLocationRegion); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static HyperVToAzStackHCIProtectedItemModelCustomProperties DeserializeHyperVToAzStackHCIProtectedItemModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional activeLocation = default; + string targetHciClusterId = default; + string targetArcClusterCustomLocationId = default; + Optional targetAzStackHciClusterName = default; + string fabricDiscoveryMachineId = default; + IList disksToInclude = default; + IList nicsToInclude = default; + Optional sourceVmName = default; + Optional sourceCpuCores = default; + Optional sourceMemoryInMegaBytes = default; + Optional targetVmName = default; + string targetResourceGroupId = default; + string storageContainerId = default; + string hyperVGeneration = default; + Optional targetNetworkId = default; + Optional testNetworkId = default; + Optional targetCpuCores = default; + Optional isDynamicRam = default; + Optional dynamicMemoryConfig = default; + Optional targetMemoryInMegaBytes = default; + string runAsAccountId = default; + string sourceDraName = default; + string targetDraName = default; + Optional sourceApplianceName = default; + Optional targetApplianceName = default; + Optional osType = default; + Optional osName = default; + Optional firmwareType = default; + Optional targetLocation = default; + string customLocationRegion = default; + Optional failoverRecoveryPointId = default; + Optional lastRecoveryPointReceived = default; + Optional lastRecoveryPointId = default; + Optional initialReplicationProgressPercentage = default; + Optional resyncProgressPercentage = default; + Optional> protectedDisks = default; + Optional> protectedNics = default; + Optional targetVmBiosId = default; + Optional lastReplicationUpdateTime = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("activeLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeLocation = new ProtectedItemActiveLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetHciClusterId"u8)) + { + targetHciClusterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetArcClusterCustomLocationId"u8)) + { + targetArcClusterCustomLocationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetAzStackHciClusterName"u8)) + { + targetAzStackHciClusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricDiscoveryMachineId"u8)) + { + fabricDiscoveryMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("disksToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHCIDiskInput.DeserializeHyperVToAzStackHCIDiskInput(item)); + } + disksToInclude = array; + continue; + } + if (property.NameEquals("nicsToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHCINicInput.DeserializeHyperVToAzStackHCINicInput(item)); + } + nicsToInclude = array; + continue; + } + if (property.NameEquals("sourceVmName"u8)) + { + sourceVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sourceMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceMemoryInMegaBytes = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("targetVmName"u8)) + { + targetVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceGroupId"u8)) + { + targetResourceGroupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("hyperVGeneration"u8)) + { + hyperVGeneration = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isDynamicRam"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamicRam = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dynamicMemoryConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicMemoryConfig = ProtectedItemDynamicMemoryConfig.DeserializeProtectedItemDynamicMemoryConfig(property.Value); + continue; + } + if (property.NameEquals("targetMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetMemoryInMegaBytes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runAsAccountId"u8)) + { + runAsAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDraName"u8)) + { + sourceDraName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetDraName"u8)) + { + targetDraName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceApplianceName"u8)) + { + sourceApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetApplianceName"u8)) + { + targetApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = property.Value.GetString(); + continue; + } + if (property.NameEquals("osName"u8)) + { + osName = property.Value.GetString(); + continue; + } + if (property.NameEquals("firmwareType"u8)) + { + firmwareType = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetLocation"u8)) + { + targetLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("customLocationRegion"u8)) + { + customLocationRegion = property.Value.GetString(); + continue; + } + if (property.NameEquals("failoverRecoveryPointId"u8)) + { + failoverRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastRecoveryPointReceived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRecoveryPointReceived = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastRecoveryPointId"u8)) + { + lastRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("initialReplicationProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialReplicationProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resyncProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("protectedDisks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHCIProtectedDiskProperties.DeserializeHyperVToAzStackHCIProtectedDiskProperties(item)); + } + protectedDisks = array; + continue; + } + if (property.NameEquals("protectedNics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHCIProtectedNicProperties.DeserializeHyperVToAzStackHCIProtectedNicProperties(item)); + } + protectedNics = array; + continue; + } + if (property.NameEquals("targetVmBiosId"u8)) + { + targetVmBiosId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastReplicationUpdateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastReplicationUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new HyperVToAzStackHCIProtectedItemModelCustomProperties(instanceType, Optional.ToNullable(activeLocation), targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName.Value, fabricDiscoveryMachineId, disksToInclude, nicsToInclude, sourceVmName.Value, Optional.ToNullable(sourceCpuCores), Optional.ToNullable(sourceMemoryInMegaBytes), targetVmName.Value, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(targetCpuCores), Optional.ToNullable(isDynamicRam), dynamicMemoryConfig.Value, Optional.ToNullable(targetMemoryInMegaBytes), runAsAccountId, sourceDraName, targetDraName, sourceApplianceName.Value, targetApplianceName.Value, osType.Value, osName.Value, firmwareType.Value, targetLocation.Value, customLocationRegion, failoverRecoveryPointId.Value, Optional.ToNullable(lastRecoveryPointReceived), lastRecoveryPointId.Value, Optional.ToNullable(initialReplicationProgressPercentage), Optional.ToNullable(resyncProgressPercentage), Optional.ToList(protectedDisks), Optional.ToList(protectedNics), targetVmBiosId.Value, Optional.ToNullable(lastReplicationUpdateTime)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs new file mode 100644 index 000000000000..de082c7d12de --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI Protected item model custom properties. + public partial class HyperVToAzStackHCIProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties + { + /// Initializes a new instance of HyperVToAzStackHCIProtectedItemModelCustomProperties. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the hypervisor generation of the virtual machine. + /// Gets or sets the Run As account Id. + /// Gets or sets the source DRA name. + /// Gets or sets the target DRA name. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// , , , , , , , , , , or is null. + public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string fabricDiscoveryMachineId, IEnumerable disksToInclude, IEnumerable nicsToInclude, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceDraName, string targetDraName, string customLocationRegion) + { + Argument.AssertNotNull(targetHciClusterId, nameof(targetHciClusterId)); + Argument.AssertNotNull(targetArcClusterCustomLocationId, nameof(targetArcClusterCustomLocationId)); + Argument.AssertNotNull(fabricDiscoveryMachineId, nameof(fabricDiscoveryMachineId)); + Argument.AssertNotNull(disksToInclude, nameof(disksToInclude)); + Argument.AssertNotNull(nicsToInclude, nameof(nicsToInclude)); + Argument.AssertNotNull(targetResourceGroupId, nameof(targetResourceGroupId)); + Argument.AssertNotNull(storageContainerId, nameof(storageContainerId)); + Argument.AssertNotNull(hyperVGeneration, nameof(hyperVGeneration)); + Argument.AssertNotNull(runAsAccountId, nameof(runAsAccountId)); + Argument.AssertNotNull(sourceDraName, nameof(sourceDraName)); + Argument.AssertNotNull(targetDraName, nameof(targetDraName)); + Argument.AssertNotNull(customLocationRegion, nameof(customLocationRegion)); + + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + DisksToInclude = disksToInclude.ToList(); + NicsToInclude = nicsToInclude.ToList(); + TargetResourceGroupId = targetResourceGroupId; + StorageContainerId = storageContainerId; + HyperVGeneration = hyperVGeneration; + RunAsAccountId = runAsAccountId; + SourceDraName = sourceDraName; + TargetDraName = targetDraName; + CustomLocationRegion = customLocationRegion; + ProtectedDisks = new ChangeTrackingList(); + ProtectedNics = new ChangeTrackingList(); + InstanceType = ReplicationType.HyperVToAzStackHCI; + } + + /// Initializes a new instance of HyperVToAzStackHCIProtectedItemModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the target VM display name. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the hypervisor generation of the virtual machine. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the Run As account Id. + /// Gets or sets the source DRA name. + /// Gets or sets the target DRA name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// + /// Gets or sets the initial replication progress percentage. This is calculated based on + /// total bytes processed for all disks in the source VM. + /// + /// + /// Gets or sets the resync progress percentage. This is calculated based on total bytes + /// processed for all disks in the source VM. + /// + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the latest timestamp that replication status is updated. + internal HyperVToAzStackHCIProtectedItemModelCustomProperties(ReplicationType instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string fabricDiscoveryMachineId, IList disksToInclude, IList nicsToInclude, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string targetVmName, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string osType, string osName, string firmwareType, string targetLocation, string customLocationRegion, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? resyncProgressPercentage, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) + { + ActiveLocation = activeLocation; + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + TargetAzStackHciClusterName = targetAzStackHciClusterName; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + DisksToInclude = disksToInclude; + NicsToInclude = nicsToInclude; + SourceVmName = sourceVmName; + SourceCpuCores = sourceCpuCores; + SourceMemoryInMegaBytes = sourceMemoryInMegaBytes; + TargetVmName = targetVmName; + TargetResourceGroupId = targetResourceGroupId; + StorageContainerId = storageContainerId; + HyperVGeneration = hyperVGeneration; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + TargetCpuCores = targetCpuCores; + IsDynamicRam = isDynamicRam; + DynamicMemoryConfig = dynamicMemoryConfig; + TargetMemoryInMegaBytes = targetMemoryInMegaBytes; + RunAsAccountId = runAsAccountId; + SourceDraName = sourceDraName; + TargetDraName = targetDraName; + SourceApplianceName = sourceApplianceName; + TargetApplianceName = targetApplianceName; + OSType = osType; + OSName = osName; + FirmwareType = firmwareType; + TargetLocation = targetLocation; + CustomLocationRegion = customLocationRegion; + FailoverRecoveryPointId = failoverRecoveryPointId; + LastRecoveryPointReceived = lastRecoveryPointReceived; + LastRecoveryPointId = lastRecoveryPointId; + InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + ResyncProgressPercentage = resyncProgressPercentage; + ProtectedDisks = protectedDisks; + ProtectedNics = protectedNics; + TargetVmBiosId = targetVmBiosId; + LastReplicationUpdateOn = lastReplicationUpdateOn; + InstanceType = instanceType; + } + + /// Gets or sets the location of the protected item. + public ProtectedItemActiveLocation? ActiveLocation { get; } + /// Gets or sets the Target HCI Cluster ARM Id. + public string TargetHciClusterId { get; set; } + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + public string TargetArcClusterCustomLocationId { get; set; } + /// Gets or sets the Target AzStackHCI cluster name. + public string TargetAzStackHciClusterName { get; } + /// Gets or sets the ARM Id of the discovered machine. + public string FabricDiscoveryMachineId { get; set; } + /// Gets or sets the list of disks to replicate. + public IList DisksToInclude { get; } + /// Gets or sets the list of VM NIC to replicate. + public IList NicsToInclude { get; } + /// Gets or sets the source VM display name. + public string SourceVmName { get; } + /// Gets or sets the source VM CPU cores. + public int? SourceCpuCores { get; } + /// Gets or sets the source VM ram memory size in megabytes. + public double? SourceMemoryInMegaBytes { get; } + /// Gets or sets the target VM display name. + public string TargetVmName { get; set; } + /// Gets or sets the target resource group ARM Id. + public string TargetResourceGroupId { get; set; } + /// Gets or sets the target storage container ARM Id. + public string StorageContainerId { get; set; } + /// Gets or sets the hypervisor generation of the virtual machine. + public string HyperVGeneration { get; set; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the target CPU cores. + public int? TargetCpuCores { get; set; } + /// Gets or sets a value indicating whether memory is dynamical. + public bool? IsDynamicRam { get; set; } + /// Protected item dynamic memory config. + public ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get; set; } + /// Gets or sets the target memory in mega-bytes. + public int? TargetMemoryInMegaBytes { get; set; } + /// Gets or sets the Run As account Id. + public string RunAsAccountId { get; set; } + /// Gets or sets the source DRA name. + public string SourceDraName { get; set; } + /// Gets or sets the target DRA name. + public string TargetDraName { get; set; } + /// Gets or sets the source appliance name. + public string SourceApplianceName { get; } + /// Gets or sets the target appliance name. + public string TargetApplianceName { get; } + /// Gets or sets the type of the OS. + public string OSType { get; } + /// Gets or sets the name of the OS. + public string OSName { get; } + /// Gets or sets the firmware type. + public string FirmwareType { get; } + /// Gets or sets the target location. + public string TargetLocation { get; } + /// Gets or sets the location of Azure Arc HCI custom location resource. + public string CustomLocationRegion { get; set; } + /// Gets or sets the recovery point Id to which the VM was failed over. + public string FailoverRecoveryPointId { get; } + /// Gets or sets the last recovery point received time. + public DateTimeOffset? LastRecoveryPointReceived { get; } + /// Gets or sets the last recovery point Id. + public string LastRecoveryPointId { get; } + /// + /// Gets or sets the initial replication progress percentage. This is calculated based on + /// total bytes processed for all disks in the source VM. + /// + public int? InitialReplicationProgressPercentage { get; } + /// + /// Gets or sets the resync progress percentage. This is calculated based on total bytes + /// processed for all disks in the source VM. + /// + public int? ResyncProgressPercentage { get; } + /// Gets or sets the list of protected disks. + public IReadOnlyList ProtectedDisks { get; } + /// Gets or sets the VM NIC details. + public IReadOnlyList ProtectedNics { get; } + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + public string TargetVmBiosId { get; } + /// Gets or sets the latest timestamp that replication status is updated. + public DateTimeOffset? LastReplicationUpdateOn { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.Serialization.cs new file mode 100644 index 000000000000..538b20501b9f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIProtectedNicProperties + { + internal static HyperVToAzStackHCIProtectedNicProperties DeserializeHyperVToAzStackHCIProtectedNicProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nicId = default; + Optional macAddress = default; + Optional networkName = default; + Optional targetNetworkId = default; + Optional testNetworkId = default; + Optional selectionTypeForFailover = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("macAddress"u8)) + { + macAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + } + return new HyperVToAzStackHCIProtectedNicProperties(nicId.Value, macAddress.Value, networkName.Value, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(selectionTypeForFailover)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.cs new file mode 100644 index 000000000000..f45a66cbd0c2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStackHCI NIC properties. + public partial class HyperVToAzStackHCIProtectedNicProperties + { + /// Initializes a new instance of HyperVToAzStackHCIProtectedNicProperties. + internal HyperVToAzStackHCIProtectedNicProperties() + { + } + + /// Initializes a new instance of HyperVToAzStackHCIProtectedNicProperties. + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + internal HyperVToAzStackHCIProtectedNicProperties(string nicId, string macAddress, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover) + { + NicId = nicId; + MacAddress = macAddress; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Gets or sets the NIC Id. + public string NicId { get; } + /// Gets or sets the NIC mac address. + public string MacAddress { get; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection? SelectionTypeForFailover { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..2d9ab87a36f3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIRecoveryPointModelCustomProperties + { + internal static HyperVToAzStackHCIRecoveryPointModelCustomProperties DeserializeHyperVToAzStackHCIRecoveryPointModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> diskIds = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + diskIds = array; + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new HyperVToAzStackHCIRecoveryPointModelCustomProperties(instanceType, Optional.ToList(diskIds)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs new file mode 100644 index 000000000000..3de0be11178f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI recovery point model custom properties. + public partial class HyperVToAzStackHCIRecoveryPointModelCustomProperties : RecoveryPointModelCustomProperties + { + /// Initializes a new instance of HyperVToAzStackHCIRecoveryPointModelCustomProperties. + internal HyperVToAzStackHCIRecoveryPointModelCustomProperties() + { + DiskIds = new ChangeTrackingList(); + InstanceType = ReplicationType.HyperVToAzStackHCI; + } + + /// Initializes a new instance of HyperVToAzStackHCIRecoveryPointModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the list of the disk Ids. + internal HyperVToAzStackHCIRecoveryPointModelCustomProperties(ReplicationType instanceType, IReadOnlyList diskIds) : base(instanceType) + { + DiskIds = diskIds; + InstanceType = instanceType; + } + + /// Gets or sets the list of the disk Ids. + public IReadOnlyList DiskIds { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..91bb0ac8e21f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHCIReplicationExtensionModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("hyperVFabricArmId"u8); + writer.WriteStringValue(HyperVFabricArmId); + writer.WritePropertyName("azStackHciFabricArmId"u8); + writer.WriteStringValue(AzStackHciFabricArmId); + if (Optional.IsDefined(StorageAccountId)) + { + writer.WritePropertyName("storageAccountId"u8); + writer.WriteStringValue(StorageAccountId); + } + if (Optional.IsDefined(StorageAccountSasSecretName)) + { + writer.WritePropertyName("storageAccountSasSecretName"u8); + writer.WriteStringValue(StorageAccountSasSecretName); + } + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static HyperVToAzStackHCIReplicationExtensionModelCustomProperties DeserializeHyperVToAzStackHCIReplicationExtensionModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hyperVFabricArmId = default; + Optional hyperVSiteId = default; + string azStackHciFabricArmId = default; + Optional azStackHciSiteId = default; + Optional storageAccountId = default; + Optional storageAccountSasSecretName = default; + Optional asrServiceUri = default; + Optional rcmServiceUri = default; + Optional gatewayServiceUri = default; + Optional sourceGatewayServiceId = default; + Optional targetGatewayServiceId = default; + Optional sourceStorageContainerName = default; + Optional targetStorageContainerName = default; + Optional resourceLocation = default; + Optional subscriptionId = default; + Optional resourceGroup = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hyperVFabricArmId"u8)) + { + hyperVFabricArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("hyperVSiteId"u8)) + { + hyperVSiteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("azStackHciFabricArmId"u8)) + { + azStackHciFabricArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("azStackHciSiteId"u8)) + { + azStackHciSiteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountId"u8)) + { + storageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountSasSecretName"u8)) + { + storageAccountSasSecretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("asrServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + asrServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("rcmServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rcmServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("gatewayServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceGatewayServiceId"u8)) + { + sourceGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetGatewayServiceId"u8)) + { + targetGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceStorageContainerName"u8)) + { + sourceStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetStorageContainerName"u8)) + { + targetStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new HyperVToAzStackHCIReplicationExtensionModelCustomProperties(instanceType, hyperVFabricArmId, hyperVSiteId.Value, azStackHciFabricArmId, azStackHciSiteId.Value, storageAccountId.Value, storageAccountSasSecretName.Value, asrServiceUri.Value, rcmServiceUri.Value, gatewayServiceUri.Value, sourceGatewayServiceId.Value, targetGatewayServiceId.Value, sourceStorageContainerName.Value, targetStorageContainerName.Value, resourceLocation.Value, subscriptionId.Value, resourceGroup.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs new file mode 100644 index 000000000000..022fc235573b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI Replication extension model custom properties. + public partial class HyperVToAzStackHCIReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties + { + /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. + /// Gets or sets the ARM Id of the source HyperV fabric. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// or is null. + public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId, string azStackHciFabricArmId) + { + Argument.AssertNotNull(hyperVFabricArmId, nameof(hyperVFabricArmId)); + Argument.AssertNotNull(azStackHciFabricArmId, nameof(azStackHciFabricArmId)); + + HyperVFabricArmId = hyperVFabricArmId; + AzStackHciFabricArmId = azStackHciFabricArmId; + InstanceType = ReplicationType.HyperVToAzStackHCI; + } + + /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the ARM Id of the source HyperV fabric. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + internal HyperVToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType instanceType, string hyperVFabricArmId, string hyperVSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) + { + HyperVFabricArmId = hyperVFabricArmId; + HyperVSiteId = hyperVSiteId; + AzStackHciFabricArmId = azStackHciFabricArmId; + AzStackHciSiteId = azStackHciSiteId; + StorageAccountId = storageAccountId; + StorageAccountSasSecretName = storageAccountSasSecretName; + AsrServiceUri = asrServiceUri; + RcmServiceUri = rcmServiceUri; + GatewayServiceUri = gatewayServiceUri; + SourceGatewayServiceId = sourceGatewayServiceId; + TargetGatewayServiceId = targetGatewayServiceId; + SourceStorageContainerName = sourceStorageContainerName; + TargetStorageContainerName = targetStorageContainerName; + ResourceLocation = resourceLocation; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + InstanceType = instanceType; + } + + /// Gets or sets the ARM Id of the source HyperV fabric. + public string HyperVFabricArmId { get; set; } + /// Gets or sets the ARM Id of the HyperV site. + public string HyperVSiteId { get; } + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + public string AzStackHciFabricArmId { get; set; } + /// Gets or sets the ARM Id of the AzStackHCI site. + public string AzStackHciSiteId { get; } + /// Gets or sets the storage account Id. + public string StorageAccountId { get; set; } + /// Gets or sets the Sas Secret of storage account. + public string StorageAccountSasSecretName { get; set; } + /// Gets or sets the Uri of ASR. + public Uri AsrServiceUri { get; } + /// Gets or sets the Uri of Rcm. + public Uri RcmServiceUri { get; } + /// Gets or sets the Uri of Gateway. + public Uri GatewayServiceUri { get; } + /// Gets or sets the gateway service Id of source. + public string SourceGatewayServiceId { get; } + /// Gets or sets the gateway service Id of target. + public string TargetGatewayServiceId { get; } + /// Gets or sets the source storage container name. + public string SourceStorageContainerName { get; } + /// Gets or sets the target storage container name. + public string TargetStorageContainerName { get; } + /// Gets or sets the resource location. + public string ResourceLocation { get; } + /// Gets or sets the subscription. + public string SubscriptionId { get; } + /// Gets or sets the resource group. + public string ResourceGroup { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.Serialization.cs new file mode 100644 index 000000000000..33db45029454 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class IdentityModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + writer.WritePropertyName("applicationId"u8); + writer.WriteStringValue(ApplicationId); + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId); + writer.WritePropertyName("audience"u8); + writer.WriteStringValue(Audience); + writer.WritePropertyName("aadAuthority"u8); + writer.WriteStringValue(AadAuthority); + writer.WriteEndObject(); + } + + internal static IdentityModel DeserializeIdentityModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid tenantId = default; + string applicationId = default; + string objectId = default; + string audience = default; + string aadAuthority = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("applicationId"u8)) + { + applicationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("audience"u8)) + { + audience = property.Value.GetString(); + continue; + } + if (property.NameEquals("aadAuthority"u8)) + { + aadAuthority = property.Value.GetString(); + continue; + } + } + return new IdentityModel(tenantId, applicationId, objectId, audience, aadAuthority); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.cs new file mode 100644 index 000000000000..05238397442e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Identity model. + public partial class IdentityModel + { + /// Initializes a new instance of IdentityModel. + /// Gets or sets the tenant Id of the SPN with which Dra communicates to service. + /// + /// Gets or sets the client/application Id of the SPN with which Dra communicates to + /// service. + /// + /// Gets or sets the object Id of the SPN with which Dra communicates to service. + /// Gets or sets the audience of the SPN with which Dra communicates to service. + /// Gets or sets the authority of the SPN with which Dra communicates to service. + /// , , or is null. + public IdentityModel(Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) + { + Argument.AssertNotNull(applicationId, nameof(applicationId)); + Argument.AssertNotNull(objectId, nameof(objectId)); + Argument.AssertNotNull(audience, nameof(audience)); + Argument.AssertNotNull(aadAuthority, nameof(aadAuthority)); + + TenantId = tenantId; + ApplicationId = applicationId; + ObjectId = objectId; + Audience = audience; + AadAuthority = aadAuthority; + } + + /// Gets or sets the tenant Id of the SPN with which Dra communicates to service. + public Guid TenantId { get; set; } + /// + /// Gets or sets the client/application Id of the SPN with which Dra communicates to + /// service. + /// + public string ApplicationId { get; set; } + /// Gets or sets the object Id of the SPN with which Dra communicates to service. + public string ObjectId { get; set; } + /// Gets or sets the audience of the SPN with which Dra communicates to service. + public string Audience { get; set; } + /// Gets or sets the authority of the SPN with which Dra communicates to service. + public string AadAuthority { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.Serialization.cs new file mode 100644 index 000000000000..9137f827ca44 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class InnerHealthErrorModel + { + internal static InnerHealthErrorModel DeserializeInnerHealthErrorModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional code = default; + Optional healthCategory = default; + Optional category = default; + Optional severity = default; + Optional source = default; + Optional creationTime = default; + Optional isCustomerResolvable = default; + Optional summary = default; + Optional message = default; + Optional causes = default; + Optional recommendation = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("healthCategory"u8)) + { + healthCategory = property.Value.GetString(); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isCustomerResolvable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isCustomerResolvable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("summary"u8)) + { + summary = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("causes"u8)) + { + causes = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendation"u8)) + { + recommendation = property.Value.GetString(); + continue; + } + } + return new InnerHealthErrorModel(code.Value, healthCategory.Value, category.Value, severity.Value, source.Value, Optional.ToNullable(creationTime), Optional.ToNullable(isCustomerResolvable), summary.Value, message.Value, causes.Value, recommendation.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.cs new file mode 100644 index 000000000000..7a844ab3db35 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Inner health error model. + public partial class InnerHealthErrorModel + { + /// Initializes a new instance of InnerHealthErrorModel. + internal InnerHealthErrorModel() + { + } + + /// Initializes a new instance of InnerHealthErrorModel. + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + internal InnerHealthErrorModel(string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation) + { + Code = code; + HealthCategory = healthCategory; + Category = category; + Severity = severity; + Source = source; + CreatedOn = createdOn; + IsCustomerResolvable = isCustomerResolvable; + Summary = summary; + Message = message; + Causes = causes; + Recommendation = recommendation; + } + + /// Gets or sets the error code. + public string Code { get; } + /// Gets or sets the health category. + public string HealthCategory { get; } + /// Gets or sets the error category. + public string Category { get; } + /// Gets or sets the error severity. + public string Severity { get; } + /// Gets or sets the error source. + public string Source { get; } + /// Gets or sets the error creation time. + public DateTimeOffset? CreatedOn { get; } + /// Gets or sets a value indicating whether the error is customer resolvable. + public bool? IsCustomerResolvable { get; } + /// Gets or sets the error summary. + public string Summary { get; } + /// Gets or sets the error message. + public string Message { get; } + /// Gets or sets possible causes of the error. + public string Causes { get; } + /// Gets or sets recommended action to resolve the error. + public string Recommendation { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs new file mode 100644 index 000000000000..5e6bca7f44e9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class OperationStatus + { + internal static OperationStatus DeserializeOperationStatus(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional name = default; + Optional status = default; + Optional startTime = default; + Optional endTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("endTime"u8)) + { + endTime = property.Value.GetString(); + continue; + } + } + return new OperationStatus(id.Value, name.Value, status.Value, startTime.Value, endTime.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs new file mode 100644 index 000000000000..6610a81eb54f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Defines the operation status. + public partial class OperationStatus + { + /// Initializes a new instance of OperationStatus. + internal OperationStatus() + { + } + + /// Initializes a new instance of OperationStatus. + /// Gets or sets the Id. + /// Gets or sets the operation name. + /// + /// Gets or sets the status of the operation. ARM expects the terminal status to be one of + /// Succeeded/ Failed/ Canceled. All other values imply that the operation is still running. + /// + /// Gets or sets the start time. + /// Gets or sets the end time. + internal OperationStatus(string id, string name, string status, string startTime, string endTime) + { + Id = id; + Name = name; + Status = status; + StartTime = startTime; + EndTime = endTime; + } + + /// Gets or sets the Id. + public string Id { get; } + /// Gets or sets the operation name. + public string Name { get; } + /// + /// Gets or sets the status of the operation. ARM expects the terminal status to be one of + /// Succeeded/ Failed/ Canceled. All other values imply that the operation is still running. + /// + public string Status { get; } + /// Gets or sets the start time. + public string StartTime { get; } + /// Gets or sets the end time. + public string EndTime { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.Serialization.cs new file mode 100644 index 000000000000..a1247727657b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class PlannedFailoverModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static PlannedFailoverModel DeserializePlannedFailoverModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlannedFailoverModelProperties properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = PlannedFailoverModelProperties.DeserializePlannedFailoverModelProperties(property.Value); + continue; + } + } + return new PlannedFailoverModel(properties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs new file mode 100644 index 000000000000..a79973240dd3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Planned failover model. + public partial class PlannedFailoverModel + { + /// Initializes a new instance of PlannedFailoverModel. + /// Planned failover model properties. + /// is null. + public PlannedFailoverModel(PlannedFailoverModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Planned failover model properties. + internal PlannedFailoverModelProperties Properties { get; set; } + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public PlannedFailoverModelCustomProperties PlannedFailoverModelCustomProperties + { + get => Properties is null ? default : Properties.CustomProperties; + set => Properties = new PlannedFailoverModelProperties(value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..cf1a0663de70 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class PlannedFailoverModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static PlannedFailoverModelCustomProperties DeserializePlannedFailoverModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHCIPlannedFailoverModelCustomProperties.DeserializeHyperVToAzStackHCIPlannedFailoverModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHCIPlannedFailoverModelCustomProperties.DeserializeVMwareToAzStackHCIPlannedFailoverModelCustomProperties(element); + } + } + return UnknownPlannedFailoverModelCustomProperties.DeserializeUnknownPlannedFailoverModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs new file mode 100644 index 000000000000..824b986cb599 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class PlannedFailoverModelCustomProperties + { + /// Initializes a new instance of PlannedFailoverModelCustomProperties. + protected PlannedFailoverModelCustomProperties() + { + } + + /// Initializes a new instance of PlannedFailoverModelCustomProperties. + /// Gets or sets the instance type. + internal PlannedFailoverModelCustomProperties(string instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.Serialization.cs new file mode 100644 index 000000000000..3b9a380f7bda --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class PlannedFailoverModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties); + writer.WriteEndObject(); + } + + internal static PlannedFailoverModelProperties DeserializePlannedFailoverModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlannedFailoverModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customProperties"u8)) + { + customProperties = PlannedFailoverModelCustomProperties.DeserializePlannedFailoverModelCustomProperties(property.Value); + continue; + } + } + return new PlannedFailoverModelProperties(customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs new file mode 100644 index 000000000000..77fffeea3d7a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Planned failover model properties. + public partial class PlannedFailoverModelProperties + { + /// Initializes a new instance of PlannedFailoverModelProperties. + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public PlannedFailoverModelProperties(PlannedFailoverModelCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + CustomProperties = customProperties; + } + + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public PlannedFailoverModelCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.Serialization.cs new file mode 100644 index 000000000000..f6dbef021ee8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class PolicyModelCollection + { + internal static PolicyModelCollection DeserializePolicyModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PolicyModelData.DeserializePolicyModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PolicyModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.cs new file mode 100644 index 000000000000..f9ef9bf92bfb --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Policy model collection. + internal partial class PolicyModelCollection + { + /// Initializes a new instance of PolicyModelCollection. + internal PolicyModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PolicyModelCollection. + /// Gets or sets the list of policies. + /// Gets or sets the value of next link. + internal PolicyModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of policies. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..a54059bb5fb0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class PolicyModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static PolicyModelCustomProperties DeserializePolicyModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHCIPolicyModelCustomProperties.DeserializeHyperVToAzStackHCIPolicyModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHCIPolicyModelCustomProperties.DeserializeVMwareToAzStackHCIPolicyModelCustomProperties(element); + } + } + return UnknownPolicyModelCustomProperties.DeserializeUnknownPolicyModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs new file mode 100644 index 000000000000..e1beb6b2b701 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class PolicyModelCustomProperties + { + /// Initializes a new instance of PolicyModelCustomProperties. + protected PolicyModelCustomProperties() + { + } + + /// Initializes a new instance of PolicyModelCustomProperties. + /// Gets or sets the instance type. + internal PolicyModelCustomProperties(ReplicationType instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal ReplicationType InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs new file mode 100644 index 000000000000..c96479eac3a4 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class PolicyModelData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static PolicyModelData DeserializePolicyModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PolicyModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = PolicyModelProperties.DeserializePolicyModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new PolicyModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.Serialization.cs new file mode 100644 index 000000000000..e75475da4e04 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class PolicyModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties); + writer.WriteEndObject(); + } + + internal static PolicyModelProperties DeserializePolicyModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + PolicyModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = PolicyModelCustomProperties.DeserializePolicyModelCustomProperties(property.Value); + continue; + } + } + return new PolicyModelProperties(Optional.ToNullable(provisioningState), customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.cs new file mode 100644 index 000000000000..733acd603037 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Policy model properties. + public partial class PolicyModelProperties + { + /// Initializes a new instance of PolicyModelProperties. + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public PolicyModelProperties(PolicyModelCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + CustomProperties = customProperties; + } + + /// Initializes a new instance of PolicyModelProperties. + /// Gets or sets the provisioning state of the policy. + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + internal PolicyModelProperties(ProvisioningState? provisioningState, PolicyModelCustomProperties customProperties) + { + ProvisioningState = provisioningState; + CustomProperties = customProperties; + } + + /// Gets or sets the provisioning state of the policy. + public ProvisioningState? ProvisioningState { get; } + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public PolicyModelCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemActiveLocation.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemActiveLocation.cs new file mode 100644 index 000000000000..ff982330d1ff --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemActiveLocation.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the location of the protected item. + public readonly partial struct ProtectedItemActiveLocation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProtectedItemActiveLocation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string RecoveryValue = "Recovery"; + + /// Primary. + public static ProtectedItemActiveLocation Primary { get; } = new ProtectedItemActiveLocation(PrimaryValue); + /// Recovery. + public static ProtectedItemActiveLocation Recovery { get; } = new ProtectedItemActiveLocation(RecoveryValue); + /// Determines if two values are the same. + public static bool operator ==(ProtectedItemActiveLocation left, ProtectedItemActiveLocation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProtectedItemActiveLocation left, ProtectedItemActiveLocation right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProtectedItemActiveLocation(string value) => new ProtectedItemActiveLocation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProtectedItemActiveLocation other && Equals(other); + /// + public bool Equals(ProtectedItemActiveLocation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.Serialization.cs new file mode 100644 index 000000000000..d0a4de91440b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemDynamicMemoryConfig : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("maximumMemoryInMegaBytes"u8); + writer.WriteNumberValue(MaximumMemoryInMegaBytes); + writer.WritePropertyName("minimumMemoryInMegaBytes"u8); + writer.WriteNumberValue(MinimumMemoryInMegaBytes); + writer.WritePropertyName("targetMemoryBufferPercentage"u8); + writer.WriteNumberValue(TargetMemoryBufferPercentage); + writer.WriteEndObject(); + } + + internal static ProtectedItemDynamicMemoryConfig DeserializeProtectedItemDynamicMemoryConfig(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long maximumMemoryInMegaBytes = default; + long minimumMemoryInMegaBytes = default; + int targetMemoryBufferPercentage = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maximumMemoryInMegaBytes"u8)) + { + maximumMemoryInMegaBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("minimumMemoryInMegaBytes"u8)) + { + minimumMemoryInMegaBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("targetMemoryBufferPercentage"u8)) + { + targetMemoryBufferPercentage = property.Value.GetInt32(); + continue; + } + } + return new ProtectedItemDynamicMemoryConfig(maximumMemoryInMegaBytes, minimumMemoryInMegaBytes, targetMemoryBufferPercentage); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.cs new file mode 100644 index 000000000000..cac837522c0e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item dynamic memory config. + public partial class ProtectedItemDynamicMemoryConfig + { + /// Initializes a new instance of ProtectedItemDynamicMemoryConfig. + /// Gets or sets maximum memory in MB. + /// Gets or sets minimum memory in MB. + /// Gets or sets target memory buffer in %. + public ProtectedItemDynamicMemoryConfig(long maximumMemoryInMegaBytes, long minimumMemoryInMegaBytes, int targetMemoryBufferPercentage) + { + MaximumMemoryInMegaBytes = maximumMemoryInMegaBytes; + MinimumMemoryInMegaBytes = minimumMemoryInMegaBytes; + TargetMemoryBufferPercentage = targetMemoryBufferPercentage; + } + + /// Gets or sets maximum memory in MB. + public long MaximumMemoryInMegaBytes { get; set; } + /// Gets or sets minimum memory in MB. + public long MinimumMemoryInMegaBytes { get; set; } + /// Gets or sets target memory buffer in %. + public int TargetMemoryBufferPercentage { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.Serialization.cs new file mode 100644 index 000000000000..d58913187aba --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemJobProperties + { + internal static ProtectedItemJobProperties DeserializeProtectedItemJobProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional scenarioName = default; + Optional id = default; + Optional name = default; + Optional displayName = default; + Optional state = default; + Optional startTime = default; + Optional endTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scenarioName"u8)) + { + scenarioName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ProtectedItemJobProperties(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.cs new file mode 100644 index 000000000000..cf958d3e2798 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item job properties. + public partial class ProtectedItemJobProperties + { + /// Initializes a new instance of ProtectedItemJobProperties. + internal ProtectedItemJobProperties() + { + } + + /// Initializes a new instance of ProtectedItemJobProperties. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + internal ProtectedItemJobProperties(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) + { + ScenarioName = scenarioName; + Id = id; + Name = name; + DisplayName = displayName; + State = state; + StartOn = startOn; + EndOn = endOn; + } + + /// Gets or sets protection scenario name. + public string ScenarioName { get; } + /// Gets or sets workflow Id. + public string Id { get; } + /// Gets or sets workflow name. + public string Name { get; } + /// Gets or sets the workflow friendly display name. + public string DisplayName { get; } + /// Gets or sets workflow state. + public string State { get; } + /// Gets or sets start time of the workflow. + public DateTimeOffset? StartOn { get; } + /// Gets or sets end time of the workflow. + public DateTimeOffset? EndOn { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.Serialization.cs new file mode 100644 index 000000000000..7219f06939fc --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class ProtectedItemModelCollection + { + internal static ProtectedItemModelCollection DeserializeProtectedItemModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProtectedItemModelData.DeserializeProtectedItemModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ProtectedItemModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.cs new file mode 100644 index 000000000000..ef78bcd11847 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item model collection. + internal partial class ProtectedItemModelCollection + { + /// Initializes a new instance of ProtectedItemModelCollection. + internal ProtectedItemModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ProtectedItemModelCollection. + /// Gets or sets the list of protected items. + /// Gets or sets the value of next link. + internal ProtectedItemModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of protected items. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..0e0a6f6b7284 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static ProtectedItemModelCustomProperties DeserializeProtectedItemModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHCIProtectedItemModelCustomProperties.DeserializeHyperVToAzStackHCIProtectedItemModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHCIProtectedItemModelCustomProperties.DeserializeVMwareToAzStackHCIProtectedItemModelCustomProperties(element); + } + } + return UnknownProtectedItemModelCustomProperties.DeserializeUnknownProtectedItemModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs new file mode 100644 index 000000000000..50394343d958 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class ProtectedItemModelCustomProperties + { + /// Initializes a new instance of ProtectedItemModelCustomProperties. + protected ProtectedItemModelCustomProperties() + { + } + + /// Initializes a new instance of ProtectedItemModelCustomProperties. + /// Gets or sets the instance type. + internal ProtectedItemModelCustomProperties(ReplicationType instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal ReplicationType InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs new file mode 100644 index 000000000000..189b732f14d3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class ProtectedItemModelData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ProtectedItemModelData DeserializeProtectedItemModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProtectedItemModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = ProtectedItemModelProperties.DeserializeProtectedItemModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ProtectedItemModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.Serialization.cs new file mode 100644 index 000000000000..4eaf35260988 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.Serialization.cs @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("policyName"u8); + writer.WriteStringValue(PolicyName); + writer.WritePropertyName("replicationExtensionName"u8); + writer.WriteStringValue(ReplicationExtensionName); + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties); + writer.WriteEndObject(); + } + + internal static ProtectedItemModelProperties DeserializeProtectedItemModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string policyName = default; + string replicationExtensionName = default; + Optional correlationId = default; + Optional provisioningState = default; + Optional protectionState = default; + Optional protectionStateDescription = default; + Optional testFailoverState = default; + Optional testFailoverStateDescription = default; + Optional resynchronizationState = default; + Optional fabricObjectId = default; + Optional fabricObjectName = default; + Optional sourceFabricProviderId = default; + Optional targetFabricProviderId = default; + Optional fabricId = default; + Optional targetFabricId = default; + Optional draId = default; + Optional targetDraId = default; + Optional resyncRequired = default; + Optional lastSuccessfulPlannedFailoverTime = default; + Optional lastSuccessfulUnplannedFailoverTime = default; + Optional lastSuccessfulTestFailoverTime = default; + Optional currentJob = default; + Optional> allowedJobs = default; + Optional lastFailedEnableProtectionJob = default; + Optional lastFailedPlannedFailoverJob = default; + Optional lastTestFailoverJob = default; + Optional replicationHealth = default; + Optional> healthErrors = default; + ProtectedItemModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyName"u8)) + { + policyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("replicationExtensionName"u8)) + { + replicationExtensionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new ProtectionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("protectionStateDescription"u8)) + { + protectionStateDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("testFailoverState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + testFailoverState = new TestFailoverState(property.Value.GetString()); + continue; + } + if (property.NameEquals("testFailoverStateDescription"u8)) + { + testFailoverStateDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("resynchronizationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resynchronizationState = new ResynchronizationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("fabricObjectId"u8)) + { + fabricObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricObjectName"u8)) + { + fabricObjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceFabricProviderId"u8)) + { + sourceFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricProviderId"u8)) + { + targetFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricId"u8)) + { + fabricId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricId"u8)) + { + targetFabricId = property.Value.GetString(); + continue; + } + if (property.NameEquals("draId"u8)) + { + draId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetDraId"u8)) + { + targetDraId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resyncRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("lastSuccessfulPlannedFailoverTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSuccessfulPlannedFailoverTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastSuccessfulUnplannedFailoverTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSuccessfulUnplannedFailoverTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastSuccessfulTestFailoverTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSuccessfulTestFailoverTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentJob = ProtectedItemModelPropertiesCurrentJob.DeserializeProtectedItemModelPropertiesCurrentJob(property.Value); + continue; + } + if (property.NameEquals("allowedJobs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedJobs = array; + continue; + } + if (property.NameEquals("lastFailedEnableProtectionJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastFailedEnableProtectionJob = ProtectedItemModelPropertiesLastFailedEnableProtectionJob.DeserializeProtectedItemModelPropertiesLastFailedEnableProtectionJob(property.Value); + continue; + } + if (property.NameEquals("lastFailedPlannedFailoverJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastFailedPlannedFailoverJob = ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.DeserializeProtectedItemModelPropertiesLastFailedPlannedFailoverJob(property.Value); + continue; + } + if (property.NameEquals("lastTestFailoverJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTestFailoverJob = ProtectedItemModelPropertiesLastTestFailoverJob.DeserializeProtectedItemModelPropertiesLastTestFailoverJob(property.Value); + continue; + } + if (property.NameEquals("replicationHealth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicationHealth = new HealthStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = ProtectedItemModelCustomProperties.DeserializeProtectedItemModelCustomProperties(property.Value); + continue; + } + } + return new ProtectedItemModelProperties(policyName, replicationExtensionName, correlationId.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(protectionState), protectionStateDescription.Value, Optional.ToNullable(testFailoverState), testFailoverStateDescription.Value, Optional.ToNullable(resynchronizationState), fabricObjectId.Value, fabricObjectName.Value, sourceFabricProviderId.Value, targetFabricProviderId.Value, fabricId.Value, targetFabricId.Value, draId.Value, targetDraId.Value, Optional.ToNullable(resyncRequired), Optional.ToNullable(lastSuccessfulPlannedFailoverTime), Optional.ToNullable(lastSuccessfulUnplannedFailoverTime), Optional.ToNullable(lastSuccessfulTestFailoverTime), currentJob.Value, Optional.ToList(allowedJobs), lastFailedEnableProtectionJob.Value, lastFailedPlannedFailoverJob.Value, lastTestFailoverJob.Value, Optional.ToNullable(replicationHealth), Optional.ToList(healthErrors), customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.cs new file mode 100644 index 000000000000..4e745042ec09 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item model properties. + public partial class ProtectedItemModelProperties + { + /// Initializes a new instance of ProtectedItemModelProperties. + /// Gets or sets the policy name. + /// Gets or sets the replication extension name. + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// , or is null. + public ProtectedItemModelProperties(string policyName, string replicationExtensionName, ProtectedItemModelCustomProperties customProperties) + { + Argument.AssertNotNull(policyName, nameof(policyName)); + Argument.AssertNotNull(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + PolicyName = policyName; + ReplicationExtensionName = replicationExtensionName; + AllowedJobs = new ChangeTrackingList(); + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of ProtectedItemModelProperties. + /// Gets or sets the policy name. + /// Gets or sets the replication extension name. + /// Gets or sets the protected item correlation Id. + /// Gets or sets the provisioning state of the Dra. + /// Gets or sets the protection state. + /// Gets or sets the protection state description. + /// Gets or sets the test failover state. + /// Gets or sets the Test failover state description. + /// Gets or sets the resynchronization state. + /// Gets or sets the fabric object Id. + /// Gets or sets the fabric object name. + /// Gets or sets the source fabric provider Id. + /// Gets or sets the target fabric provider Id. + /// Gets or sets the fabric Id. + /// Gets or sets the target fabric Id. + /// Gets or sets the DRA Id. + /// Gets or sets the target DRA Id. + /// Gets or sets a value indicating whether resynchronization is required or not. + /// Gets or sets the Last successful planned failover time. + /// Gets or sets the Last successful unplanned failover time. + /// Gets or sets the Last successful test failover time. + /// + /// Gets or sets the allowed scenarios on the protected item. + /// + /// + /// + /// Gets or sets protected item replication health. + /// Gets or sets the list of health errors. + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + internal ProtectedItemModelProperties(string policyName, string replicationExtensionName, string correlationId, ProvisioningState? provisioningState, ProtectionState? protectionState, string protectionStateDescription, TestFailoverState? testFailoverState, string testFailoverStateDescription, ResynchronizationState? resynchronizationState, string fabricObjectId, string fabricObjectName, string sourceFabricProviderId, string targetFabricProviderId, string fabricId, string targetFabricId, string draId, string targetDraId, bool? resyncRequired, DateTimeOffset? lastSuccessfulPlannedFailoverOn, DateTimeOffset? lastSuccessfulUnplannedFailoverOn, DateTimeOffset? lastSuccessfulTestFailoverOn, ProtectedItemModelPropertiesCurrentJob currentJob, IReadOnlyList allowedJobs, ProtectedItemModelPropertiesLastFailedEnableProtectionJob lastFailedEnableProtectionJob, ProtectedItemModelPropertiesLastFailedPlannedFailoverJob lastFailedPlannedFailoverJob, ProtectedItemModelPropertiesLastTestFailoverJob lastTestFailoverJob, HealthStatus? replicationHealth, IReadOnlyList healthErrors, ProtectedItemModelCustomProperties customProperties) + { + PolicyName = policyName; + ReplicationExtensionName = replicationExtensionName; + CorrelationId = correlationId; + ProvisioningState = provisioningState; + ProtectionState = protectionState; + ProtectionStateDescription = protectionStateDescription; + TestFailoverState = testFailoverState; + TestFailoverStateDescription = testFailoverStateDescription; + ResynchronizationState = resynchronizationState; + FabricObjectId = fabricObjectId; + FabricObjectName = fabricObjectName; + SourceFabricProviderId = sourceFabricProviderId; + TargetFabricProviderId = targetFabricProviderId; + FabricId = fabricId; + TargetFabricId = targetFabricId; + DraId = draId; + TargetDraId = targetDraId; + ResyncRequired = resyncRequired; + LastSuccessfulPlannedFailoverOn = lastSuccessfulPlannedFailoverOn; + LastSuccessfulUnplannedFailoverOn = lastSuccessfulUnplannedFailoverOn; + LastSuccessfulTestFailoverOn = lastSuccessfulTestFailoverOn; + CurrentJob = currentJob; + AllowedJobs = allowedJobs; + LastFailedEnableProtectionJob = lastFailedEnableProtectionJob; + LastFailedPlannedFailoverJob = lastFailedPlannedFailoverJob; + LastTestFailoverJob = lastTestFailoverJob; + ReplicationHealth = replicationHealth; + HealthErrors = healthErrors; + CustomProperties = customProperties; + } + + /// Gets or sets the policy name. + public string PolicyName { get; set; } + /// Gets or sets the replication extension name. + public string ReplicationExtensionName { get; set; } + /// Gets or sets the protected item correlation Id. + public string CorrelationId { get; } + /// Gets or sets the provisioning state of the Dra. + public ProvisioningState? ProvisioningState { get; } + /// Gets or sets the protection state. + public ProtectionState? ProtectionState { get; } + /// Gets or sets the protection state description. + public string ProtectionStateDescription { get; } + /// Gets or sets the test failover state. + public TestFailoverState? TestFailoverState { get; } + /// Gets or sets the Test failover state description. + public string TestFailoverStateDescription { get; } + /// Gets or sets the resynchronization state. + public ResynchronizationState? ResynchronizationState { get; } + /// Gets or sets the fabric object Id. + public string FabricObjectId { get; } + /// Gets or sets the fabric object name. + public string FabricObjectName { get; } + /// Gets or sets the source fabric provider Id. + public string SourceFabricProviderId { get; } + /// Gets or sets the target fabric provider Id. + public string TargetFabricProviderId { get; } + /// Gets or sets the fabric Id. + public string FabricId { get; } + /// Gets or sets the target fabric Id. + public string TargetFabricId { get; } + /// Gets or sets the DRA Id. + public string DraId { get; } + /// Gets or sets the target DRA Id. + public string TargetDraId { get; } + /// Gets or sets a value indicating whether resynchronization is required or not. + public bool? ResyncRequired { get; } + /// Gets or sets the Last successful planned failover time. + public DateTimeOffset? LastSuccessfulPlannedFailoverOn { get; } + /// Gets or sets the Last successful unplanned failover time. + public DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get; } + /// Gets or sets the Last successful test failover time. + public DateTimeOffset? LastSuccessfulTestFailoverOn { get; } + /// Gets the current job. + public ProtectedItemModelPropertiesCurrentJob CurrentJob { get; } + /// Gets or sets the allowed scenarios on the protected item. + public IReadOnlyList AllowedJobs { get; } + /// Gets the last failed enable protection job. + public ProtectedItemModelPropertiesLastFailedEnableProtectionJob LastFailedEnableProtectionJob { get; } + /// Gets the last failed planned failover job. + public ProtectedItemModelPropertiesLastFailedPlannedFailoverJob LastFailedPlannedFailoverJob { get; } + /// Gets the last test failover job. + public ProtectedItemModelPropertiesLastTestFailoverJob LastTestFailoverJob { get; } + /// Gets or sets protected item replication health. + public HealthStatus? ReplicationHealth { get; } + /// Gets or sets the list of health errors. + public IReadOnlyList HealthErrors { get; } + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public ProtectedItemModelCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs new file mode 100644 index 000000000000..a2513264cea2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemModelPropertiesCurrentJob + { + internal static ProtectedItemModelPropertiesCurrentJob DeserializeProtectedItemModelPropertiesCurrentJob(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional scenarioName = default; + Optional id = default; + Optional name = default; + Optional displayName = default; + Optional state = default; + Optional startTime = default; + Optional endTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scenarioName"u8)) + { + scenarioName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ProtectedItemModelPropertiesCurrentJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs new file mode 100644 index 000000000000..1b53e4642097 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The ProtectedItemModelPropertiesCurrentJob. + public partial class ProtectedItemModelPropertiesCurrentJob : ProtectedItemJobProperties + { + /// Initializes a new instance of ProtectedItemModelPropertiesCurrentJob. + internal ProtectedItemModelPropertiesCurrentJob() + { + } + + /// Initializes a new instance of ProtectedItemModelPropertiesCurrentJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + internal ProtectedItemModelPropertiesCurrentJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) + { + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs new file mode 100644 index 000000000000..376fdd08f140 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemModelPropertiesLastFailedEnableProtectionJob + { + internal static ProtectedItemModelPropertiesLastFailedEnableProtectionJob DeserializeProtectedItemModelPropertiesLastFailedEnableProtectionJob(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional scenarioName = default; + Optional id = default; + Optional name = default; + Optional displayName = default; + Optional state = default; + Optional startTime = default; + Optional endTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scenarioName"u8)) + { + scenarioName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ProtectedItemModelPropertiesLastFailedEnableProtectionJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs new file mode 100644 index 000000000000..491b4679305e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The ProtectedItemModelPropertiesLastFailedEnableProtectionJob. + public partial class ProtectedItemModelPropertiesLastFailedEnableProtectionJob : ProtectedItemJobProperties + { + /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedEnableProtectionJob. + internal ProtectedItemModelPropertiesLastFailedEnableProtectionJob() + { + } + + /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedEnableProtectionJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + internal ProtectedItemModelPropertiesLastFailedEnableProtectionJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) + { + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs new file mode 100644 index 000000000000..04bd1c1536a9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemModelPropertiesLastFailedPlannedFailoverJob + { + internal static ProtectedItemModelPropertiesLastFailedPlannedFailoverJob DeserializeProtectedItemModelPropertiesLastFailedPlannedFailoverJob(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional scenarioName = default; + Optional id = default; + Optional name = default; + Optional displayName = default; + Optional state = default; + Optional startTime = default; + Optional endTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scenarioName"u8)) + { + scenarioName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs new file mode 100644 index 000000000000..9eb25e1b2627 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. + public partial class ProtectedItemModelPropertiesLastFailedPlannedFailoverJob : ProtectedItemJobProperties + { + /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. + internal ProtectedItemModelPropertiesLastFailedPlannedFailoverJob() + { + } + + /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + internal ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) + { + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs new file mode 100644 index 000000000000..17346a5a92c9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemModelPropertiesLastTestFailoverJob + { + internal static ProtectedItemModelPropertiesLastTestFailoverJob DeserializeProtectedItemModelPropertiesLastTestFailoverJob(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional scenarioName = default; + Optional id = default; + Optional name = default; + Optional displayName = default; + Optional state = default; + Optional startTime = default; + Optional endTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scenarioName"u8)) + { + scenarioName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ProtectedItemModelPropertiesLastTestFailoverJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs new file mode 100644 index 000000000000..d10f0bb6dcb2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The ProtectedItemModelPropertiesLastTestFailoverJob. + public partial class ProtectedItemModelPropertiesLastTestFailoverJob : ProtectedItemJobProperties + { + /// Initializes a new instance of ProtectedItemModelPropertiesLastTestFailoverJob. + internal ProtectedItemModelPropertiesLastTestFailoverJob() + { + } + + /// Initializes a new instance of ProtectedItemModelPropertiesLastTestFailoverJob. + /// Gets or sets protection scenario name. + /// Gets or sets workflow Id. + /// Gets or sets workflow name. + /// Gets or sets the workflow friendly display name. + /// Gets or sets workflow state. + /// Gets or sets start time of the workflow. + /// Gets or sets end time of the workflow. + internal ProtectedItemModelPropertiesLastTestFailoverJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) + { + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs new file mode 100644 index 000000000000..cc28762f5a86 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the protection state. + public readonly partial struct ProtectionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProtectionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnprotectedStatesBeginValue = "UnprotectedStatesBegin"; + private const string EnablingProtectionValue = "EnablingProtection"; + private const string EnablingFailedValue = "EnablingFailed"; + private const string DisablingProtectionValue = "DisablingProtection"; + private const string MarkedForDeletionValue = "MarkedForDeletion"; + private const string DisablingFailedValue = "DisablingFailed"; + private const string UnprotectedStatesEndValue = "UnprotectedStatesEnd"; + private const string InitialReplicationStatesBeginValue = "InitialReplicationStatesBegin"; + private const string InitialReplicationInProgressValue = "InitialReplicationInProgress"; + private const string InitialReplicationCompletedOnPrimaryValue = "InitialReplicationCompletedOnPrimary"; + private const string InitialReplicationCompletedOnRecoveryValue = "InitialReplicationCompletedOnRecovery"; + private const string InitialReplicationFailedValue = "InitialReplicationFailed"; + private const string InitialReplicationStatesEndValue = "InitialReplicationStatesEnd"; + private const string ProtectedStatesBeginValue = "ProtectedStatesBegin"; + private const string ProtectedValue = "Protected"; + private const string ProtectedStatesEndValue = "ProtectedStatesEnd"; + private const string PlannedFailoverTransitionStatesBeginValue = "PlannedFailoverTransitionStatesBegin"; + private const string PlannedFailoverInitiatedValue = "PlannedFailoverInitiated"; + private const string PlannedFailoverCompletingValue = "PlannedFailoverCompleting"; + private const string PlannedFailoverCompletedValue = "PlannedFailoverCompleted"; + private const string PlannedFailoverFailedValue = "PlannedFailoverFailed"; + private const string PlannedFailoverCompletionFailedValue = "PlannedFailoverCompletionFailed"; + private const string PlannedFailoverTransitionStatesEndValue = "PlannedFailoverTransitionStatesEnd"; + private const string UnplannedFailoverTransitionStatesBeginValue = "UnplannedFailoverTransitionStatesBegin"; + private const string UnplannedFailoverInitiatedValue = "UnplannedFailoverInitiated"; + private const string UnplannedFailoverCompletingValue = "UnplannedFailoverCompleting"; + private const string UnplannedFailoverCompletedValue = "UnplannedFailoverCompleted"; + private const string UnplannedFailoverFailedValue = "UnplannedFailoverFailed"; + private const string UnplannedFailoverCompletionFailedValue = "UnplannedFailoverCompletionFailed"; + private const string UnplannedFailoverTransitionStatesEndValue = "UnplannedFailoverTransitionStatesEnd"; + private const string CommitFailoverStatesBeginValue = "CommitFailoverStatesBegin"; + private const string CommitFailoverInProgressOnPrimaryValue = "CommitFailoverInProgressOnPrimary"; + private const string CommitFailoverInProgressOnRecoveryValue = "CommitFailoverInProgressOnRecovery"; + private const string CommitFailoverCompletedValue = "CommitFailoverCompleted"; + private const string CommitFailoverFailedOnPrimaryValue = "CommitFailoverFailedOnPrimary"; + private const string CommitFailoverFailedOnRecoveryValue = "CommitFailoverFailedOnRecovery"; + private const string CommitFailoverStatesEndValue = "CommitFailoverStatesEnd"; + private const string CancelFailoverStatesBeginValue = "CancelFailoverStatesBegin"; + private const string CancelFailoverInProgressOnPrimaryValue = "CancelFailoverInProgressOnPrimary"; + private const string CancelFailoverInProgressOnRecoveryValue = "CancelFailoverInProgressOnRecovery"; + private const string CancelFailoverFailedOnPrimaryValue = "CancelFailoverFailedOnPrimary"; + private const string CancelFailoverFailedOnRecoveryValue = "CancelFailoverFailedOnRecovery"; + private const string CancelFailoverStatesEndValue = "CancelFailoverStatesEnd"; + private const string ChangeRecoveryPointStatesBeginValue = "ChangeRecoveryPointStatesBegin"; + private const string ChangeRecoveryPointInitiatedValue = "ChangeRecoveryPointInitiated"; + private const string ChangeRecoveryPointCompletedValue = "ChangeRecoveryPointCompleted"; + private const string ChangeRecoveryPointFailedValue = "ChangeRecoveryPointFailed"; + private const string ChangeRecoveryPointStatesEndValue = "ChangeRecoveryPointStatesEnd"; + private const string ReprotectStatesBeginValue = "ReprotectStatesBegin"; + private const string ReprotectInitiatedValue = "ReprotectInitiated"; + private const string ReprotectFailedValue = "ReprotectFailed"; + private const string ReprotectStatesEndValue = "ReprotectStatesEnd"; + + /// UnprotectedStatesBegin. + public static ProtectionState UnprotectedStatesBegin { get; } = new ProtectionState(UnprotectedStatesBeginValue); + /// EnablingProtection. + public static ProtectionState EnablingProtection { get; } = new ProtectionState(EnablingProtectionValue); + /// EnablingFailed. + public static ProtectionState EnablingFailed { get; } = new ProtectionState(EnablingFailedValue); + /// DisablingProtection. + public static ProtectionState DisablingProtection { get; } = new ProtectionState(DisablingProtectionValue); + /// MarkedForDeletion. + public static ProtectionState MarkedForDeletion { get; } = new ProtectionState(MarkedForDeletionValue); + /// DisablingFailed. + public static ProtectionState DisablingFailed { get; } = new ProtectionState(DisablingFailedValue); + /// UnprotectedStatesEnd. + public static ProtectionState UnprotectedStatesEnd { get; } = new ProtectionState(UnprotectedStatesEndValue); + /// InitialReplicationStatesBegin. + public static ProtectionState InitialReplicationStatesBegin { get; } = new ProtectionState(InitialReplicationStatesBeginValue); + /// InitialReplicationInProgress. + public static ProtectionState InitialReplicationInProgress { get; } = new ProtectionState(InitialReplicationInProgressValue); + /// InitialReplicationCompletedOnPrimary. + public static ProtectionState InitialReplicationCompletedOnPrimary { get; } = new ProtectionState(InitialReplicationCompletedOnPrimaryValue); + /// InitialReplicationCompletedOnRecovery. + public static ProtectionState InitialReplicationCompletedOnRecovery { get; } = new ProtectionState(InitialReplicationCompletedOnRecoveryValue); + /// InitialReplicationFailed. + public static ProtectionState InitialReplicationFailed { get; } = new ProtectionState(InitialReplicationFailedValue); + /// InitialReplicationStatesEnd. + public static ProtectionState InitialReplicationStatesEnd { get; } = new ProtectionState(InitialReplicationStatesEndValue); + /// ProtectedStatesBegin. + public static ProtectionState ProtectedStatesBegin { get; } = new ProtectionState(ProtectedStatesBeginValue); + /// Protected. + public static ProtectionState Protected { get; } = new ProtectionState(ProtectedValue); + /// ProtectedStatesEnd. + public static ProtectionState ProtectedStatesEnd { get; } = new ProtectionState(ProtectedStatesEndValue); + /// PlannedFailoverTransitionStatesBegin. + public static ProtectionState PlannedFailoverTransitionStatesBegin { get; } = new ProtectionState(PlannedFailoverTransitionStatesBeginValue); + /// PlannedFailoverInitiated. + public static ProtectionState PlannedFailoverInitiated { get; } = new ProtectionState(PlannedFailoverInitiatedValue); + /// PlannedFailoverCompleting. + public static ProtectionState PlannedFailoverCompleting { get; } = new ProtectionState(PlannedFailoverCompletingValue); + /// PlannedFailoverCompleted. + public static ProtectionState PlannedFailoverCompleted { get; } = new ProtectionState(PlannedFailoverCompletedValue); + /// PlannedFailoverFailed. + public static ProtectionState PlannedFailoverFailed { get; } = new ProtectionState(PlannedFailoverFailedValue); + /// PlannedFailoverCompletionFailed. + public static ProtectionState PlannedFailoverCompletionFailed { get; } = new ProtectionState(PlannedFailoverCompletionFailedValue); + /// PlannedFailoverTransitionStatesEnd. + public static ProtectionState PlannedFailoverTransitionStatesEnd { get; } = new ProtectionState(PlannedFailoverTransitionStatesEndValue); + /// UnplannedFailoverTransitionStatesBegin. + public static ProtectionState UnplannedFailoverTransitionStatesBegin { get; } = new ProtectionState(UnplannedFailoverTransitionStatesBeginValue); + /// UnplannedFailoverInitiated. + public static ProtectionState UnplannedFailoverInitiated { get; } = new ProtectionState(UnplannedFailoverInitiatedValue); + /// UnplannedFailoverCompleting. + public static ProtectionState UnplannedFailoverCompleting { get; } = new ProtectionState(UnplannedFailoverCompletingValue); + /// UnplannedFailoverCompleted. + public static ProtectionState UnplannedFailoverCompleted { get; } = new ProtectionState(UnplannedFailoverCompletedValue); + /// UnplannedFailoverFailed. + public static ProtectionState UnplannedFailoverFailed { get; } = new ProtectionState(UnplannedFailoverFailedValue); + /// UnplannedFailoverCompletionFailed. + public static ProtectionState UnplannedFailoverCompletionFailed { get; } = new ProtectionState(UnplannedFailoverCompletionFailedValue); + /// UnplannedFailoverTransitionStatesEnd. + public static ProtectionState UnplannedFailoverTransitionStatesEnd { get; } = new ProtectionState(UnplannedFailoverTransitionStatesEndValue); + /// CommitFailoverStatesBegin. + public static ProtectionState CommitFailoverStatesBegin { get; } = new ProtectionState(CommitFailoverStatesBeginValue); + /// CommitFailoverInProgressOnPrimary. + public static ProtectionState CommitFailoverInProgressOnPrimary { get; } = new ProtectionState(CommitFailoverInProgressOnPrimaryValue); + /// CommitFailoverInProgressOnRecovery. + public static ProtectionState CommitFailoverInProgressOnRecovery { get; } = new ProtectionState(CommitFailoverInProgressOnRecoveryValue); + /// CommitFailoverCompleted. + public static ProtectionState CommitFailoverCompleted { get; } = new ProtectionState(CommitFailoverCompletedValue); + /// CommitFailoverFailedOnPrimary. + public static ProtectionState CommitFailoverFailedOnPrimary { get; } = new ProtectionState(CommitFailoverFailedOnPrimaryValue); + /// CommitFailoverFailedOnRecovery. + public static ProtectionState CommitFailoverFailedOnRecovery { get; } = new ProtectionState(CommitFailoverFailedOnRecoveryValue); + /// CommitFailoverStatesEnd. + public static ProtectionState CommitFailoverStatesEnd { get; } = new ProtectionState(CommitFailoverStatesEndValue); + /// CancelFailoverStatesBegin. + public static ProtectionState CancelFailoverStatesBegin { get; } = new ProtectionState(CancelFailoverStatesBeginValue); + /// CancelFailoverInProgressOnPrimary. + public static ProtectionState CancelFailoverInProgressOnPrimary { get; } = new ProtectionState(CancelFailoverInProgressOnPrimaryValue); + /// CancelFailoverInProgressOnRecovery. + public static ProtectionState CancelFailoverInProgressOnRecovery { get; } = new ProtectionState(CancelFailoverInProgressOnRecoveryValue); + /// CancelFailoverFailedOnPrimary. + public static ProtectionState CancelFailoverFailedOnPrimary { get; } = new ProtectionState(CancelFailoverFailedOnPrimaryValue); + /// CancelFailoverFailedOnRecovery. + public static ProtectionState CancelFailoverFailedOnRecovery { get; } = new ProtectionState(CancelFailoverFailedOnRecoveryValue); + /// CancelFailoverStatesEnd. + public static ProtectionState CancelFailoverStatesEnd { get; } = new ProtectionState(CancelFailoverStatesEndValue); + /// ChangeRecoveryPointStatesBegin. + public static ProtectionState ChangeRecoveryPointStatesBegin { get; } = new ProtectionState(ChangeRecoveryPointStatesBeginValue); + /// ChangeRecoveryPointInitiated. + public static ProtectionState ChangeRecoveryPointInitiated { get; } = new ProtectionState(ChangeRecoveryPointInitiatedValue); + /// ChangeRecoveryPointCompleted. + public static ProtectionState ChangeRecoveryPointCompleted { get; } = new ProtectionState(ChangeRecoveryPointCompletedValue); + /// ChangeRecoveryPointFailed. + public static ProtectionState ChangeRecoveryPointFailed { get; } = new ProtectionState(ChangeRecoveryPointFailedValue); + /// ChangeRecoveryPointStatesEnd. + public static ProtectionState ChangeRecoveryPointStatesEnd { get; } = new ProtectionState(ChangeRecoveryPointStatesEndValue); + /// ReprotectStatesBegin. + public static ProtectionState ReprotectStatesBegin { get; } = new ProtectionState(ReprotectStatesBeginValue); + /// ReprotectInitiated. + public static ProtectionState ReprotectInitiated { get; } = new ProtectionState(ReprotectInitiatedValue); + /// ReprotectFailed. + public static ProtectionState ReprotectFailed { get; } = new ProtectionState(ReprotectFailedValue); + /// ReprotectStatesEnd. + public static ProtectionState ReprotectStatesEnd { get; } = new ProtectionState(ReprotectStatesEndValue); + /// Determines if two values are the same. + public static bool operator ==(ProtectionState left, ProtectionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProtectionState left, ProtectionState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProtectionState(string value) => new ProtectionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProtectionState other && Equals(other); + /// + public bool Equals(ProtectionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..90e5991fb08e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the provisioning state of the Dra. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CanceledValue = "Canceled"; + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + + /// Canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); + /// Creating. + public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); + /// Deleting. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// Deleted. + public static ProvisioningState Deleted { get; } = new ProvisioningState(DeletedValue); + /// Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Succeeded. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs new file mode 100644 index 000000000000..27f8d5dd9ea4 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class RecoveryPointModelCollection + { + internal static RecoveryPointModelCollection DeserializeRecoveryPointModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecoveryPointModelData.DeserializeRecoveryPointModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new RecoveryPointModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.cs new file mode 100644 index 000000000000..fa11c65a3aa3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Recovery point model collection. + internal partial class RecoveryPointModelCollection + { + /// Initializes a new instance of RecoveryPointModelCollection. + internal RecoveryPointModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of RecoveryPointModelCollection. + /// Gets or sets the list of recovery points. + /// Gets or sets the value of next link. + internal RecoveryPointModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of recovery points. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..c8f96fa95d21 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class RecoveryPointModelCustomProperties + { + internal static RecoveryPointModelCustomProperties DeserializeRecoveryPointModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHCIRecoveryPointModelCustomProperties.DeserializeHyperVToAzStackHCIRecoveryPointModelCustomProperties(element); + } + } + return UnknownRecoveryPointModelCustomProperties.DeserializeUnknownRecoveryPointModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs new file mode 100644 index 000000000000..e5ed7f77667f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class RecoveryPointModelCustomProperties + { + /// Initializes a new instance of RecoveryPointModelCustomProperties. + protected RecoveryPointModelCustomProperties() + { + } + + /// Initializes a new instance of RecoveryPointModelCustomProperties. + /// Gets or sets the instance type. + internal RecoveryPointModelCustomProperties(ReplicationType instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal ReplicationType InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs new file mode 100644 index 000000000000..842d85807053 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class RecoveryPointModelData + { + internal static RecoveryPointModelData DeserializeRecoveryPointModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RecoveryPointModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = RecoveryPointModelProperties.DeserializeRecoveryPointModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new RecoveryPointModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.Serialization.cs new file mode 100644 index 000000000000..89f32a2f7ff7 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class RecoveryPointModelProperties + { + internal static RecoveryPointModelProperties DeserializeRecoveryPointModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset recoveryPointTime = default; + RecoveryPointType recoveryPointType = default; + RecoveryPointModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointTime"u8)) + { + recoveryPointTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryPointType"u8)) + { + recoveryPointType = new RecoveryPointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = RecoveryPointModelCustomProperties.DeserializeRecoveryPointModelCustomProperties(property.Value); + continue; + } + } + return new RecoveryPointModelProperties(recoveryPointTime, recoveryPointType, customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.cs new file mode 100644 index 000000000000..23ab64d9d510 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Recovery point model properties. + public partial class RecoveryPointModelProperties + { + /// Initializes a new instance of RecoveryPointModelProperties. + /// Gets or sets the recovery point time. + /// Gets or sets the recovery point type. + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// is null. + internal RecoveryPointModelProperties(DateTimeOffset recoveryPointOn, RecoveryPointType recoveryPointType, RecoveryPointModelCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + RecoveryPointOn = recoveryPointOn; + RecoveryPointType = recoveryPointType; + CustomProperties = customProperties; + } + + /// Gets or sets the recovery point time. + public DateTimeOffset RecoveryPointOn { get; } + /// Gets or sets the recovery point type. + public RecoveryPointType RecoveryPointType { get; } + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public RecoveryPointModelCustomProperties CustomProperties { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs new file mode 100644 index 000000000000..14472eb69187 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the recovery point type. + public readonly partial struct RecoveryPointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RecoveryPointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApplicationConsistentValue = "ApplicationConsistent"; + private const string CrashConsistentValue = "CrashConsistent"; + + /// ApplicationConsistent. + public static RecoveryPointType ApplicationConsistent { get; } = new RecoveryPointType(ApplicationConsistentValue); + /// CrashConsistent. + public static RecoveryPointType CrashConsistent { get; } = new RecoveryPointType(CrashConsistentValue); + /// Determines if two values are the same. + public static bool operator ==(RecoveryPointType left, RecoveryPointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RecoveryPointType left, RecoveryPointType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RecoveryPointType(string value) => new RecoveryPointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RecoveryPointType other && Equals(other); + /// + public bool Equals(RecoveryPointType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs new file mode 100644 index 000000000000..e425e7582f7e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class ReplicationExtensionModelCollection + { + internal static ReplicationExtensionModelCollection DeserializeReplicationExtensionModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new ReplicationExtensionModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.cs new file mode 100644 index 000000000000..acb4b3ecefd7 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Replication extension model collection. + internal partial class ReplicationExtensionModelCollection + { + /// Initializes a new instance of ReplicationExtensionModelCollection. + internal ReplicationExtensionModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of ReplicationExtensionModelCollection. + /// Gets or sets the list of replication extensions. + /// Gets or sets the value of next link. + internal ReplicationExtensionModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of replication extensions. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..f76fb8f632be --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ReplicationExtensionModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static ReplicationExtensionModelCustomProperties DeserializeReplicationExtensionModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHCIReplicationExtensionModelCustomProperties.DeserializeHyperVToAzStackHCIReplicationExtensionModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHCIReplicationExtensionModelCustomProperties.DeserializeVMwareToAzStackHCIReplicationExtensionModelCustomProperties(element); + } + } + return UnknownReplicationExtensionModelCustomProperties.DeserializeUnknownReplicationExtensionModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs new file mode 100644 index 000000000000..d2143c5b5569 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class ReplicationExtensionModelCustomProperties + { + /// Initializes a new instance of ReplicationExtensionModelCustomProperties. + protected ReplicationExtensionModelCustomProperties() + { + } + + /// Initializes a new instance of ReplicationExtensionModelCustomProperties. + /// Gets or sets the instance type. + internal ReplicationExtensionModelCustomProperties(ReplicationType instanceType) + { + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + internal ReplicationType InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs new file mode 100644 index 000000000000..a3c34072e738 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class ReplicationExtensionModelData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static ReplicationExtensionModelData DeserializeReplicationExtensionModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ReplicationExtensionModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = ReplicationExtensionModelProperties.DeserializeReplicationExtensionModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ReplicationExtensionModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.Serialization.cs new file mode 100644 index 000000000000..9491ba7236aa --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ReplicationExtensionModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties); + writer.WriteEndObject(); + } + + internal static ReplicationExtensionModelProperties DeserializeReplicationExtensionModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + ReplicationExtensionModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = ReplicationExtensionModelCustomProperties.DeserializeReplicationExtensionModelCustomProperties(property.Value); + continue; + } + } + return new ReplicationExtensionModelProperties(Optional.ToNullable(provisioningState), customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.cs new file mode 100644 index 000000000000..c76ac0fe4732 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Replication extension model properties. + public partial class ReplicationExtensionModelProperties + { + /// Initializes a new instance of ReplicationExtensionModelProperties. + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public ReplicationExtensionModelProperties(ReplicationExtensionModelCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + CustomProperties = customProperties; + } + + /// Initializes a new instance of ReplicationExtensionModelProperties. + /// Gets or sets the provisioning state of the replication extension. + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + internal ReplicationExtensionModelProperties(ProvisioningState? provisioningState, ReplicationExtensionModelCustomProperties customProperties) + { + ProvisioningState = provisioningState; + CustomProperties = customProperties; + } + + /// Gets or sets the provisioning state of the replication extension. + public ProvisioningState? ProvisioningState { get; } + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public ReplicationExtensionModelCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs new file mode 100644 index 000000000000..063e7bb68824 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the instance type. + internal readonly partial struct ReplicationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ReplicationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string VMwareToAvsValue = "VMwareToAvs"; + private const string VMwareToAvsFailbackValue = "VMwareToAvsFailback"; + private const string VMwareToAzureMigrateValue = "VMwareToAzureMigrate"; + private const string HyperVToAzStackHCIValue = "HyperVToAzStackHCI"; + private const string VMwareToAzStackHCIValue = "VMwareToAzStackHCI"; + + /// None. + public static ReplicationType None { get; } = new ReplicationType(NoneValue); + /// VMwareToAvs. + public static ReplicationType VMwareToAvs { get; } = new ReplicationType(VMwareToAvsValue); + /// VMwareToAvsFailback. + public static ReplicationType VMwareToAvsFailback { get; } = new ReplicationType(VMwareToAvsFailbackValue); + /// VMwareToAzureMigrate. + public static ReplicationType VMwareToAzureMigrate { get; } = new ReplicationType(VMwareToAzureMigrateValue); + /// HyperVToAzStackHCI. + public static ReplicationType HyperVToAzStackHCI { get; } = new ReplicationType(HyperVToAzStackHCIValue); + /// VMwareToAzStackHCI. + public static ReplicationType VMwareToAzStackHCI { get; } = new ReplicationType(VMwareToAzStackHCIValue); + /// Determines if two values are the same. + public static bool operator ==(ReplicationType left, ReplicationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReplicationType left, ReplicationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ReplicationType(string value) => new ReplicationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReplicationType other && Equals(other); + /// + public bool Equals(ReplicationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs new file mode 100644 index 000000000000..907ccdfa6597 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the type of vault. + public readonly partial struct ReplicationVaultType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ReplicationVaultType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisasterRecoveryValue = "DisasterRecovery"; + private const string MigrateValue = "Migrate"; + + /// DisasterRecovery. + public static ReplicationVaultType DisasterRecovery { get; } = new ReplicationVaultType(DisasterRecoveryValue); + /// Migrate. + public static ReplicationVaultType Migrate { get; } = new ReplicationVaultType(MigrateValue); + /// Determines if two values are the same. + public static bool operator ==(ReplicationVaultType left, ReplicationVaultType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReplicationVaultType left, ReplicationVaultType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ReplicationVaultType(string value) => new ReplicationVaultType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReplicationVaultType other && Equals(other); + /// + public bool Equals(ReplicationVaultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs new file mode 100644 index 000000000000..04f5ff71946f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the resynchronization state. + public readonly partial struct ResynchronizationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResynchronizationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ResynchronizationInitiatedValue = "ResynchronizationInitiated"; + private const string ResynchronizationCompletedValue = "ResynchronizationCompleted"; + private const string ResynchronizationFailedValue = "ResynchronizationFailed"; + + /// None. + public static ResynchronizationState None { get; } = new ResynchronizationState(NoneValue); + /// ResynchronizationInitiated. + public static ResynchronizationState ResynchronizationInitiated { get; } = new ResynchronizationState(ResynchronizationInitiatedValue); + /// ResynchronizationCompleted. + public static ResynchronizationState ResynchronizationCompleted { get; } = new ResynchronizationState(ResynchronizationCompletedValue); + /// ResynchronizationFailed. + public static ResynchronizationState ResynchronizationFailed { get; } = new ResynchronizationState(ResynchronizationFailedValue); + /// Determines if two values are the same. + public static bool operator ==(ResynchronizationState left, ResynchronizationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResynchronizationState left, ResynchronizationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ResynchronizationState(string value) => new ResynchronizationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResynchronizationState other && Equals(other); + /// + public bool Equals(ResynchronizationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.Serialization.cs new file mode 100644 index 000000000000..48709f6dd0a6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class StorageContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("clusterSharedVolumePath"u8); + writer.WriteStringValue(ClusterSharedVolumePath); + writer.WriteEndObject(); + } + + internal static StorageContainerProperties DeserializeStorageContainerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string clusterSharedVolumePath = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("clusterSharedVolumePath"u8)) + { + clusterSharedVolumePath = property.Value.GetString(); + continue; + } + } + return new StorageContainerProperties(name, clusterSharedVolumePath); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.cs new file mode 100644 index 000000000000..2cb8b832dca2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Storage container properties. + public partial class StorageContainerProperties + { + /// Initializes a new instance of StorageContainerProperties. + /// Gets or sets the Name. + /// Gets or sets the ClusterSharedVolumePath. + /// or is null. + public StorageContainerProperties(string name, string clusterSharedVolumePath) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(clusterSharedVolumePath, nameof(clusterSharedVolumePath)); + + Name = name; + ClusterSharedVolumePath = clusterSharedVolumePath; + } + + /// Gets or sets the Name. + public string Name { get; set; } + /// Gets or sets the ClusterSharedVolumePath. + public string ClusterSharedVolumePath { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.Serialization.cs new file mode 100644 index 000000000000..998a1b20a6e8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class TaskModel + { + internal static TaskModel DeserializeTaskModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional taskName = default; + Optional state = default; + Optional startTime = default; + Optional endTime = default; + Optional customProperties = default; + Optional> childrenWorkflows = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("taskName"u8)) + { + taskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new TaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customProperties = TaskModelCustomProperties.DeserializeTaskModelCustomProperties(property.Value); + continue; + } + if (property.NameEquals("childrenWorkflows"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowModelData.DeserializeWorkflowModelData(item)); + } + childrenWorkflows = array; + continue; + } + } + return new TaskModel(taskName.Value, Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), customProperties.Value, Optional.ToList(childrenWorkflows)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.cs new file mode 100644 index 000000000000..5cb402677419 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Task model. + public partial class TaskModel + { + /// Initializes a new instance of TaskModel. + internal TaskModel() + { + ChildrenWorkflows = new ChangeTrackingList(); + } + + /// Initializes a new instance of TaskModel. + /// Gets or sets the task name. + /// Gets or sets the task state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Task model custom properties. + /// Gets or sets the list of children workflow models. + internal TaskModel(string taskName, TaskState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, TaskModelCustomProperties customProperties, IReadOnlyList childrenWorkflows) + { + TaskName = taskName; + State = state; + StartOn = startOn; + EndOn = endOn; + CustomProperties = customProperties; + ChildrenWorkflows = childrenWorkflows; + } + + /// Gets or sets the task name. + public string TaskName { get; } + /// Gets or sets the task state. + public TaskState? State { get; } + /// Gets or sets the start time. + public DateTimeOffset? StartOn { get; } + /// Gets or sets the end time. + public DateTimeOffset? EndOn { get; } + /// Task model custom properties. + internal TaskModelCustomProperties CustomProperties { get; } + /// Gets or sets the instance type. + public string CustomInstanceType + { + get => CustomProperties?.InstanceType; + } + + /// Gets or sets the list of children workflow models. + public IReadOnlyList ChildrenWorkflows { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..577eab7df412 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class TaskModelCustomProperties + { + internal static TaskModelCustomProperties DeserializeTaskModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new TaskModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.cs new file mode 100644 index 000000000000..2f8c5d476d91 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModelCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Task model custom properties. + internal partial class TaskModelCustomProperties + { + /// Initializes a new instance of TaskModelCustomProperties. + /// Gets or sets the instance type. + /// is null. + internal TaskModelCustomProperties(string instanceType) + { + Argument.AssertNotNull(instanceType, nameof(instanceType)); + + InstanceType = instanceType; + } + + /// Gets or sets the instance type. + public string InstanceType { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs new file mode 100644 index 000000000000..cb223580b258 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the task state. + public readonly partial struct TaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string StartedValue = "Started"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string SkippedValue = "Skipped"; + + /// Pending. + public static TaskState Pending { get; } = new TaskState(PendingValue); + /// Started. + public static TaskState Started { get; } = new TaskState(StartedValue); + /// Succeeded. + public static TaskState Succeeded { get; } = new TaskState(SucceededValue); + /// Failed. + public static TaskState Failed { get; } = new TaskState(FailedValue); + /// Cancelled. + public static TaskState Cancelled { get; } = new TaskState(CancelledValue); + /// Skipped. + public static TaskState Skipped { get; } = new TaskState(SkippedValue); + /// Determines if two values are the same. + public static bool operator ==(TaskState left, TaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TaskState left, TaskState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TaskState(string value) => new TaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TaskState other && Equals(other); + /// + public bool Equals(TaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..e53f071e1b65 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class TestFailoverCleanupWorkflowModelCustomProperties + { + internal static TestFailoverCleanupWorkflowModelCustomProperties DeserializeTestFailoverCleanupWorkflowModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional comments = default; + WorkflowDetailsType instanceType = default; + Optional> affectedObjectDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("comments"u8)) + { + comments = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new WorkflowDetailsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + affectedObjectDetails = dictionary; + continue; + } + } + return new TestFailoverCleanupWorkflowModelCustomProperties(instanceType, Optional.ToDictionary(affectedObjectDetails), comments.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs new file mode 100644 index 000000000000..bb0e0764aa06 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Test failover cleanup workflow model custom properties. + public partial class TestFailoverCleanupWorkflowModelCustomProperties : WorkflowModelCustomProperties + { + /// Initializes a new instance of TestFailoverCleanupWorkflowModelCustomProperties. + internal TestFailoverCleanupWorkflowModelCustomProperties() + { + InstanceType = WorkflowDetailsType.TestFailoverCleanupWorkflowDetails; + } + + /// Initializes a new instance of TestFailoverCleanupWorkflowModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the test failover cleanup comments. + internal TestFailoverCleanupWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails, string comments) : base(instanceType, affectedObjectDetails) + { + Comments = comments; + InstanceType = instanceType; + } + + /// Gets or sets the test failover cleanup comments. + public string Comments { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs new file mode 100644 index 000000000000..18a63eb8e4a0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the test failover state. + public readonly partial struct TestFailoverState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TestFailoverState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string TestFailoverInitiatedValue = "TestFailoverInitiated"; + private const string TestFailoverCompletingValue = "TestFailoverCompleting"; + private const string TestFailoverCompletedValue = "TestFailoverCompleted"; + private const string TestFailoverFailedValue = "TestFailoverFailed"; + private const string TestFailoverCompletionFailedValue = "TestFailoverCompletionFailed"; + private const string TestFailoverCleanupInitiatedValue = "TestFailoverCleanupInitiated"; + private const string TestFailoverCleanupCompletingValue = "TestFailoverCleanupCompleting"; + private const string MarkedForDeletionValue = "MarkedForDeletion"; + + /// None. + public static TestFailoverState None { get; } = new TestFailoverState(NoneValue); + /// TestFailoverInitiated. + public static TestFailoverState TestFailoverInitiated { get; } = new TestFailoverState(TestFailoverInitiatedValue); + /// TestFailoverCompleting. + public static TestFailoverState TestFailoverCompleting { get; } = new TestFailoverState(TestFailoverCompletingValue); + /// TestFailoverCompleted. + public static TestFailoverState TestFailoverCompleted { get; } = new TestFailoverState(TestFailoverCompletedValue); + /// TestFailoverFailed. + public static TestFailoverState TestFailoverFailed { get; } = new TestFailoverState(TestFailoverFailedValue); + /// TestFailoverCompletionFailed. + public static TestFailoverState TestFailoverCompletionFailed { get; } = new TestFailoverState(TestFailoverCompletionFailedValue); + /// TestFailoverCleanupInitiated. + public static TestFailoverState TestFailoverCleanupInitiated { get; } = new TestFailoverState(TestFailoverCleanupInitiatedValue); + /// TestFailoverCleanupCompleting. + public static TestFailoverState TestFailoverCleanupCompleting { get; } = new TestFailoverState(TestFailoverCleanupCompletingValue); + /// MarkedForDeletion. + public static TestFailoverState MarkedForDeletion { get; } = new TestFailoverState(MarkedForDeletionValue); + /// Determines if two values are the same. + public static bool operator ==(TestFailoverState left, TestFailoverState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TestFailoverState left, TestFailoverState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TestFailoverState(string value) => new TestFailoverState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TestFailoverState other && Equals(other); + /// + public bool Equals(TestFailoverState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..0a2a5a61ffef --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class TestFailoverWorkflowModelCustomProperties + { + internal static TestFailoverWorkflowModelCustomProperties DeserializeTestFailoverWorkflowModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> protectedItemDetails = default; + WorkflowDetailsType instanceType = default; + Optional> affectedObjectDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectedItemDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailoverProtectedItemProperties.DeserializeFailoverProtectedItemProperties(item)); + } + protectedItemDetails = array; + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new WorkflowDetailsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + affectedObjectDetails = dictionary; + continue; + } + } + return new TestFailoverWorkflowModelCustomProperties(instanceType, Optional.ToDictionary(affectedObjectDetails), Optional.ToList(protectedItemDetails)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs new file mode 100644 index 000000000000..11a08c032dcd --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Test failover workflow model custom properties. + public partial class TestFailoverWorkflowModelCustomProperties : WorkflowModelCustomProperties + { + /// Initializes a new instance of TestFailoverWorkflowModelCustomProperties. + internal TestFailoverWorkflowModelCustomProperties() + { + ProtectedItemDetails = new ChangeTrackingList(); + InstanceType = WorkflowDetailsType.TestFailoverWorkflowDetails; + } + + /// Initializes a new instance of TestFailoverWorkflowModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the test VM details. + internal TestFailoverWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails) + { + ProtectedItemDetails = protectedItemDetails; + InstanceType = instanceType; + } + + /// Gets or sets the test VM details. + public IReadOnlyList ProtectedItemDetails { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..ad764a7f1f5e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDraModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownDraModelCustomProperties DeserializeUnknownDraModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FabricType instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new UnknownDraModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs new file mode 100644 index 000000000000..c1e924fe05ce --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownDraModelCustomProperties. + internal partial class UnknownDraModelCustomProperties : DraModelCustomProperties + { + /// Initializes a new instance of UnknownDraModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownDraModelCustomProperties(FabricType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..9895db45e97f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownEventModelCustomProperties + { + internal static UnknownEventModelCustomProperties DeserializeUnknownEventModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ReplicationType instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new UnknownEventModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs new file mode 100644 index 000000000000..03abb2e692a8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownEventModelCustomProperties. + internal partial class UnknownEventModelCustomProperties : EventModelCustomProperties + { + /// Initializes a new instance of UnknownEventModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownEventModelCustomProperties(ReplicationType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..075c8ecf4b53 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownFabricModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownFabricModelCustomProperties DeserializeUnknownFabricModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FabricType instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new UnknownFabricModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs new file mode 100644 index 000000000000..e42d3d1116d8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownFabricModelCustomProperties. + internal partial class UnknownFabricModelCustomProperties : FabricModelCustomProperties + { + /// Initializes a new instance of UnknownFabricModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownFabricModelCustomProperties(FabricType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..4221531672a6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownPlannedFailoverModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static UnknownPlannedFailoverModelCustomProperties DeserializeUnknownPlannedFailoverModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new UnknownPlannedFailoverModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.cs new file mode 100644 index 000000000000..80fa2eaeb23b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownPlannedFailoverModelCustomProperties. + internal partial class UnknownPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties + { + /// Initializes a new instance of UnknownPlannedFailoverModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownPlannedFailoverModelCustomProperties(string instanceType) : base(instanceType) + { + InstanceType = instanceType ?? "Unknown"; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..871200c7228b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownPolicyModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownPolicyModelCustomProperties DeserializeUnknownPolicyModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ReplicationType instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new UnknownPolicyModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs new file mode 100644 index 000000000000..71cb6b67c787 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownPolicyModelCustomProperties. + internal partial class UnknownPolicyModelCustomProperties : PolicyModelCustomProperties + { + /// Initializes a new instance of UnknownPolicyModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownPolicyModelCustomProperties(ReplicationType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..f26baf9f9231 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownProtectedItemModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownProtectedItemModelCustomProperties DeserializeUnknownProtectedItemModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ReplicationType instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new UnknownProtectedItemModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs new file mode 100644 index 000000000000..1b11d0626028 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownProtectedItemModelCustomProperties. + internal partial class UnknownProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties + { + /// Initializes a new instance of UnknownProtectedItemModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownProtectedItemModelCustomProperties(ReplicationType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..3be4455f8237 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownRecoveryPointModelCustomProperties + { + internal static UnknownRecoveryPointModelCustomProperties DeserializeUnknownRecoveryPointModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ReplicationType instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new UnknownRecoveryPointModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs new file mode 100644 index 000000000000..ddb6c5741176 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownRecoveryPointModelCustomProperties. + internal partial class UnknownRecoveryPointModelCustomProperties : RecoveryPointModelCustomProperties + { + /// Initializes a new instance of UnknownRecoveryPointModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownRecoveryPointModelCustomProperties(ReplicationType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..862ef4ce45ed --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownReplicationExtensionModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownReplicationExtensionModelCustomProperties DeserializeUnknownReplicationExtensionModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ReplicationType instanceType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new UnknownReplicationExtensionModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs new file mode 100644 index 000000000000..3d4dfed16e7c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownReplicationExtensionModelCustomProperties. + internal partial class UnknownReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties + { + /// Initializes a new instance of UnknownReplicationExtensionModelCustomProperties. + /// Gets or sets the instance type. + internal UnknownReplicationExtensionModelCustomProperties(ReplicationType instanceType) : base(instanceType) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..b8c2826e3176 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownWorkflowModelCustomProperties + { + internal static UnknownWorkflowModelCustomProperties DeserializeUnknownWorkflowModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowDetailsType instanceType = "Unknown"; + Optional> affectedObjectDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = new WorkflowDetailsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + affectedObjectDetails = dictionary; + continue; + } + } + return new UnknownWorkflowModelCustomProperties(instanceType, Optional.ToDictionary(affectedObjectDetails)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs new file mode 100644 index 000000000000..9f9b937b8c70 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The UnknownWorkflowModelCustomProperties. + internal partial class UnknownWorkflowModelCustomProperties : WorkflowModelCustomProperties + { + /// Initializes a new instance of UnknownWorkflowModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets any custom properties of the affected object. + internal UnknownWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails) : base(instanceType, affectedObjectDetails) + { + InstanceType = instanceType; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..cbd9e7d87f01 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareDraModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("biosId"u8); + writer.WriteStringValue(BiosId); + writer.WritePropertyName("marsAuthenticationIdentity"u8); + writer.WriteObjectValue(MarsAuthenticationIdentity); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static VMwareDraModelCustomProperties DeserializeVMwareDraModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string biosId = default; + IdentityModel marsAuthenticationIdentity = default; + FabricType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("biosId"u8)) + { + biosId = property.Value.GetString(); + continue; + } + if (property.NameEquals("marsAuthenticationIdentity"u8)) + { + marsAuthenticationIdentity = IdentityModel.DeserializeIdentityModel(property.Value); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new VMwareDraModelCustomProperties(instanceType, biosId, marsAuthenticationIdentity); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs new file mode 100644 index 000000000000..730cffa0dbea --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware DRA model custom properties. + public partial class VMwareDraModelCustomProperties : DraModelCustomProperties + { + /// Initializes a new instance of VMwareDraModelCustomProperties. + /// Gets or sets the BIOS Id of the DRA machine. + /// Identity model. + /// or is null. + public VMwareDraModelCustomProperties(string biosId, IdentityModel marsAuthenticationIdentity) + { + Argument.AssertNotNull(biosId, nameof(biosId)); + Argument.AssertNotNull(marsAuthenticationIdentity, nameof(marsAuthenticationIdentity)); + + BiosId = biosId; + MarsAuthenticationIdentity = marsAuthenticationIdentity; + InstanceType = FabricType.VMware; + } + + /// Initializes a new instance of VMwareDraModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the BIOS Id of the DRA machine. + /// Identity model. + internal VMwareDraModelCustomProperties(FabricType instanceType, string biosId, IdentityModel marsAuthenticationIdentity) : base(instanceType) + { + BiosId = biosId; + MarsAuthenticationIdentity = marsAuthenticationIdentity; + InstanceType = instanceType; + } + + /// Gets or sets the BIOS Id of the DRA machine. + public string BiosId { get; set; } + /// Identity model. + public IdentityModel MarsAuthenticationIdentity { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..0682b57f8519 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareMigrateFabricModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("vmwareSiteId"u8); + writer.WriteStringValue(VmwareSiteId); + writer.WritePropertyName("migrationSolutionId"u8); + writer.WriteStringValue(MigrationSolutionId); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static VMwareMigrateFabricModelCustomProperties DeserializeVMwareMigrateFabricModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmwareSiteId = default; + string migrationSolutionId = default; + FabricType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmwareSiteId"u8)) + { + vmwareSiteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrationSolutionId"u8)) + { + migrationSolutionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new FabricType(property.Value.GetString()); + continue; + } + } + return new VMwareMigrateFabricModelCustomProperties(instanceType, vmwareSiteId, migrationSolutionId); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs new file mode 100644 index 000000000000..733c09896bd0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware migrate fabric model custom properties. + public partial class VMwareMigrateFabricModelCustomProperties : FabricModelCustomProperties + { + /// Initializes a new instance of VMwareMigrateFabricModelCustomProperties. + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the migration solution. + /// or is null. + public VMwareMigrateFabricModelCustomProperties(string vmwareSiteId, string migrationSolutionId) + { + Argument.AssertNotNull(vmwareSiteId, nameof(vmwareSiteId)); + Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); + + VmwareSiteId = vmwareSiteId; + MigrationSolutionId = migrationSolutionId; + InstanceType = FabricType.VMwareMigrate; + } + + /// Initializes a new instance of VMwareMigrateFabricModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the migration solution. + internal VMwareMigrateFabricModelCustomProperties(FabricType instanceType, string vmwareSiteId, string migrationSolutionId) : base(instanceType) + { + VmwareSiteId = vmwareSiteId; + MigrationSolutionId = migrationSolutionId; + InstanceType = instanceType; + } + + /// Gets or sets the ARM Id of the VMware site. + public string VmwareSiteId { get; set; } + /// Gets or sets the ARM Id of the migration solution. + public string MigrationSolutionId { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.Serialization.cs new file mode 100644 index 000000000000..b8491d26c816 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCIDiskInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("diskId"u8); + writer.WriteStringValue(DiskId); + if (Optional.IsDefined(StorageContainerId)) + { + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + } + if (Optional.IsDefined(IsDynamic)) + { + writer.WritePropertyName("isDynamic"u8); + writer.WriteBooleanValue(IsDynamic.Value); + } + writer.WritePropertyName("diskSizeGB"u8); + writer.WriteNumberValue(DiskSizeGB); + writer.WritePropertyName("diskFileFormat"u8); + writer.WriteStringValue(DiskFileFormat); + writer.WritePropertyName("isOsDisk"u8); + writer.WriteBooleanValue(IsOSDisk); + writer.WriteEndObject(); + } + + internal static VMwareToAzStackHCIDiskInput DeserializeVMwareToAzStackHCIDiskInput(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string diskId = default; + Optional storageContainerId = default; + Optional isDynamic = default; + long diskSizeGB = default; + string diskFileFormat = default; + bool isOSDisk = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskId"u8)) + { + diskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskSizeGB"u8)) + { + diskSizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskFileFormat"u8)) + { + diskFileFormat = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + isOSDisk = property.Value.GetBoolean(); + continue; + } + } + return new VMwareToAzStackHCIDiskInput(diskId, storageContainerId.Value, Optional.ToNullable(isDynamic), diskSizeGB, diskFileFormat, isOSDisk); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.cs new file mode 100644 index 000000000000..9aa5482d4412 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStack disk input. + public partial class VMwareToAzStackHCIDiskInput + { + /// Initializes a new instance of VMwareToAzStackHCIDiskInput. + /// Gets or sets the disk Id. + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + /// or is null. + public VMwareToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) + { + Argument.AssertNotNull(diskId, nameof(diskId)); + Argument.AssertNotNull(diskFileFormat, nameof(diskFileFormat)); + + DiskId = diskId; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + } + + /// Initializes a new instance of VMwareToAzStackHCIDiskInput. + /// Gets or sets the disk Id. + /// Gets or sets the target storage account ARM Id. + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + internal VMwareToAzStackHCIDiskInput(string diskId, string storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk) + { + DiskId = diskId; + StorageContainerId = storageContainerId; + IsDynamic = isDynamic; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + } + + /// Gets or sets the disk Id. + public string DiskId { get; set; } + /// Gets or sets the target storage account ARM Id. + public string StorageContainerId { get; set; } + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + public bool? IsDynamic { get; set; } + /// Gets or sets the disk size in GB. + public long DiskSizeGB { get; set; } + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + public string DiskFileFormat { get; set; } + /// Gets or sets a value indicating whether disk is os disk. + public bool IsOSDisk { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.Serialization.cs new file mode 100644 index 000000000000..77dbe544484e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCINicInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("nicId"u8); + writer.WriteStringValue(NicId); + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + writer.WritePropertyName("selectionTypeForFailover"u8); + writer.WriteStringValue(SelectionTypeForFailover.ToString()); + writer.WriteEndObject(); + } + + internal static VMwareToAzStackHCINicInput DeserializeVMwareToAzStackHCINicInput(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nicId = default; + string label = default; + Optional networkName = default; + string targetNetworkId = default; + string testNetworkId = default; + VmNicSelection selectionTypeForFailover = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + } + return new VMwareToAzStackHCINicInput(nicId, label, networkName.Value, targetNetworkId, testNetworkId, selectionTypeForFailover); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.cs new file mode 100644 index 000000000000..7bd58761dcd9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStackHCI NIC properties. + public partial class VMwareToAzStackHCINicInput + { + /// Initializes a new instance of VMwareToAzStackHCINicInput. + /// Gets or sets the NIC Id. + /// Gets or sets the NIC label. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// , , or is null. + public VMwareToAzStackHCINicInput(string nicId, string label, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + { + Argument.AssertNotNull(nicId, nameof(nicId)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(targetNetworkId, nameof(targetNetworkId)); + Argument.AssertNotNull(testNetworkId, nameof(testNetworkId)); + + NicId = nicId; + Label = label; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Initializes a new instance of VMwareToAzStackHCINicInput. + /// Gets or sets the NIC Id. + /// Gets or sets the NIC label. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + internal VMwareToAzStackHCINicInput(string nicId, string label, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + { + NicId = nicId; + Label = label; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Gets or sets the NIC Id. + public string NicId { get; set; } + /// Gets or sets the NIC label. + public string Label { get; set; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection SelectionTypeForFailover { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..f22a636af9c8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCIPlannedFailoverModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("shutdownSourceVM"u8); + writer.WriteBooleanValue(ShutdownSourceVm); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static VMwareToAzStackHCIPlannedFailoverModelCustomProperties DeserializeVMwareToAzStackHCIPlannedFailoverModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool shutdownSourceVm = default; + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("shutdownSourceVM"u8)) + { + shutdownSourceVm = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new VMwareToAzStackHCIPlannedFailoverModelCustomProperties(instanceType, shutdownSourceVm); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs new file mode 100644 index 000000000000..d9a88b27d55d --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI planned failover model custom properties. + public partial class VMwareToAzStackHCIPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties + { + /// Initializes a new instance of VMwareToAzStackHCIPlannedFailoverModelCustomProperties. + /// Gets or sets a value indicating whether VM needs to be shut down. + public VMwareToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of VMwareToAzStackHCIPlannedFailoverModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets a value indicating whether VM needs to be shut down. + internal VMwareToAzStackHCIPlannedFailoverModelCustomProperties(string instanceType, bool shutdownSourceVm) : base(instanceType) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; + } + + /// Gets or sets a value indicating whether VM needs to be shut down. + public bool ShutdownSourceVm { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..3adc27042ea6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCIPolicyModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("recoveryPointHistoryInMinutes"u8); + writer.WriteNumberValue(RecoveryPointHistoryInMinutes); + writer.WritePropertyName("crashConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(CrashConsistentFrequencyInMinutes); + writer.WritePropertyName("appConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(AppConsistentFrequencyInMinutes); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static VMwareToAzStackHCIPolicyModelCustomProperties DeserializeVMwareToAzStackHCIPolicyModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int recoveryPointHistoryInMinutes = default; + int crashConsistentFrequencyInMinutes = default; + int appConsistentFrequencyInMinutes = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointHistoryInMinutes"u8)) + { + recoveryPointHistoryInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("crashConsistentFrequencyInMinutes"u8)) + { + crashConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("appConsistentFrequencyInMinutes"u8)) + { + appConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new VMwareToAzStackHCIPolicyModelCustomProperties(instanceType, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs new file mode 100644 index 000000000000..0a26a4d8ec1c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware To AzStackHCI Policy model custom properties. + public partial class VMwareToAzStackHCIPolicyModelCustomProperties : PolicyModelCustomProperties + { + /// Initializes a new instance of VMwareToAzStackHCIPolicyModelCustomProperties. + /// + /// Gets or sets the duration in minutes until which the recovery points need to be + /// stored. + /// + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = ReplicationType.VMwareToAzStackHCI; + } + + /// Initializes a new instance of VMwareToAzStackHCIPolicyModelCustomProperties. + /// Gets or sets the instance type. + /// + /// Gets or sets the duration in minutes until which the recovery points need to be + /// stored. + /// + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + internal VMwareToAzStackHCIPolicyModelCustomProperties(ReplicationType instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = instanceType; + } + + /// + /// Gets or sets the duration in minutes until which the recovery points need to be + /// stored. + /// + public int RecoveryPointHistoryInMinutes { get; set; } + /// Gets or sets the crash consistent snapshot frequency (in minutes). + public int CrashConsistentFrequencyInMinutes { get; set; } + /// Gets or sets the app consistent snapshot frequency (in minutes). + public int AppConsistentFrequencyInMinutes { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs new file mode 100644 index 000000000000..7de80043d7df --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCIProtectedDiskProperties + { + internal static VMwareToAzStackHCIProtectedDiskProperties DeserializeVMwareToAzStackHCIProtectedDiskProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional storageContainerId = default; + Optional storageContainerLocalPath = default; + Optional sourceDiskId = default; + Optional sourceDiskName = default; + Optional seedDiskName = default; + Optional testMigrateDiskName = default; + Optional migrateDiskName = default; + Optional isOSDisk = default; + Optional capacityInBytes = default; + Optional isDynamic = default; + Optional diskType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerLocalPath"u8)) + { + storageContainerLocalPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskId"u8)) + { + sourceDiskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskName"u8)) + { + sourceDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("seedDiskName"u8)) + { + seedDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("testMigrateDiskName"u8)) + { + testMigrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrateDiskName"u8)) + { + migrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isOSDisk = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("capacityInBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityInBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskType"u8)) + { + diskType = property.Value.GetString(); + continue; + } + } + return new VMwareToAzStackHCIProtectedDiskProperties(storageContainerId.Value, storageContainerLocalPath.Value, sourceDiskId.Value, sourceDiskName.Value, seedDiskName.Value, testMigrateDiskName.Value, migrateDiskName.Value, Optional.ToNullable(isOSDisk), Optional.ToNullable(capacityInBytes), Optional.ToNullable(isDynamic), diskType.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.cs new file mode 100644 index 000000000000..def196d1c3d4 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStackHCI protected disk properties. + public partial class VMwareToAzStackHCIProtectedDiskProperties + { + /// Initializes a new instance of VMwareToAzStackHCIProtectedDiskProperties. + internal VMwareToAzStackHCIProtectedDiskProperties() + { + } + + /// Initializes a new instance of VMwareToAzStackHCIProtectedDiskProperties. + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + /// Gets or sets the disk type. + internal VMwareToAzStackHCIProtectedDiskProperties(string storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType) + { + StorageContainerId = storageContainerId; + StorageContainerLocalPath = storageContainerLocalPath; + SourceDiskId = sourceDiskId; + SourceDiskName = sourceDiskName; + SeedDiskName = seedDiskName; + TestMigrateDiskName = testMigrateDiskName; + MigrateDiskName = migrateDiskName; + IsOSDisk = isOSDisk; + CapacityInBytes = capacityInBytes; + IsDynamic = isDynamic; + DiskType = diskType; + } + + /// Gets or sets the ARM Id of the storage container. + public string StorageContainerId { get; } + /// Gets or sets the local path of the storage container. + public string StorageContainerLocalPath { get; } + /// Gets or sets the source disk Id. + public string SourceDiskId { get; } + /// Gets or sets the source disk Name. + public string SourceDiskName { get; } + /// Gets or sets the seed disk name. + public string SeedDiskName { get; } + /// Gets or sets the test failover clone disk. + public string TestMigrateDiskName { get; } + /// Gets or sets the failover clone disk. + public string MigrateDiskName { get; } + /// Gets or sets a value indicating whether the disk is the OS disk. + public bool? IsOSDisk { get; } + /// Gets or sets the disk capacity in bytes. + public long? CapacityInBytes { get; } + /// + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard + /// disk. + /// + public bool? IsDynamic { get; } + /// Gets or sets the disk type. + public string DiskType { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..a1ffa69a0b37 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCIProtectedItemModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("targetHciClusterId"u8); + writer.WriteStringValue(TargetHciClusterId); + writer.WritePropertyName("targetArcClusterCustomLocationId"u8); + writer.WriteStringValue(TargetArcClusterCustomLocationId); + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + writer.WritePropertyName("targetResourceGroupId"u8); + writer.WriteStringValue(TargetResourceGroupId); + writer.WritePropertyName("customLocationRegion"u8); + writer.WriteStringValue(CustomLocationRegion); + writer.WritePropertyName("disksToInclude"u8); + writer.WriteStartArray(); + foreach (var item in DisksToInclude) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("nicsToInclude"u8); + writer.WriteStartArray(); + foreach (var item in NicsToInclude) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(TargetVmName)) + { + writer.WritePropertyName("targetVmName"u8); + writer.WriteStringValue(TargetVmName); + } + writer.WritePropertyName("hyperVGeneration"u8); + writer.WriteStringValue(HyperVGeneration); + if (Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + if (Optional.IsDefined(TargetCpuCores)) + { + writer.WritePropertyName("targetCpuCores"u8); + writer.WriteNumberValue(TargetCpuCores.Value); + } + if (Optional.IsDefined(IsDynamicRam)) + { + writer.WritePropertyName("isDynamicRam"u8); + writer.WriteBooleanValue(IsDynamicRam.Value); + } + if (Optional.IsDefined(DynamicMemoryConfig)) + { + writer.WritePropertyName("dynamicMemoryConfig"u8); + writer.WriteObjectValue(DynamicMemoryConfig); + } + if (Optional.IsDefined(TargetMemoryInMegaBytes)) + { + writer.WritePropertyName("targetMemoryInMegaBytes"u8); + writer.WriteNumberValue(TargetMemoryInMegaBytes.Value); + } + writer.WritePropertyName("fabricDiscoveryMachineId"u8); + writer.WriteStringValue(FabricDiscoveryMachineId); + writer.WritePropertyName("runAsAccountId"u8); + writer.WriteStringValue(RunAsAccountId); + writer.WritePropertyName("sourceDraName"u8); + writer.WriteStringValue(SourceDraName); + writer.WritePropertyName("targetDraName"u8); + writer.WriteStringValue(TargetDraName); + if (Optional.IsDefined(PerformAutoResync)) + { + writer.WritePropertyName("performAutoResync"u8); + writer.WriteBooleanValue(PerformAutoResync.Value); + } + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static VMwareToAzStackHCIProtectedItemModelCustomProperties DeserializeVMwareToAzStackHCIProtectedItemModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional activeLocation = default; + string targetHciClusterId = default; + string targetArcClusterCustomLocationId = default; + Optional targetAzStackHciClusterName = default; + string storageContainerId = default; + string targetResourceGroupId = default; + Optional targetLocation = default; + string customLocationRegion = default; + IList disksToInclude = default; + IList nicsToInclude = default; + Optional> protectedDisks = default; + Optional> protectedNics = default; + Optional targetVmBiosId = default; + Optional targetVmName = default; + string hyperVGeneration = default; + Optional targetNetworkId = default; + Optional testNetworkId = default; + Optional targetCpuCores = default; + Optional isDynamicRam = default; + Optional dynamicMemoryConfig = default; + Optional targetMemoryInMegaBytes = default; + Optional osType = default; + Optional osName = default; + Optional firmwareType = default; + string fabricDiscoveryMachineId = default; + Optional sourceVmName = default; + Optional sourceCpuCores = default; + Optional sourceMemoryInMegaBytes = default; + string runAsAccountId = default; + string sourceDraName = default; + string targetDraName = default; + Optional sourceApplianceName = default; + Optional targetApplianceName = default; + Optional failoverRecoveryPointId = default; + Optional lastRecoveryPointReceived = default; + Optional lastRecoveryPointId = default; + Optional initialReplicationProgressPercentage = default; + Optional migrationProgressPercentage = default; + Optional resumeProgressPercentage = default; + Optional resyncProgressPercentage = default; + Optional resyncRetryCount = default; + Optional resyncRequired = default; + Optional resyncState = default; + Optional performAutoResync = default; + Optional resumeRetryCount = default; + Optional lastReplicationUpdateTime = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("activeLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeLocation = new ProtectedItemActiveLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetHciClusterId"u8)) + { + targetHciClusterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetArcClusterCustomLocationId"u8)) + { + targetArcClusterCustomLocationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetAzStackHciClusterName"u8)) + { + targetAzStackHciClusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceGroupId"u8)) + { + targetResourceGroupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetLocation"u8)) + { + targetLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("customLocationRegion"u8)) + { + customLocationRegion = property.Value.GetString(); + continue; + } + if (property.NameEquals("disksToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHCIDiskInput.DeserializeVMwareToAzStackHCIDiskInput(item)); + } + disksToInclude = array; + continue; + } + if (property.NameEquals("nicsToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHCINicInput.DeserializeVMwareToAzStackHCINicInput(item)); + } + nicsToInclude = array; + continue; + } + if (property.NameEquals("protectedDisks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHCIProtectedDiskProperties.DeserializeVMwareToAzStackHCIProtectedDiskProperties(item)); + } + protectedDisks = array; + continue; + } + if (property.NameEquals("protectedNics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHCIProtectedNicProperties.DeserializeVMwareToAzStackHCIProtectedNicProperties(item)); + } + protectedNics = array; + continue; + } + if (property.NameEquals("targetVmBiosId"u8)) + { + targetVmBiosId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetVmName"u8)) + { + targetVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hyperVGeneration"u8)) + { + hyperVGeneration = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isDynamicRam"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamicRam = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dynamicMemoryConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicMemoryConfig = ProtectedItemDynamicMemoryConfig.DeserializeProtectedItemDynamicMemoryConfig(property.Value); + continue; + } + if (property.NameEquals("targetMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetMemoryInMegaBytes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = property.Value.GetString(); + continue; + } + if (property.NameEquals("osName"u8)) + { + osName = property.Value.GetString(); + continue; + } + if (property.NameEquals("firmwareType"u8)) + { + firmwareType = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricDiscoveryMachineId"u8)) + { + fabricDiscoveryMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceVmName"u8)) + { + sourceVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sourceMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceMemoryInMegaBytes = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("runAsAccountId"u8)) + { + runAsAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDraName"u8)) + { + sourceDraName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetDraName"u8)) + { + targetDraName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceApplianceName"u8)) + { + sourceApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetApplianceName"u8)) + { + targetApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("failoverRecoveryPointId"u8)) + { + failoverRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastRecoveryPointReceived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRecoveryPointReceived = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastRecoveryPointId"u8)) + { + lastRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("initialReplicationProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialReplicationProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("migrationProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resumeProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resumeProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resyncProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resyncRetryCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncRetryCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("resyncRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resyncState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncState = new VMwareToAzureMigrateResyncState(property.Value.GetString()); + continue; + } + if (property.NameEquals("performAutoResync"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + performAutoResync = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resumeRetryCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resumeRetryCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastReplicationUpdateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastReplicationUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new VMwareToAzStackHCIProtectedItemModelCustomProperties(instanceType, Optional.ToNullable(activeLocation), targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName.Value, storageContainerId, targetResourceGroupId, targetLocation.Value, customLocationRegion, disksToInclude, nicsToInclude, Optional.ToList(protectedDisks), Optional.ToList(protectedNics), targetVmBiosId.Value, targetVmName.Value, hyperVGeneration, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(targetCpuCores), Optional.ToNullable(isDynamicRam), dynamicMemoryConfig.Value, Optional.ToNullable(targetMemoryInMegaBytes), osType.Value, osName.Value, firmwareType.Value, fabricDiscoveryMachineId, sourceVmName.Value, Optional.ToNullable(sourceCpuCores), Optional.ToNullable(sourceMemoryInMegaBytes), runAsAccountId, sourceDraName, targetDraName, sourceApplianceName.Value, targetApplianceName.Value, failoverRecoveryPointId.Value, Optional.ToNullable(lastRecoveryPointReceived), lastRecoveryPointId.Value, Optional.ToNullable(initialReplicationProgressPercentage), Optional.ToNullable(migrationProgressPercentage), Optional.ToNullable(resumeProgressPercentage), Optional.ToNullable(resyncProgressPercentage), Optional.ToNullable(resyncRetryCount), Optional.ToNullable(resyncRequired), Optional.ToNullable(resyncState), Optional.ToNullable(performAutoResync), Optional.ToNullable(resumeRetryCount), Optional.ToNullable(lastReplicationUpdateTime)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs new file mode 100644 index 000000000000..77dfd292c9a0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI Protected item model custom properties. + public partial class VMwareToAzStackHCIProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties + { + /// Initializes a new instance of VMwareToAzStackHCIProtectedItemModelCustomProperties. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the run as account Id. + /// Gets or sets the source DRA name. + /// Gets or sets the target DRA name. + /// , , , , , , , , , , or is null. + public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string storageContainerId, string targetResourceGroupId, string customLocationRegion, IEnumerable disksToInclude, IEnumerable nicsToInclude, string hyperVGeneration, string fabricDiscoveryMachineId, string runAsAccountId, string sourceDraName, string targetDraName) + { + Argument.AssertNotNull(targetHciClusterId, nameof(targetHciClusterId)); + Argument.AssertNotNull(targetArcClusterCustomLocationId, nameof(targetArcClusterCustomLocationId)); + Argument.AssertNotNull(storageContainerId, nameof(storageContainerId)); + Argument.AssertNotNull(targetResourceGroupId, nameof(targetResourceGroupId)); + Argument.AssertNotNull(customLocationRegion, nameof(customLocationRegion)); + Argument.AssertNotNull(disksToInclude, nameof(disksToInclude)); + Argument.AssertNotNull(nicsToInclude, nameof(nicsToInclude)); + Argument.AssertNotNull(hyperVGeneration, nameof(hyperVGeneration)); + Argument.AssertNotNull(fabricDiscoveryMachineId, nameof(fabricDiscoveryMachineId)); + Argument.AssertNotNull(runAsAccountId, nameof(runAsAccountId)); + Argument.AssertNotNull(sourceDraName, nameof(sourceDraName)); + Argument.AssertNotNull(targetDraName, nameof(targetDraName)); + + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + StorageContainerId = storageContainerId; + TargetResourceGroupId = targetResourceGroupId; + CustomLocationRegion = customLocationRegion; + DisksToInclude = disksToInclude.ToList(); + NicsToInclude = nicsToInclude.ToList(); + ProtectedDisks = new ChangeTrackingList(); + ProtectedNics = new ChangeTrackingList(); + HyperVGeneration = hyperVGeneration; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + RunAsAccountId = runAsAccountId; + SourceDraName = sourceDraName; + TargetDraName = targetDraName; + InstanceType = ReplicationType.VMwareToAzStackHCI; + } + + /// Initializes a new instance of VMwareToAzStackHCIProtectedItemModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the target VM display name. + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the run as account Id. + /// Gets or sets the source DRA name. + /// Gets or sets the target DRA name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// + /// Gets or sets the initial replication progress percentage. This is calculated based on + /// total bytes processed for all disks in the source VM. + /// + /// Gets or sets the migration progress percentage. + /// Gets or sets the resume progress percentage. + /// + /// Gets or sets the resync progress percentage. This is calculated based on total bytes + /// processed for all disks in the source VM. + /// + /// Gets or sets the resync retry count. + /// Gets or sets a value indicating whether resync is required. + /// Gets or sets the resync state. + /// Gets or sets a value indicating whether auto resync is to be done. + /// Gets or sets the resume retry count. + /// Gets or sets the latest timestamp that replication status is updated. + internal VMwareToAzStackHCIProtectedItemModelCustomProperties(ReplicationType instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string storageContainerId, string targetResourceGroupId, string targetLocation, string customLocationRegion, IList disksToInclude, IList nicsToInclude, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, string targetVmName, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType, string osName, string firmwareType, string fabricDiscoveryMachineId, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? migrationProgressPercentage, int? resumeProgressPercentage, int? resyncProgressPercentage, long? resyncRetryCount, bool? resyncRequired, VMwareToAzureMigrateResyncState? resyncState, bool? performAutoResync, long? resumeRetryCount, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) + { + ActiveLocation = activeLocation; + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + TargetAzStackHciClusterName = targetAzStackHciClusterName; + StorageContainerId = storageContainerId; + TargetResourceGroupId = targetResourceGroupId; + TargetLocation = targetLocation; + CustomLocationRegion = customLocationRegion; + DisksToInclude = disksToInclude; + NicsToInclude = nicsToInclude; + ProtectedDisks = protectedDisks; + ProtectedNics = protectedNics; + TargetVmBiosId = targetVmBiosId; + TargetVmName = targetVmName; + HyperVGeneration = hyperVGeneration; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + TargetCpuCores = targetCpuCores; + IsDynamicRam = isDynamicRam; + DynamicMemoryConfig = dynamicMemoryConfig; + TargetMemoryInMegaBytes = targetMemoryInMegaBytes; + OSType = osType; + OSName = osName; + FirmwareType = firmwareType; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + SourceVmName = sourceVmName; + SourceCpuCores = sourceCpuCores; + SourceMemoryInMegaBytes = sourceMemoryInMegaBytes; + RunAsAccountId = runAsAccountId; + SourceDraName = sourceDraName; + TargetDraName = targetDraName; + SourceApplianceName = sourceApplianceName; + TargetApplianceName = targetApplianceName; + FailoverRecoveryPointId = failoverRecoveryPointId; + LastRecoveryPointReceived = lastRecoveryPointReceived; + LastRecoveryPointId = lastRecoveryPointId; + InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + MigrationProgressPercentage = migrationProgressPercentage; + ResumeProgressPercentage = resumeProgressPercentage; + ResyncProgressPercentage = resyncProgressPercentage; + ResyncRetryCount = resyncRetryCount; + ResyncRequired = resyncRequired; + ResyncState = resyncState; + PerformAutoResync = performAutoResync; + ResumeRetryCount = resumeRetryCount; + LastReplicationUpdateOn = lastReplicationUpdateOn; + InstanceType = instanceType; + } + + /// Gets or sets the location of the protected item. + public ProtectedItemActiveLocation? ActiveLocation { get; } + /// Gets or sets the Target HCI Cluster ARM Id. + public string TargetHciClusterId { get; set; } + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + public string TargetArcClusterCustomLocationId { get; set; } + /// Gets or sets the Target AzStackHCI cluster name. + public string TargetAzStackHciClusterName { get; } + /// Gets or sets the target storage container ARM Id. + public string StorageContainerId { get; set; } + /// Gets or sets the target resource group ARM Id. + public string TargetResourceGroupId { get; set; } + /// Gets or sets the target location. + public string TargetLocation { get; } + /// Gets or sets the location of Azure Arc HCI custom location resource. + public string CustomLocationRegion { get; set; } + /// Gets or sets the list of disks to replicate. + public IList DisksToInclude { get; } + /// Gets or sets the list of VM NIC to replicate. + public IList NicsToInclude { get; } + /// Gets or sets the list of protected disks. + public IReadOnlyList ProtectedDisks { get; } + /// Gets or sets the VM NIC details. + public IReadOnlyList ProtectedNics { get; } + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + public string TargetVmBiosId { get; } + /// Gets or sets the target VM display name. + public string TargetVmName { get; set; } + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + public string HyperVGeneration { get; set; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the target CPU cores. + public int? TargetCpuCores { get; set; } + /// Gets or sets a value indicating whether memory is dynamical. + public bool? IsDynamicRam { get; set; } + /// Protected item dynamic memory config. + public ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get; set; } + /// Gets or sets the target memory in mega-bytes. + public int? TargetMemoryInMegaBytes { get; set; } + /// Gets or sets the type of the OS. + public string OSType { get; } + /// Gets or sets the name of the OS. + public string OSName { get; } + /// Gets or sets the firmware type. + public string FirmwareType { get; } + /// Gets or sets the ARM Id of the discovered machine. + public string FabricDiscoveryMachineId { get; set; } + /// Gets or sets the source VM display name. + public string SourceVmName { get; } + /// Gets or sets the source VM CPU cores. + public int? SourceCpuCores { get; } + /// Gets or sets the source VM ram memory size in megabytes. + public double? SourceMemoryInMegaBytes { get; } + /// Gets or sets the run as account Id. + public string RunAsAccountId { get; set; } + /// Gets or sets the source DRA name. + public string SourceDraName { get; set; } + /// Gets or sets the target DRA name. + public string TargetDraName { get; set; } + /// Gets or sets the source appliance name. + public string SourceApplianceName { get; } + /// Gets or sets the target appliance name. + public string TargetApplianceName { get; } + /// Gets or sets the recovery point Id to which the VM was failed over. + public string FailoverRecoveryPointId { get; } + /// Gets or sets the last recovery point received time. + public DateTimeOffset? LastRecoveryPointReceived { get; } + /// Gets or sets the last recovery point Id. + public string LastRecoveryPointId { get; } + /// + /// Gets or sets the initial replication progress percentage. This is calculated based on + /// total bytes processed for all disks in the source VM. + /// + public int? InitialReplicationProgressPercentage { get; } + /// Gets or sets the migration progress percentage. + public int? MigrationProgressPercentage { get; } + /// Gets or sets the resume progress percentage. + public int? ResumeProgressPercentage { get; } + /// + /// Gets or sets the resync progress percentage. This is calculated based on total bytes + /// processed for all disks in the source VM. + /// + public int? ResyncProgressPercentage { get; } + /// Gets or sets the resync retry count. + public long? ResyncRetryCount { get; } + /// Gets or sets a value indicating whether resync is required. + public bool? ResyncRequired { get; } + /// Gets or sets the resync state. + public VMwareToAzureMigrateResyncState? ResyncState { get; } + /// Gets or sets a value indicating whether auto resync is to be done. + public bool? PerformAutoResync { get; set; } + /// Gets or sets the resume retry count. + public long? ResumeRetryCount { get; } + /// Gets or sets the latest timestamp that replication status is updated. + public DateTimeOffset? LastReplicationUpdateOn { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.Serialization.cs new file mode 100644 index 000000000000..928afb52b9fe --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCIProtectedNicProperties + { + internal static VMwareToAzStackHCIProtectedNicProperties DeserializeVMwareToAzStackHCIProtectedNicProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional nicId = default; + Optional macAddress = default; + Optional label = default; + Optional isPrimaryNic = default; + Optional networkName = default; + Optional targetNetworkId = default; + Optional testNetworkId = default; + Optional selectionTypeForFailover = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("macAddress"u8)) + { + macAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("isPrimaryNic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPrimaryNic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + } + return new VMwareToAzStackHCIProtectedNicProperties(nicId.Value, macAddress.Value, label.Value, Optional.ToNullable(isPrimaryNic), networkName.Value, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(selectionTypeForFailover)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.cs new file mode 100644 index 000000000000..90487938b721 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStackHCI NIC properties. + public partial class VMwareToAzStackHCIProtectedNicProperties + { + /// Initializes a new instance of VMwareToAzStackHCIProtectedNicProperties. + internal VMwareToAzStackHCIProtectedNicProperties() + { + } + + /// Initializes a new instance of VMwareToAzStackHCIProtectedNicProperties. + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the NIC label. + /// Gets or sets a value indicating whether this is the primary NIC. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + internal VMwareToAzStackHCIProtectedNicProperties(string nicId, string macAddress, string label, bool? isPrimaryNic, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover) + { + NicId = nicId; + MacAddress = macAddress; + Label = label; + IsPrimaryNic = isPrimaryNic; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Gets or sets the NIC Id. + public string NicId { get; } + /// Gets or sets the NIC mac address. + public string MacAddress { get; } + /// Gets or sets the NIC label. + public string Label { get; } + /// Gets or sets a value indicating whether this is the primary NIC. + public bool? IsPrimaryNic { get; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection? SelectionTypeForFailover { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..caa43c3a1649 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHCIReplicationExtensionModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("vmwareFabricArmId"u8); + writer.WriteStringValue(VmwareFabricArmId); + writer.WritePropertyName("azStackHciFabricArmId"u8); + writer.WriteStringValue(AzStackHciFabricArmId); + if (Optional.IsDefined(StorageAccountId)) + { + writer.WritePropertyName("storageAccountId"u8); + writer.WriteStringValue(StorageAccountId); + } + if (Optional.IsDefined(StorageAccountSasSecretName)) + { + writer.WritePropertyName("storageAccountSasSecretName"u8); + writer.WriteStringValue(StorageAccountSasSecretName); + } + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType.ToString()); + writer.WriteEndObject(); + } + + internal static VMwareToAzStackHCIReplicationExtensionModelCustomProperties DeserializeVMwareToAzStackHCIReplicationExtensionModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmwareFabricArmId = default; + Optional vmwareSiteId = default; + string azStackHciFabricArmId = default; + Optional azStackHciSiteId = default; + Optional storageAccountId = default; + Optional storageAccountSasSecretName = default; + Optional asrServiceUri = default; + Optional rcmServiceUri = default; + Optional gatewayServiceUri = default; + Optional sourceGatewayServiceId = default; + Optional targetGatewayServiceId = default; + Optional sourceStorageContainerName = default; + Optional targetStorageContainerName = default; + Optional resourceLocation = default; + Optional subscriptionId = default; + Optional resourceGroup = default; + ReplicationType instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmwareFabricArmId"u8)) + { + vmwareFabricArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmwareSiteId"u8)) + { + vmwareSiteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("azStackHciFabricArmId"u8)) + { + azStackHciFabricArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("azStackHciSiteId"u8)) + { + azStackHciSiteId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountId"u8)) + { + storageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountSasSecretName"u8)) + { + storageAccountSasSecretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("asrServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + asrServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("rcmServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rcmServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("gatewayServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceGatewayServiceId"u8)) + { + sourceGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetGatewayServiceId"u8)) + { + targetGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceStorageContainerName"u8)) + { + sourceStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetStorageContainerName"u8)) + { + targetStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = new ReplicationType(property.Value.GetString()); + continue; + } + } + return new VMwareToAzStackHCIReplicationExtensionModelCustomProperties(instanceType, vmwareFabricArmId, vmwareSiteId.Value, azStackHciFabricArmId, azStackHciSiteId.Value, storageAccountId.Value, storageAccountSasSecretName.Value, asrServiceUri.Value, rcmServiceUri.Value, gatewayServiceUri.Value, sourceGatewayServiceId.Value, targetGatewayServiceId.Value, sourceStorageContainerName.Value, targetStorageContainerName.Value, resourceLocation.Value, subscriptionId.Value, resourceGroup.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs new file mode 100644 index 000000000000..876847a31a93 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI Replication extension model custom properties. + public partial class VMwareToAzStackHCIReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties + { + /// Initializes a new instance of VMwareToAzStackHCIReplicationExtensionModelCustomProperties. + /// Gets or sets the ARM Id of the source VMware fabric. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// or is null. + public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId, string azStackHciFabricArmId) + { + Argument.AssertNotNull(vmwareFabricArmId, nameof(vmwareFabricArmId)); + Argument.AssertNotNull(azStackHciFabricArmId, nameof(azStackHciFabricArmId)); + + VmwareFabricArmId = vmwareFabricArmId; + AzStackHciFabricArmId = azStackHciFabricArmId; + InstanceType = ReplicationType.VMwareToAzStackHCI; + } + + /// Initializes a new instance of VMwareToAzStackHCIReplicationExtensionModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets the ARM Id of the source VMware fabric. + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + internal VMwareToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType instanceType, string vmwareFabricArmId, string vmwareSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) + { + VmwareFabricArmId = vmwareFabricArmId; + VmwareSiteId = vmwareSiteId; + AzStackHciFabricArmId = azStackHciFabricArmId; + AzStackHciSiteId = azStackHciSiteId; + StorageAccountId = storageAccountId; + StorageAccountSasSecretName = storageAccountSasSecretName; + AsrServiceUri = asrServiceUri; + RcmServiceUri = rcmServiceUri; + GatewayServiceUri = gatewayServiceUri; + SourceGatewayServiceId = sourceGatewayServiceId; + TargetGatewayServiceId = targetGatewayServiceId; + SourceStorageContainerName = sourceStorageContainerName; + TargetStorageContainerName = targetStorageContainerName; + ResourceLocation = resourceLocation; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + InstanceType = instanceType; + } + + /// Gets or sets the ARM Id of the source VMware fabric. + public string VmwareFabricArmId { get; set; } + /// Gets or sets the ARM Id of the VMware site. + public string VmwareSiteId { get; } + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + public string AzStackHciFabricArmId { get; set; } + /// Gets or sets the ARM Id of the AzStackHCI site. + public string AzStackHciSiteId { get; } + /// Gets or sets the storage account Id. + public string StorageAccountId { get; set; } + /// Gets or sets the Sas Secret of storage account. + public string StorageAccountSasSecretName { get; set; } + /// Gets or sets the Uri of ASR. + public Uri AsrServiceUri { get; } + /// Gets or sets the Uri of Rcm. + public Uri RcmServiceUri { get; } + /// Gets or sets the Uri of Gateway. + public Uri GatewayServiceUri { get; } + /// Gets or sets the gateway service Id of source. + public string SourceGatewayServiceId { get; } + /// Gets or sets the gateway service Id of target. + public string TargetGatewayServiceId { get; } + /// Gets or sets the source storage container name. + public string SourceStorageContainerName { get; } + /// Gets or sets the target storage container name. + public string TargetStorageContainerName { get; } + /// Gets or sets the resource location. + public string ResourceLocation { get; } + /// Gets or sets the subscription. + public string SubscriptionId { get; } + /// Gets or sets the resource group. + public string ResourceGroup { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzureMigrateResyncState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzureMigrateResyncState.cs new file mode 100644 index 000000000000..54d3f759b819 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzureMigrateResyncState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the resync state. + public readonly partial struct VMwareToAzureMigrateResyncState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VMwareToAzureMigrateResyncState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string PreparedForResynchronizationValue = "PreparedForResynchronization"; + private const string StartedResynchronizationValue = "StartedResynchronization"; + + /// None. + public static VMwareToAzureMigrateResyncState None { get; } = new VMwareToAzureMigrateResyncState(NoneValue); + /// PreparedForResynchronization. + public static VMwareToAzureMigrateResyncState PreparedForResynchronization { get; } = new VMwareToAzureMigrateResyncState(PreparedForResynchronizationValue); + /// StartedResynchronization. + public static VMwareToAzureMigrateResyncState StartedResynchronization { get; } = new VMwareToAzureMigrateResyncState(StartedResynchronizationValue); + /// Determines if two values are the same. + public static bool operator ==(VMwareToAzureMigrateResyncState left, VMwareToAzureMigrateResyncState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VMwareToAzureMigrateResyncState left, VMwareToAzureMigrateResyncState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VMwareToAzureMigrateResyncState(string value) => new VMwareToAzureMigrateResyncState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VMwareToAzureMigrateResyncState other && Equals(other); + /// + public bool Equals(VMwareToAzureMigrateResyncState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs new file mode 100644 index 000000000000..2fb24c1f0f6c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class VaultModelCollection + { + internal static VaultModelCollection DeserializeVaultModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VaultModelData.DeserializeVaultModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new VaultModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.cs new file mode 100644 index 000000000000..266166341f1e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Vault model collection. + internal partial class VaultModelCollection + { + /// Initializes a new instance of VaultModelCollection. + internal VaultModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of VaultModelCollection. + /// Gets or sets the list of vaults. + /// Gets or sets the value of next link. + internal VaultModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of vaults. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelData.Serialization.cs new file mode 100644 index 000000000000..d720ab1e7bc4 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelData.Serialization.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class VaultModelData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static VaultModelData DeserializeVaultModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional properties = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = VaultModelProperties.DeserializeVaultModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new VaultModelData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs new file mode 100644 index 000000000000..e330f9907fe4 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VaultModelPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs new file mode 100644 index 000000000000..87fd255d7626 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Vault model for update. + public partial class VaultModelPatch : ResourceData + { + /// Initializes a new instance of VaultModelPatch. + public VaultModelPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Vault properties. + public VaultModelProperties Properties { get; set; } + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.Serialization.cs new file mode 100644 index 000000000000..cf3496b3e067 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.Serialization.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VaultModelProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VaultType)) + { + writer.WritePropertyName("vaultType"u8); + writer.WriteStringValue(VaultType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static VaultModelProperties DeserializeVaultModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional provisioningState = default; + Optional serviceResourceId = default; + Optional vaultType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceResourceId"u8)) + { + serviceResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("vaultType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vaultType = new ReplicationVaultType(property.Value.GetString()); + continue; + } + } + return new VaultModelProperties(Optional.ToNullable(provisioningState), serviceResourceId.Value, Optional.ToNullable(vaultType)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.cs new file mode 100644 index 000000000000..298e73498e30 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Vault properties. + public partial class VaultModelProperties + { + /// Initializes a new instance of VaultModelProperties. + public VaultModelProperties() + { + } + + /// Initializes a new instance of VaultModelProperties. + /// Gets or sets the provisioning state of the vault. + /// Gets or sets the service resource Id. + /// Gets or sets the type of vault. + internal VaultModelProperties(ProvisioningState? provisioningState, string serviceResourceId, ReplicationVaultType? vaultType) + { + ProvisioningState = provisioningState; + ServiceResourceId = serviceResourceId; + VaultType = vaultType; + } + + /// Gets or sets the provisioning state of the vault. + public ProvisioningState? ProvisioningState { get; } + /// Gets or sets the service resource Id. + public string ServiceResourceId { get; } + /// Gets or sets the type of vault. + public ReplicationVaultType? VaultType { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VmNicSelection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VmNicSelection.cs new file mode 100644 index 000000000000..bd1b19800bb9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VmNicSelection.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the selection type of the NIC. + public readonly partial struct VmNicSelection : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VmNicSelection(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSelectedValue = "NotSelected"; + private const string SelectedByUserValue = "SelectedByUser"; + private const string SelectedByDefaultValue = "SelectedByDefault"; + private const string SelectedByUserOverrideValue = "SelectedByUserOverride"; + + /// NotSelected. + public static VmNicSelection NotSelected { get; } = new VmNicSelection(NotSelectedValue); + /// SelectedByUser. + public static VmNicSelection SelectedByUser { get; } = new VmNicSelection(SelectedByUserValue); + /// SelectedByDefault. + public static VmNicSelection SelectedByDefault { get; } = new VmNicSelection(SelectedByDefaultValue); + /// SelectedByUserOverride. + public static VmNicSelection SelectedByUserOverride { get; } = new VmNicSelection(SelectedByUserOverrideValue); + /// Determines if two values are the same. + public static bool operator ==(VmNicSelection left, VmNicSelection right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VmNicSelection left, VmNicSelection right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VmNicSelection(string value) => new VmNicSelection(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VmNicSelection other && Equals(other); + /// + public bool Equals(VmNicSelection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs new file mode 100644 index 000000000000..ddb0c86e300c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the instance type. + internal readonly partial struct WorkflowDetailsType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowDetailsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WorkflowDetailsValue = "WorkflowDetails"; + private const string FailoverWorkflowDetailsValue = "FailoverWorkflowDetails"; + private const string TestFailoverWorkflowDetailsValue = "TestFailoverWorkflowDetails"; + private const string TestFailoverCleanupWorkflowDetailsValue = "TestFailoverCleanupWorkflowDetails"; + + /// WorkflowDetails. + public static WorkflowDetailsType WorkflowDetails { get; } = new WorkflowDetailsType(WorkflowDetailsValue); + /// FailoverWorkflowDetails. + public static WorkflowDetailsType FailoverWorkflowDetails { get; } = new WorkflowDetailsType(FailoverWorkflowDetailsValue); + /// TestFailoverWorkflowDetails. + public static WorkflowDetailsType TestFailoverWorkflowDetails { get; } = new WorkflowDetailsType(TestFailoverWorkflowDetailsValue); + /// TestFailoverCleanupWorkflowDetails. + public static WorkflowDetailsType TestFailoverCleanupWorkflowDetails { get; } = new WorkflowDetailsType(TestFailoverCleanupWorkflowDetailsValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowDetailsType left, WorkflowDetailsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowDetailsType left, WorkflowDetailsType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowDetailsType(string value) => new WorkflowDetailsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowDetailsType other && Equals(other); + /// + public bool Equals(WorkflowDetailsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs new file mode 100644 index 000000000000..2350628a4f9d --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class WorkflowModelCollection + { + internal static WorkflowModelCollection DeserializeWorkflowModelCollection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowModelData.DeserializeWorkflowModelData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new WorkflowModelCollection(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.cs new file mode 100644 index 000000000000..cab0102b12cd --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Workflow model collection. + internal partial class WorkflowModelCollection + { + /// Initializes a new instance of WorkflowModelCollection. + internal WorkflowModelCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of WorkflowModelCollection. + /// Gets or sets the list of workflows. + /// Gets or sets the value of next link. + internal WorkflowModelCollection(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Gets or sets the list of workflows. + public IReadOnlyList Value { get; } + /// Gets or sets the value of next link. + public string NextLink { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..1b5de0e37f25 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class WorkflowModelCustomProperties + { + internal static WorkflowModelCustomProperties DeserializeWorkflowModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FailoverWorkflowDetails": return FailoverWorkflowModelCustomProperties.DeserializeFailoverWorkflowModelCustomProperties(element); + case "TestFailoverCleanupWorkflowDetails": return TestFailoverCleanupWorkflowModelCustomProperties.DeserializeTestFailoverCleanupWorkflowModelCustomProperties(element); + case "TestFailoverWorkflowDetails": return TestFailoverWorkflowModelCustomProperties.DeserializeTestFailoverWorkflowModelCustomProperties(element); + } + } + return UnknownWorkflowModelCustomProperties.DeserializeUnknownWorkflowModelCustomProperties(element); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs new file mode 100644 index 000000000000..9d994c0f6c6d --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Workflow model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class WorkflowModelCustomProperties + { + /// Initializes a new instance of WorkflowModelCustomProperties. + protected WorkflowModelCustomProperties() + { + AffectedObjectDetails = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of WorkflowModelCustomProperties. + /// Gets or sets the instance type. + /// Gets or sets any custom properties of the affected object. + internal WorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails) + { + InstanceType = instanceType; + AffectedObjectDetails = affectedObjectDetails; + } + + /// Gets or sets the instance type. + internal WorkflowDetailsType InstanceType { get; set; } + /// Gets or sets any custom properties of the affected object. + public IReadOnlyDictionary AffectedObjectDetails { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs new file mode 100644 index 000000000000..eb3698f12e2c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class WorkflowModelData + { + internal static WorkflowModelData DeserializeWorkflowModelData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowModelProperties properties = default; + Optional> tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = WorkflowModelProperties.DeserializeWorkflowModelProperties(property.Value); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new WorkflowModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.Serialization.cs new file mode 100644 index 000000000000..4b8a00434548 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class WorkflowModelProperties + { + internal static WorkflowModelProperties DeserializeWorkflowModelProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional displayName = default; + Optional state = default; + Optional startTime = default; + Optional endTime = default; + Optional objectId = default; + Optional objectName = default; + Optional objectInternalId = default; + Optional objectInternalName = default; + Optional objectType = default; + Optional replicationProviderId = default; + Optional sourceFabricProviderId = default; + Optional targetFabricProviderId = default; + Optional> allowedActions = default; + Optional activityId = default; + Optional> tasks = default; + Optional> errors = default; + WorkflowModelCustomProperties customProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WorkflowState(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectName"u8)) + { + objectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectInternalId"u8)) + { + objectInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectInternalName"u8)) + { + objectInternalName = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectType = new WorkflowObjectType(property.Value.GetString()); + continue; + } + if (property.NameEquals("replicationProviderId"u8)) + { + replicationProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceFabricProviderId"u8)) + { + sourceFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricProviderId"u8)) + { + targetFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowedActions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedActions = array; + continue; + } + if (property.NameEquals("activityId"u8)) + { + activityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("tasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TaskModel.DeserializeTaskModel(item)); + } + tasks = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ErrorModel.DeserializeErrorModel(item)); + } + errors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = WorkflowModelCustomProperties.DeserializeWorkflowModelCustomProperties(property.Value); + continue; + } + } + return new WorkflowModelProperties(displayName.Value, Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), objectId.Value, objectName.Value, objectInternalId.Value, objectInternalName.Value, Optional.ToNullable(objectType), replicationProviderId.Value, sourceFabricProviderId.Value, targetFabricProviderId.Value, Optional.ToList(allowedActions), activityId.Value, Optional.ToList(tasks), Optional.ToList(errors), customProperties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.cs new file mode 100644 index 000000000000..7acfc8afee72 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Workflow model properties. + public partial class WorkflowModelProperties + { + /// Initializes a new instance of WorkflowModelProperties. + /// + /// Workflow model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + internal WorkflowModelProperties(WorkflowModelCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + AllowedActions = new ChangeTrackingList(); + Tasks = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of WorkflowModelProperties. + /// Gets or sets the friendly display name. + /// Gets or sets the workflow state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Gets or sets the affected object Id. + /// Gets or sets the affected object name. + /// Gets or sets the affected object internal Id. + /// Gets or sets the affected object internal name. + /// Gets or sets the object type. + /// Gets or sets the replication provider. + /// Gets or sets the source fabric provider. + /// Gets or sets the target fabric provider. + /// Gets or sets the list of allowed actions on the workflow. + /// Gets or sets the workflow activity id. + /// Gets or sets the list of tasks. + /// Gets or sets the list of errors. + /// + /// Workflow model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal WorkflowModelProperties(string displayName, WorkflowState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, string objectId, string objectName, string objectInternalId, string objectInternalName, WorkflowObjectType? objectType, string replicationProviderId, string sourceFabricProviderId, string targetFabricProviderId, IReadOnlyList allowedActions, string activityId, IReadOnlyList tasks, IReadOnlyList errors, WorkflowModelCustomProperties customProperties) + { + DisplayName = displayName; + State = state; + StartOn = startOn; + EndOn = endOn; + ObjectId = objectId; + ObjectName = objectName; + ObjectInternalId = objectInternalId; + ObjectInternalName = objectInternalName; + ObjectType = objectType; + ReplicationProviderId = replicationProviderId; + SourceFabricProviderId = sourceFabricProviderId; + TargetFabricProviderId = targetFabricProviderId; + AllowedActions = allowedActions; + ActivityId = activityId; + Tasks = tasks; + Errors = errors; + CustomProperties = customProperties; + } + + /// Gets or sets the friendly display name. + public string DisplayName { get; } + /// Gets or sets the workflow state. + public WorkflowState? State { get; } + /// Gets or sets the start time. + public DateTimeOffset? StartOn { get; } + /// Gets or sets the end time. + public DateTimeOffset? EndOn { get; } + /// Gets or sets the affected object Id. + public string ObjectId { get; } + /// Gets or sets the affected object name. + public string ObjectName { get; } + /// Gets or sets the affected object internal Id. + public string ObjectInternalId { get; } + /// Gets or sets the affected object internal name. + public string ObjectInternalName { get; } + /// Gets or sets the object type. + public WorkflowObjectType? ObjectType { get; } + /// Gets or sets the replication provider. + public string ReplicationProviderId { get; } + /// Gets or sets the source fabric provider. + public string SourceFabricProviderId { get; } + /// Gets or sets the target fabric provider. + public string TargetFabricProviderId { get; } + /// Gets or sets the list of allowed actions on the workflow. + public IReadOnlyList AllowedActions { get; } + /// Gets or sets the workflow activity id. + public string ActivityId { get; } + /// Gets or sets the list of tasks. + public IReadOnlyList Tasks { get; } + /// Gets or sets the list of errors. + public IReadOnlyList Errors { get; } + /// + /// Workflow model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public WorkflowModelCustomProperties CustomProperties { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowObjectType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowObjectType.cs new file mode 100644 index 000000000000..55e7de0adeb0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowObjectType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the object type. + public readonly partial struct WorkflowObjectType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowObjectType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvsDiskPoolValue = "AvsDiskPool"; + private const string DraValue = "Dra"; + private const string FabricValue = "Fabric"; + private const string PolicyValue = "Policy"; + private const string ProtectedItemValue = "ProtectedItem"; + private const string RecoveryPlanValue = "RecoveryPlan"; + private const string ReplicationExtensionValue = "ReplicationExtension"; + private const string VaultValue = "Vault"; + + /// AvsDiskPool. + public static WorkflowObjectType AvsDiskPool { get; } = new WorkflowObjectType(AvsDiskPoolValue); + /// Dra. + public static WorkflowObjectType Dra { get; } = new WorkflowObjectType(DraValue); + /// Fabric. + public static WorkflowObjectType Fabric { get; } = new WorkflowObjectType(FabricValue); + /// Policy. + public static WorkflowObjectType Policy { get; } = new WorkflowObjectType(PolicyValue); + /// ProtectedItem. + public static WorkflowObjectType ProtectedItem { get; } = new WorkflowObjectType(ProtectedItemValue); + /// RecoveryPlan. + public static WorkflowObjectType RecoveryPlan { get; } = new WorkflowObjectType(RecoveryPlanValue); + /// ReplicationExtension. + public static WorkflowObjectType ReplicationExtension { get; } = new WorkflowObjectType(ReplicationExtensionValue); + /// Vault. + public static WorkflowObjectType Vault { get; } = new WorkflowObjectType(VaultValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowObjectType left, WorkflowObjectType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowObjectType left, WorkflowObjectType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowObjectType(string value) => new WorkflowObjectType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowObjectType other && Equals(other); + /// + public bool Equals(WorkflowObjectType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs new file mode 100644 index 000000000000..5b65015d3222 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the workflow state. + public readonly partial struct WorkflowState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string StartedValue = "Started"; + private const string CancellingValue = "Cancelling"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string CompletedWithInformationValue = "CompletedWithInformation"; + private const string CompletedWithWarningsValue = "CompletedWithWarnings"; + private const string CompletedWithErrorsValue = "CompletedWithErrors"; + + /// Pending. + public static WorkflowState Pending { get; } = new WorkflowState(PendingValue); + /// Started. + public static WorkflowState Started { get; } = new WorkflowState(StartedValue); + /// Cancelling. + public static WorkflowState Cancelling { get; } = new WorkflowState(CancellingValue); + /// Succeeded. + public static WorkflowState Succeeded { get; } = new WorkflowState(SucceededValue); + /// Failed. + public static WorkflowState Failed { get; } = new WorkflowState(FailedValue); + /// Cancelled. + public static WorkflowState Cancelled { get; } = new WorkflowState(CancelledValue); + /// CompletedWithInformation. + public static WorkflowState CompletedWithInformation { get; } = new WorkflowState(CompletedWithInformationValue); + /// CompletedWithWarnings. + public static WorkflowState CompletedWithWarnings { get; } = new WorkflowState(CompletedWithWarningsValue); + /// CompletedWithErrors. + public static WorkflowState CompletedWithErrors { get; } = new WorkflowState(CompletedWithErrorsValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowState left, WorkflowState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowState left, WorkflowState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowState(string value) => new WorkflowState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowState other && Equals(other); + /// + public bool Equals(WorkflowState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs new file mode 100644 index 000000000000..67668a8d85c4 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPolicyModels method from an instance of . + /// + public partial class PolicyModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _policyModelPolicyClientDiagnostics; + private readonly PolicyRestOperations _policyModelPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected PolicyModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PolicyModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyModelPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", PolicyModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PolicyModelResource.ResourceType, out string policyModelPolicyApiVersion); + _policyModelPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyModelPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != VaultModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Policy name. + /// Policy model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _policyModelPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Policy name. + /// Policy model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _policyModelPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// Policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Get"); + scope.Start(); + try + { + var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// Policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Get"); + scope.Start(); + try + { + var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of policies in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies + /// + /// + /// Operation Id + /// Policy_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of policies in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies + /// + /// + /// Operation Id + /// Policy_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// Policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Exists"); + scope.Start(); + try + { + var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// Policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Exists"); + scope.Start(); + try + { + var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs new file mode 100644 index 000000000000..7bb36be1cd6f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the PolicyModel data model. + /// Policy model. + /// + public partial class PolicyModelData : ResourceData + { + /// Initializes a new instance of PolicyModelData. + /// Policy model properties. + /// is null. + public PolicyModelData(PolicyModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of PolicyModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Policy model properties. + /// Gets or sets the resource tags. + internal PolicyModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PolicyModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Policy model properties. + public PolicyModelProperties Properties { get; set; } + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs new file mode 100644 index 000000000000..9af98eb0b2ec --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs @@ -0,0 +1,661 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a PolicyModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPolicyModelResource method. + /// Otherwise you can get one from its parent resource using the GetPolicyModel method. + /// + public partial class PolicyModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _policyModelPolicyClientDiagnostics; + private readonly PolicyRestOperations _policyModelPolicyRestClient; + private readonly ClientDiagnostics _policyOperationStatusClientDiagnostics; + private readonly PolicyOperationStatusRestOperations _policyOperationStatusRestClient; + private readonly PolicyModelData _data; + + /// Initializes a new instance of the class for mocking. + protected PolicyModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PolicyModelResource(ArmClient client, PolicyModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PolicyModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyModelPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string policyModelPolicyApiVersion); + _policyModelPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyModelPolicyApiVersion); + _policyOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _policyOperationStatusRestClient = new PolicyOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/replicationPolicies"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PolicyModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Get"); + scope.Start(); + try + { + var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Get"); + scope.Start(); + try + { + var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Delete"); + scope.Start(); + try + { + var response = await _policyModelPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Delete"); + scope.Start(); + try + { + var response = _policyModelPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Policy model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Update"); + scope.Start(); + try + { + var response = await _policyModelPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Policy model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PolicyModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Update"); + scope.Start(); + try + { + var response = _policyModelPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}/operations/{operationId} + /// + /// + /// Operation Id + /// PolicyOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetPolicyOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _policyOperationStatusClientDiagnostics.CreateScope("PolicyModelResource.GetPolicyOperationStatu"); + scope.Start(); + try + { + var response = await _policyOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}/operations/{operationId} + /// + /// + /// Operation Id + /// PolicyOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetPolicyOperationStatu(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _policyOperationStatusClientDiagnostics.CreateScope("PolicyModelResource.GetPolicyOperationStatu"); + scope.Start(); + try + { + var response = _policyOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags[key] = value; + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.Remove(key); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs new file mode 100644 index 000000000000..54a86d5acdd2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetProtectedItemModels method from an instance of . + /// + public partial class ProtectedItemModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _protectedItemModelProtectedItemClientDiagnostics; + private readonly ProtectedItemRestOperations _protectedItemModelProtectedItemRestClient; + + /// Initializes a new instance of the class for mocking. + protected ProtectedItemModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ProtectedItemModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _protectedItemModelProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProtectedItemModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ProtectedItemModelResource.ResourceType, out string protectedItemModelProtectedItemApiVersion); + _protectedItemModelProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, protectedItemModelProtectedItemApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != VaultModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + } + + /// + /// Creates the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Protected item name. + /// Protected item model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _protectedItemModelProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Protected item name. + /// Protected item model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _protectedItemModelProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// Protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Get"); + scope.Start(); + try + { + var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// Protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Get"); + scope.Start(); + try + { + var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of protected items in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems + /// + /// + /// Operation Id + /// ProtectedItem_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of protected items in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems + /// + /// + /// Operation Id + /// ProtectedItem_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// Protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Exists"); + scope.Start(); + try + { + var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// Protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Exists"); + scope.Start(); + try + { + var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs new file mode 100644 index 000000000000..10483d0b64ea --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the ProtectedItemModel data model. + /// Protected item model. + /// + public partial class ProtectedItemModelData : ResourceData + { + /// Initializes a new instance of ProtectedItemModelData. + /// Protected item model properties. + /// is null. + public ProtectedItemModelData(ProtectedItemModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ProtectedItemModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Protected item model properties. + /// Gets or sets the resource tags. + internal ProtectedItemModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProtectedItemModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Protected item model properties. + public ProtectedItemModelProperties Properties { get; set; } + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs new file mode 100644 index 000000000000..10bf7a3b56f2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs @@ -0,0 +1,786 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a ProtectedItemModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetProtectedItemModelResource method. + /// Otherwise you can get one from its parent resource using the GetProtectedItemModel method. + /// + public partial class ProtectedItemModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _protectedItemModelProtectedItemClientDiagnostics; + private readonly ProtectedItemRestOperations _protectedItemModelProtectedItemRestClient; + private readonly ClientDiagnostics _protectedItemOperationStatusClientDiagnostics; + private readonly ProtectedItemOperationStatusRestOperations _protectedItemOperationStatusRestClient; + private readonly ProtectedItemModelData _data; + + /// Initializes a new instance of the class for mocking. + protected ProtectedItemModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ProtectedItemModelResource(ArmClient client, ProtectedItemModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ProtectedItemModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _protectedItemModelProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string protectedItemModelProtectedItemApiVersion); + _protectedItemModelProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, protectedItemModelProtectedItemApiVersion); + _protectedItemOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _protectedItemOperationStatusRestClient = new ProtectedItemOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/protectedItems"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ProtectedItemModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of RecoveryPointModelResources in the ProtectedItemModel. + /// An object representing collection of RecoveryPointModelResources and their operations over a RecoveryPointModelResource. + public virtual RecoveryPointModelCollection GetRecoveryPointModels() + { + return GetCachedClient(Client => new RecoveryPointModelCollection(Client, Id)); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// Recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetRecoveryPointModelAsync(string recoveryPointName, CancellationToken cancellationToken = default) + { + return await GetRecoveryPointModels().GetAsync(recoveryPointName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// Recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetRecoveryPointModel(string recoveryPointName, CancellationToken cancellationToken = default) + { + return GetRecoveryPointModels().Get(recoveryPointName, cancellationToken); + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Get"); + scope.Start(); + try + { + var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Get"); + scope.Start(); + try + { + var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Delete"); + scope.Start(); + try + { + var response = await _protectedItemModelProtectedItemRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Delete"); + scope.Start(); + try + { + var response = _protectedItemModelProtectedItemRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Protected item model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ProtectedItemModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Update"); + scope.Start(); + try + { + var response = await _protectedItemModelProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Protected item model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ProtectedItemModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Update"); + scope.Start(); + try + { + var response = _protectedItemModelProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs the planned failover on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/plannedFailover + /// + /// + /// Operation Id + /// ProtectedItem_PlannedFailover + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Planned failover model. + /// The cancellation token to use. + public virtual async Task> PlannedFailoverAsync(WaitUntil waitUntil, PlannedFailoverModel body = null, CancellationToken cancellationToken = default) + { + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.PlannedFailover"); + scope.Start(); + try + { + var response = await _protectedItemModelProtectedItemRestClient.PlannedFailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs the planned failover on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/plannedFailover + /// + /// + /// Operation Id + /// ProtectedItem_PlannedFailover + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Planned failover model. + /// The cancellation token to use. + public virtual ArmOperation PlannedFailover(WaitUntil waitUntil, PlannedFailoverModel body = null, CancellationToken cancellationToken = default) + { + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.PlannedFailover"); + scope.Start(); + try + { + var response = _protectedItemModelProtectedItemRestClient.PlannedFailover(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/operations/{operationId} + /// + /// + /// Operation Id + /// ProtectedItemOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetProtectedItemOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _protectedItemOperationStatusClientDiagnostics.CreateScope("ProtectedItemModelResource.GetProtectedItemOperationStatu"); + scope.Start(); + try + { + var response = await _protectedItemOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/operations/{operationId} + /// + /// + /// Operation Id + /// ProtectedItemOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetProtectedItemOperationStatu(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _protectedItemOperationStatusClientDiagnostics.CreateScope("ProtectedItemModelResource.GetProtectedItemOperationStatu"); + scope.Start(); + try + { + var response = _protectedItemOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags[key] = value; + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.Remove(key); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProviderConstants.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..c468763062c9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs new file mode 100644 index 000000000000..90ff8fe047f9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetRecoveryPointModels method from an instance of . + /// + public partial class RecoveryPointModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _recoveryPointModelRecoveryPointsClientDiagnostics; + private readonly RecoveryPointsRestOperations _recoveryPointModelRecoveryPointsRestClient; + + /// Initializes a new instance of the class for mocking. + protected RecoveryPointModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal RecoveryPointModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _recoveryPointModelRecoveryPointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", RecoveryPointModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(RecoveryPointModelResource.ResourceType, out string recoveryPointModelRecoveryPointsApiVersion); + _recoveryPointModelRecoveryPointsRestClient = new RecoveryPointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, recoveryPointModelRecoveryPointsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ProtectedItemModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ProtectedItemModelResource.ResourceType), nameof(id)); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// Recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Get"); + scope.Start(); + try + { + var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// Recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Get"); + scope.Start(); + try + { + var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of recovery points of the given protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints + /// + /// + /// Operation Id + /// RecoveryPoints_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recovery points of the given protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints + /// + /// + /// Operation Id + /// RecoveryPoints_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// Recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Exists"); + scope.Start(); + try + { + var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// Recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Exists"); + scope.Start(); + try + { + var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs new file mode 100644 index 000000000000..b4cb025335f5 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the RecoveryPointModel data model. + /// Recovery point model. + /// + public partial class RecoveryPointModelData : ResourceData + { + /// Initializes a new instance of RecoveryPointModelData. + /// Recovery point model properties. + /// is null. + internal RecoveryPointModelData(RecoveryPointModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of RecoveryPointModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Recovery point model properties. + /// Gets or sets the resource tags. + internal RecoveryPointModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RecoveryPointModelProperties properties, IReadOnlyDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Recovery point model properties. + public RecoveryPointModelProperties Properties { get; } + /// Gets or sets the resource tags. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs new file mode 100644 index 000000000000..ec4514b5c090 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a RecoveryPointModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetRecoveryPointModelResource method. + /// Otherwise you can get one from its parent resource using the GetRecoveryPointModel method. + /// + public partial class RecoveryPointModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _recoveryPointModelRecoveryPointsClientDiagnostics; + private readonly RecoveryPointsRestOperations _recoveryPointModelRecoveryPointsRestClient; + private readonly RecoveryPointModelData _data; + + /// Initializes a new instance of the class for mocking. + protected RecoveryPointModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal RecoveryPointModelResource(ArmClient client, RecoveryPointModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal RecoveryPointModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _recoveryPointModelRecoveryPointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string recoveryPointModelRecoveryPointsApiVersion); + _recoveryPointModelRecoveryPointsRestClient = new RecoveryPointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, recoveryPointModelRecoveryPointsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/protectedItems/recoveryPoints"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual RecoveryPointModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelResource.Get"); + scope.Start(); + try + { + var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPoints_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelResource.Get"); + scope.Start(); + try + { + var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs new file mode 100644 index 000000000000..fd610b85f8a8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetReplicationExtensionModels method from an instance of . + /// + public partial class ReplicationExtensionModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _replicationExtensionModelReplicationExtensionClientDiagnostics; + private readonly ReplicationExtensionRestOperations _replicationExtensionModelReplicationExtensionRestClient; + + /// Initializes a new instance of the class for mocking. + protected ReplicationExtensionModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ReplicationExtensionModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _replicationExtensionModelReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ReplicationExtensionModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ReplicationExtensionModelResource.ResourceType, out string replicationExtensionModelReplicationExtensionApiVersion); + _replicationExtensionModelReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, replicationExtensionModelReplicationExtensionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != VaultModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _replicationExtensionModelReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _replicationExtensionModelReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// Replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Get"); + scope.Start(); + try + { + var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// Replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Get"); + scope.Start(); + try + { + var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of replication extensions in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions + /// + /// + /// Operation Id + /// ReplicationExtension_List + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of replication extensions in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions + /// + /// + /// Operation Id + /// ReplicationExtension_List + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// Replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Exists"); + scope.Start(); + try + { + var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// Replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Exists"); + scope.Start(); + try + { + var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs new file mode 100644 index 000000000000..340c6845a305 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the ReplicationExtensionModel data model. + /// Replication extension model. + /// + public partial class ReplicationExtensionModelData : ResourceData + { + /// Initializes a new instance of ReplicationExtensionModelData. + /// Replication extension model properties. + /// is null. + public ReplicationExtensionModelData(ReplicationExtensionModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of ReplicationExtensionModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Replication extension model properties. + /// Gets or sets the resource tags. + internal ReplicationExtensionModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ReplicationExtensionModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Replication extension model properties. + public ReplicationExtensionModelProperties Properties { get; set; } + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs new file mode 100644 index 000000000000..faa600b5a809 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs @@ -0,0 +1,661 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a ReplicationExtensionModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetReplicationExtensionModelResource method. + /// Otherwise you can get one from its parent resource using the GetReplicationExtensionModel method. + /// + public partial class ReplicationExtensionModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _replicationExtensionModelReplicationExtensionClientDiagnostics; + private readonly ReplicationExtensionRestOperations _replicationExtensionModelReplicationExtensionRestClient; + private readonly ClientDiagnostics _replicationExtensionOperationStatusClientDiagnostics; + private readonly ReplicationExtensionOperationStatusRestOperations _replicationExtensionOperationStatusRestClient; + private readonly ReplicationExtensionModelData _data; + + /// Initializes a new instance of the class for mocking. + protected ReplicationExtensionModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ReplicationExtensionModelResource(ArmClient client, ReplicationExtensionModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ReplicationExtensionModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _replicationExtensionModelReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string replicationExtensionModelReplicationExtensionApiVersion); + _replicationExtensionModelReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, replicationExtensionModelReplicationExtensionApiVersion); + _replicationExtensionOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _replicationExtensionOperationStatusRestClient = new ReplicationExtensionOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/replicationExtensions"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ReplicationExtensionModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Get"); + scope.Start(); + try + { + var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Get"); + scope.Start(); + try + { + var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Delete"); + scope.Start(); + try + { + var response = await _replicationExtensionModelReplicationExtensionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Delete"); + scope.Start(); + try + { + var response = _replicationExtensionModelReplicationExtensionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Replication extension model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Update"); + scope.Start(); + try + { + var response = await _replicationExtensionModelReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Replication extension model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Update"); + scope.Start(); + try + { + var response = _replicationExtensionModelReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}/operations/{operationId} + /// + /// + /// Operation Id + /// ReplicationExtensionOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetReplicationExtensionOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _replicationExtensionOperationStatusClientDiagnostics.CreateScope("ReplicationExtensionModelResource.GetReplicationExtensionOperationStatu"); + scope.Start(); + try + { + var response = await _replicationExtensionOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}/operations/{operationId} + /// + /// + /// Operation Id + /// ReplicationExtensionOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetReplicationExtensionOperationStatu(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _replicationExtensionOperationStatusClientDiagnostics.CreateScope("ReplicationExtensionModelResource.GetReplicationExtensionOperationStatu"); + scope.Start(); + try + { + var response = _replicationExtensionOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags[key] = value; + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.Remove(key); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs new file mode 100644 index 000000000000..f461938b2a11 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class AzureSiteRecoveryManagementServiceAPIRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AzureSiteRecoveryManagementServiceAPIRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AzureSiteRecoveryManagementServiceAPIRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, CheckNameAvailabilityModel body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Checks the resource name availability. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CheckNameAvailabilityResponseModel value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CheckNameAvailabilityResponseModel.DeserializeCheckNameAvailabilityResponseModel(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks the resource name availability. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response CheckNameAvailability(string subscriptionId, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CheckNameAvailabilityResponseModel value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CheckNameAvailabilityResponseModel.DeserializeCheckNameAvailabilityResponseModel(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeploymentPreflightRequest(string subscriptionId, string resourceGroupName, string deploymentId, DeploymentPreflightModel body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/deployments/", false); + uri.AppendPath(deploymentId, true); + uri.AppendPath("/preflight", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Performs resource deployment validation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> DeploymentPreflightAsync(string subscriptionId, string resourceGroupName, string deploymentId, DeploymentPreflightModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + using var message = CreateDeploymentPreflightRequest(subscriptionId, resourceGroupName, deploymentId, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeploymentPreflightModel value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeploymentPreflightModel.DeserializeDeploymentPreflightModel(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs resource deployment validation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DeploymentPreflight(string subscriptionId, string resourceGroupName, string deploymentId, DeploymentPreflightModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + using var message = CreateDeploymentPreflightRequest(subscriptionId, resourceGroupName, deploymentId, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeploymentPreflightModel value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeploymentPreflightModel.DeserializeDeploymentPreflightModel(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs new file mode 100644 index 000000000000..c6d24c012082 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class DraOperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DraOperationStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DraOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(draName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Tracks the results of an asynchronous operation on the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// Dra name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Tracks the results of an asynchronous operation on the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// Dra name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string draName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs new file mode 100644 index 000000000000..ebf9f136c409 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class DraRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DraRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DraRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(draName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// Dra name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DraModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DraModelData.DeserializeDraModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DraModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// Dra name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DraModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DraModelData.DeserializeDraModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DraModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName, DraModelData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(draName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// Dra name. + /// Dra model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, DraModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, draName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// Dra name. + /// Dra model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string fabricName, string draName, DraModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, draName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(draName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// Dra Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, draName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// Dra Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, draName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabric agents in the given fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DraModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabric agents in the given fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DraModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabric agents in the given fabric. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.DraModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabric agents in the given fabric. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.DraModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs new file mode 100644 index 000000000000..606595f4b9c6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class EmailConfigurationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EmailConfigurationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public EmailConfigurationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings/", false); + uri.AppendPath(emailConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the alert configuration setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Email configuration name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmailConfigurationModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmailConfigurationModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the alert configuration setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Email configuration name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmailConfigurationModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EmailConfigurationModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, EmailConfigurationModelData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings/", false); + uri.AppendPath(emailConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates an alert configuration setting for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + EmailConfigurationModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates an alert configuration setting for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + EmailConfigurationModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of alert configuration settings for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.EmailConfigurationModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of alert configuration settings for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.EmailConfigurationModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of alert configuration settings for the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.EmailConfigurationModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of alert configuration settings for the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.EmailConfigurationModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs new file mode 100644 index 000000000000..5d38e49084db --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class EventRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EventRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public EventRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string eventName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/events/", false); + uri.AppendPath(eventName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the event. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Event name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, eventName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EventModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EventModelData.DeserializeEventModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EventModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the event. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Event name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, eventName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EventModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EventModelData.DeserializeEventModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EventModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/events", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of events in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.EventModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of events in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.EventModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of events in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.EventModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of events in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.EventModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs new file mode 100644 index 000000000000..8b0cc5ec4f86 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class FabricOperationsStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FabricOperationsStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FabricOperationsStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Tracks the results of an asynchronous operation on the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Tracks the results of an asynchronous operation on the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs new file mode 100644 index 000000000000..412419342768 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs @@ -0,0 +1,644 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class FabricRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FabricRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FabricRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FabricModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = FabricModelData.DeserializeFabricModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FabricModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FabricModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = FabricModelData.DeserializeFabricModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FabricModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, FabricModelData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fabricName, FabricModelPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Performs update on the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fabricName, FabricModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fabricName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs update on the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string fabricName, FabricModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fabricName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Fabric Name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics", false); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics", false); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.FabricModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs new file mode 100644 index 000000000000..e078fbdcaba6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class PolicyOperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyOperationStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PolicyOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Tracks the results of an asynchronous operation on the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Policy name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Tracks the results of an asynchronous operation on the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Policy name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string policyName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs new file mode 100644 index 000000000000..323a862ffe1b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class PolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Policy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyModelData.DeserializePolicyModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Policy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyModelData.DeserializePolicyModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, PolicyModelData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Policy name. + /// Policy model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Policy name. + /// Policy model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Policy Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, policyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Policy Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, policyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of policies in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.PolicyModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of policies in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.PolicyModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of policies in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.PolicyModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of policies in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.PolicyModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs new file mode 100644 index 000000000000..61429d9dbe76 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class ProtectedItemOperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProtectedItemOperationStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProtectedItemOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Tracks the results of an asynchronous operation on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected Item name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Tracks the results of an asynchronous operation on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected Item name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs new file mode 100644 index 000000000000..2201dcc367cf --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class ProtectedItemRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProtectedItemRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProtectedItemRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProtectedItemModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProtectedItemModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProtectedItemModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProtectedItemModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, ProtectedItemModelData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// Protected item model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// Protected item model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + if (forceDelete != null) + { + uri.AppendQuery("forceDelete", forceDelete.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, forceDelete); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, forceDelete); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of protected items in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ProtectedItemModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of protected items in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ProtectedItemModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePlannedFailoverRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailoverModel body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/plannedFailover", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Performs the planned failover on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// Planned failover model. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task PlannedFailoverAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailoverModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreatePlannedFailoverRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs the planned failover on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// Planned failover model. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response PlannedFailover(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailoverModel body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreatePlannedFailoverRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of protected items in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ProtectedItemModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of protected items in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ProtectedItemModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs new file mode 100644 index 000000000000..a5de954a4c8d --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class RecoveryPointsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RecoveryPointsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RecoveryPointsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints/", false); + uri.AppendPath(recoveryPointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the recovery point of a protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// Recovery point name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, recoveryPointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RecoveryPointModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RecoveryPointModelData.DeserializeRecoveryPointModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RecoveryPointModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the recovery point of a protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// Recovery point name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, recoveryPointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RecoveryPointModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RecoveryPointModelData.DeserializeRecoveryPointModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RecoveryPointModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of recovery points of the given protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.RecoveryPointModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recovery points of the given protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.RecoveryPointModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of recovery points of the given protected item. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, protectedItemName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.RecoveryPointModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recovery points of the given protected item. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Protected item name. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, protectedItemName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.RecoveryPointModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs new file mode 100644 index 000000000000..731bd3587c7c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class ReplicationExtensionOperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ReplicationExtensionOperationStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ReplicationExtensionOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Tracks the results of an asynchronous operation on the replication extension. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Replication extension name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Tracks the results of an asynchronous operation on the replication extension. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Replication extension name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs new file mode 100644 index 000000000000..26c67964427f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class ReplicationExtensionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ReplicationExtensionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ReplicationExtensionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the replication extension. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ReplicationExtensionModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ReplicationExtensionModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the replication extension. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ReplicationExtensionModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ReplicationExtensionModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, ReplicationExtensionModelData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of replication extensions in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ReplicationExtensionModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of replication extensions in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ReplicationExtensionModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of replication extensions in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.ReplicationExtensionModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of replication extensions in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.ReplicationExtensionModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs new file mode 100644 index 000000000000..ac2956c0bf93 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class VaultOperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of VaultOperationStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public VaultOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Tracks the results of an asynchronous operation on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Tracks the results of an asynchronous operation on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs new file mode 100644 index 000000000000..db956805d415 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs @@ -0,0 +1,644 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class VaultRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of VaultRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public VaultRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VaultModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = VaultModelData.DeserializeVaultModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((VaultModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VaultModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = VaultModelData.DeserializeVaultModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((VaultModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, VaultModelData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, VaultModelPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Performs update on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, VaultModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs update on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string vaultName, VaultModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault Name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults", false); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults", false); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.VaultModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs new file mode 100644 index 000000000000..0ed599ae9dbb --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class WorkflowOperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowOperationStatusRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, string operationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Tracks the results of an asynchronous operation on the job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Workflow name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Tracks the results of an asynchronous operation on the job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Workflow name. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OperationStatus.DeserializeOperationStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs new file mode 100644 index 000000000000..fc7a5c126e11 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class WorkflowRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2021-02-16-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string workflowName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Workflow name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowModelData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowModelData.DeserializeWorkflowModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Workflow name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowModelData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowModelData.DeserializeWorkflowModelData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowModelData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/jobs", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of jobs in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.WorkflowModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of jobs in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.WorkflowModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of jobs in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.WorkflowModelCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of jobs in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Vault name. + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, filter, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.WorkflowModelCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs new file mode 100644 index 000000000000..3be413deeb1a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetVaultModels method from an instance of . + /// + public partial class VaultModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _vaultModelVaultClientDiagnostics; + private readonly VaultRestOperations _vaultModelVaultRestClient; + + /// Initializes a new instance of the class for mocking. + protected VaultModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal VaultModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _vaultModelVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", VaultModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(VaultModelResource.ResourceType, out string vaultModelVaultApiVersion); + _vaultModelVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, vaultModelVaultApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Vault Name. + /// Vault properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _vaultModelVaultRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Vault Name. + /// Vault properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _vaultModelVaultRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// Vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Get"); + scope.Start(); + try + { + var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// Vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Get"); + scope.Start(); + try + { + var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of vaults in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// Vault_List + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _vaultModelVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _vaultModelVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// Vault_List + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _vaultModelVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _vaultModelVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// Vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Exists"); + scope.Start(); + try + { + var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// Vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Exists"); + scope.Start(); + try + { + var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelData.cs new file mode 100644 index 000000000000..86481a2ad28c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the VaultModel data model. + /// Vault model. + /// + public partial class VaultModelData : TrackedResourceData + { + /// Initializes a new instance of VaultModelData. + /// The location. + public VaultModelData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of VaultModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Vault properties. + internal VaultModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, VaultModelProperties properties) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + } + + /// Vault properties. + public VaultModelProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs new file mode 100644 index 000000000000..e6602d15bc18 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs @@ -0,0 +1,1002 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a VaultModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetVaultModelResource method. + /// Otherwise you can get one from its parent resource using the GetVaultModel method. + /// + public partial class VaultModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _vaultModelVaultClientDiagnostics; + private readonly VaultRestOperations _vaultModelVaultRestClient; + private readonly ClientDiagnostics _vaultOperationStatusClientDiagnostics; + private readonly VaultOperationStatusRestOperations _vaultOperationStatusRestClient; + private readonly VaultModelData _data; + + /// Initializes a new instance of the class for mocking. + protected VaultModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal VaultModelResource(ArmClient client, VaultModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal VaultModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _vaultModelVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string vaultModelVaultApiVersion); + _vaultModelVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, vaultModelVaultApiVersion); + _vaultOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _vaultOperationStatusRestClient = new VaultOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual VaultModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of EmailConfigurationModelResources in the VaultModel. + /// An object representing collection of EmailConfigurationModelResources and their operations over a EmailConfigurationModelResource. + public virtual EmailConfigurationModelCollection GetEmailConfigurationModels() + { + return GetCachedClient(Client => new EmailConfigurationModelCollection(Client, Id)); + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// Email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetEmailConfigurationModelAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + { + return await GetEmailConfigurationModels().GetAsync(emailConfigurationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfiguration_Get + /// + /// + /// + /// Email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetEmailConfigurationModel(string emailConfigurationName, CancellationToken cancellationToken = default) + { + return GetEmailConfigurationModels().Get(emailConfigurationName, cancellationToken); + } + + /// Gets a collection of EventModelResources in the VaultModel. + /// An object representing collection of EventModelResources and their operations over a EventModelResource. + public virtual EventModelCollection GetEventModels() + { + return GetCachedClient(Client => new EventModelCollection(Client, Id)); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// Event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetEventModelAsync(string eventName, CancellationToken cancellationToken = default) + { + return await GetEventModels().GetAsync(eventName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// Event_Get + /// + /// + /// + /// Event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetEventModel(string eventName, CancellationToken cancellationToken = default) + { + return GetEventModels().Get(eventName, cancellationToken); + } + + /// Gets a collection of PolicyModelResources in the VaultModel. + /// An object representing collection of PolicyModelResources and their operations over a PolicyModelResource. + public virtual PolicyModelCollection GetPolicyModels() + { + return GetCachedClient(Client => new PolicyModelCollection(Client, Id)); + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// Policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetPolicyModelAsync(string policyName, CancellationToken cancellationToken = default) + { + return await GetPolicyModels().GetAsync(policyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// Policy_Get + /// + /// + /// + /// Policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetPolicyModel(string policyName, CancellationToken cancellationToken = default) + { + return GetPolicyModels().Get(policyName, cancellationToken); + } + + /// Gets a collection of ProtectedItemModelResources in the VaultModel. + /// An object representing collection of ProtectedItemModelResources and their operations over a ProtectedItemModelResource. + public virtual ProtectedItemModelCollection GetProtectedItemModels() + { + return GetCachedClient(Client => new ProtectedItemModelCollection(Client, Id)); + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// Protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetProtectedItemModelAsync(string protectedItemName, CancellationToken cancellationToken = default) + { + return await GetProtectedItemModels().GetAsync(protectedItemName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItem_Get + /// + /// + /// + /// Protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetProtectedItemModel(string protectedItemName, CancellationToken cancellationToken = default) + { + return GetProtectedItemModels().Get(protectedItemName, cancellationToken); + } + + /// Gets a collection of ReplicationExtensionModelResources in the VaultModel. + /// An object representing collection of ReplicationExtensionModelResources and their operations over a ReplicationExtensionModelResource. + public virtual ReplicationExtensionModelCollection GetReplicationExtensionModels() + { + return GetCachedClient(Client => new ReplicationExtensionModelCollection(Client, Id)); + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// Replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetReplicationExtensionModelAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + { + return await GetReplicationExtensionModels().GetAsync(replicationExtensionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtension_Get + /// + /// + /// + /// Replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetReplicationExtensionModel(string replicationExtensionName, CancellationToken cancellationToken = default) + { + return GetReplicationExtensionModels().Get(replicationExtensionName, cancellationToken); + } + + /// Gets a collection of WorkflowModelResources in the VaultModel. + /// An object representing collection of WorkflowModelResources and their operations over a WorkflowModelResource. + public virtual WorkflowModelCollection GetWorkflowModels() + { + return GetCachedClient(Client => new WorkflowModelCollection(Client, Id)); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowModelAsync(string workflowName, CancellationToken cancellationToken = default) + { + return await GetWorkflowModels().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetWorkflowModel(string workflowName, CancellationToken cancellationToken = default) + { + return GetWorkflowModels().Get(workflowName, cancellationToken); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Get"); + scope.Start(); + try + { + var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Get"); + scope.Start(); + try + { + var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Delete"); + scope.Start(); + try + { + var response = await _vaultModelVaultRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Delete"); + scope.Start(); + try + { + var response = _vaultModelVaultRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Vault properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, VaultModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Update"); + scope.Start(); + try + { + var response = await _vaultModelVaultRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Vault properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, VaultModelPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Update"); + scope.Start(); + try + { + var response = _vaultModelVaultRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/operations/{operationId} + /// + /// + /// Operation Id + /// VaultOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetVaultOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _vaultOperationStatusClientDiagnostics.CreateScope("VaultModelResource.GetVaultOperationStatu"); + scope.Start(); + try + { + var response = await _vaultOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/operations/{operationId} + /// + /// + /// Operation Id + /// VaultOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetVaultOperationStatu(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _vaultOperationStatusClientDiagnostics.CreateScope("VaultModelResource.GetVaultOperationStatu"); + scope.Start(); + try + { + var response = _vaultOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new VaultModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new VaultModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new VaultModelPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new VaultModelPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new VaultModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// Vault_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new VaultModelPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs new file mode 100644 index 000000000000..4ca9deec9d3a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowModels method from an instance of . + /// + public partial class WorkflowModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowModelWorkflowClientDiagnostics; + private readonly WorkflowRestOperations _workflowModelWorkflowRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowModelCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowModelWorkflowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", WorkflowModelResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowModelResource.ResourceType, out string workflowModelWorkflowApiVersion); + _workflowModelWorkflowRestClient = new WorkflowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowModelWorkflowApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != VaultModelResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Get"); + scope.Start(); + try + { + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Get"); + scope.Start(); + try + { + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of jobs in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs + /// + /// + /// Operation Id + /// Workflow_List + /// + /// + /// + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of jobs in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs + /// + /// + /// Operation Id + /// Workflow_List + /// + /// + /// + /// Filter string. + /// Continuation token. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Exists"); + scope.Start(); + try + { + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs new file mode 100644 index 000000000000..9e4939501f47 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the WorkflowModel data model. + /// Workflow model. + /// + public partial class WorkflowModelData : ResourceData + { + /// Initializes a new instance of WorkflowModelData. + /// Workflow model properties. + /// is null. + internal WorkflowModelData(WorkflowModelProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of WorkflowModelData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Workflow model properties. + /// Gets or sets the resource tags. + internal WorkflowModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkflowModelProperties properties, IReadOnlyDictionary tags) : base(id, name, resourceType, systemData) + { + Properties = properties; + Tags = tags; + } + + /// Workflow model properties. + public WorkflowModelProperties Properties { get; } + /// Gets or sets the resource tags. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs new file mode 100644 index 000000000000..380394f89e09 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a WorkflowModel along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowModelResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowModel method. + /// + public partial class WorkflowModelResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string workflowName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowModelWorkflowClientDiagnostics; + private readonly WorkflowRestOperations _workflowModelWorkflowRestClient; + private readonly ClientDiagnostics _workflowOperationStatusClientDiagnostics; + private readonly WorkflowOperationStatusRestOperations _workflowOperationStatusRestClient; + private readonly WorkflowModelData _data; + + /// Initializes a new instance of the class for mocking. + protected WorkflowModelResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowModelResource(ArmClient client, WorkflowModelData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowModelWorkflowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowModelWorkflowApiVersion); + _workflowModelWorkflowRestClient = new WorkflowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowModelWorkflowApiVersion); + _workflowOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _workflowOperationStatusRestClient = new WorkflowOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/jobs"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowModelData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelResource.Get"); + scope.Start(); + try + { + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelResource.Get"); + scope.Start(); + try + { + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName}/operations/{operationId} + /// + /// + /// Operation Id + /// WorkflowOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetWorkflowOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _workflowOperationStatusClientDiagnostics.CreateScope("WorkflowModelResource.GetWorkflowOperationStatu"); + scope.Start(); + try + { + var response = await _workflowOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tracks the results of an asynchronous operation on the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName}/operations/{operationId} + /// + /// + /// Operation Id + /// WorkflowOperationStatus_Get + /// + /// + /// + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetWorkflowOperationStatu(string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = _workflowOperationStatusClientDiagnostics.CreateScope("WorkflowModelResource.GetWorkflowOperationStatu"); + scope.Start(); + try + { + var response = _workflowOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..3ac26d5bc492 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: Azure.Core.AzureResourceProviderNamespace("RecoveryServicesDataReplication")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.RecoveryServicesDataReplication.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md new file mode 100644 index 000000000000..a4acdf61cd56 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md @@ -0,0 +1,49 @@ +# Generated code configuration + +Run `dotnet build /t:GenerateCode` to generate code. + +``` yaml +azure-arm: true +csharp: true +library-name: RecoveryServicesDataReplication +namespace: Azure.ResourceManager.RecoveryServicesDataReplication +require: D:/forked-repos/openapihub/azure-rest-api-specs/specification/recoveryservicesdatareplication/resource-manager/readme.md +output-folder: $(this-folder)/Generated +clear-output-folder: true +skip-csproj: true +modelerfour: + flatten-payloads: false + + + +format-by-name-rules: + 'tenantId': 'uuid' + 'ETag': 'etag' + 'location': 'azure-location' + '*Uri': 'Uri' + '*Uris': 'Uri' + +rename-rules: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + +``` \ No newline at end of file diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj new file mode 100644 index 000000000000..a758435d13b9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestBase.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestBase.cs new file mode 100644 index 000000000000..86153801e6b1 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestBase.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Tests +{ + public class RecoveryServicesDataReplicationManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected RecoveryServicesDataReplicationManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected RecoveryServicesDataReplicationManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestEnvironment.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestEnvironment.cs new file mode 100644 index 000000000000..ac2357129247 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Tests +{ + public class RecoveryServicesDataReplicationManagementTestEnvironment : TestEnvironment + { + } +} \ No newline at end of file diff --git a/sdk/recoveryservices-datareplication/ci.mgmt.yml b/sdk/recoveryservices-datareplication/ci.mgmt.yml new file mode 100644 index 000000000000..d1d25ec16b02 --- /dev/null +++ b/sdk/recoveryservices-datareplication/ci.mgmt.yml @@ -0,0 +1,23 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservicesdatareplication/ci.mgmt.yml + - sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: recoveryservicesdatareplication + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.RecoveryServicesDataReplication + safeName: AzureResourceManagerRecoveryServicesDataReplication diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index b491e92381e3..e7ba106fa6de 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -87,7 +87,6 @@ trigger: - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - - sdk/hybriddatamanager/Azure.ResourceManager.HybridData - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral @@ -137,6 +136,7 @@ trigger: - sdk/quota/Azure.ResourceManager.Quota - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - sdk/redis/Azure.ResourceManager.Redis - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise @@ -264,7 +264,6 @@ pr: - sdk/hybridaks/Azure.ResourceManager.HybridContainerService - sdk/hybridcompute/Azure.ResourceManager.HybridCompute - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity - - sdk/hybriddatamanager/Azure.ResourceManager.HybridData - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral @@ -314,6 +313,7 @@ pr: - sdk/quota/Azure.ResourceManager.Quota - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery - sdk/redis/Azure.ResourceManager.Redis - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise From 2860f413c2e59cb9b4ae78a5edfbe1ddd55e37fc Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Mon, 7 Aug 2023 19:52:43 -0700 Subject: [PATCH 2/6] Added beta package --- ...yServicesDataReplication.netstandard2.0.cs | 1473 +++++++++++++++++ 1 file changed, 1473 insertions(+) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs new file mode 100644 index 000000000000..b9bfb8e36c85 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs @@ -0,0 +1,1473 @@ +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DraModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DraModelCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string draName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string draName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DraModelData : Azure.ResourceManager.Models.ResourceData + { + public DraModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class DraModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DraModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string draName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDraOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDraOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EmailConfigurationModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EmailConfigurationModelCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class EmailConfigurationModelData : Azure.ResourceManager.Models.ResourceData + { + public EmailConfigurationModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class EmailConfigurationModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EmailConfigurationModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EventModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EventModelCollection() { } + public virtual Azure.Response Exists(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class EventModelData : Azure.ResourceManager.Models.ResourceData + { + internal EventModelData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties Properties { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + public partial class EventModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EventModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EventModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string eventName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FabricModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FabricModelCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FabricModelData : Azure.ResourceManager.Models.TrackedResourceData + { + public FabricModelData(Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties properties) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties Properties { get { throw null; } set { } } + } + public partial class FabricModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FabricModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDraModel(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDraModelAsync(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DraModelCollection GetDraModels() { throw null; } + public virtual Azure.Response GetFabricOperationsStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFabricOperationsStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PolicyModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PolicyModelCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PolicyModelData : Azure.ResourceManager.Models.ResourceData + { + public PolicyModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class PolicyModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PolicyModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPolicyOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPolicyOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ProtectedItemModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProtectedItemModelCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProtectedItemModelData : Azure.ResourceManager.Models.ResourceData + { + public ProtectedItemModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class ProtectedItemModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProtectedItemModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProtectedItemOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProtectedItemOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetRecoveryPointModel(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRecoveryPointModelAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelCollection GetRecoveryPointModels() { throw null; } + public virtual Azure.ResourceManager.ArmOperation PlannedFailover(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PlannedFailoverAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class RecoveryPointModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected RecoveryPointModelCollection() { } + public virtual Azure.Response Exists(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class RecoveryPointModelData : Azure.ResourceManager.Models.ResourceData + { + internal RecoveryPointModelData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties Properties { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + public partial class RecoveryPointModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RecoveryPointModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class RecoveryServicesDataReplicationExtensions + { + public static Azure.Response CheckNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.CheckNameAvailabilityModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.CheckNameAvailabilityModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response DeploymentPreflight(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> DeploymentPreflightAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DraModelResource GetDraModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelResource GetEmailConfigurationModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.EventModelResource GetEventModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetFabricModel(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetFabricModelAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelResource GetFabricModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelCollection GetFabricModels(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetFabricModels(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetFabricModelsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelResource GetPolicyModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelResource GetProtectedItemModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelResource GetRecoveryPointModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelResource GetReplicationExtensionModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetVaultModel(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetVaultModelAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelResource GetVaultModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelCollection GetVaultModels(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetVaultModels(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetVaultModelsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelResource GetWorkflowModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class ReplicationExtensionModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ReplicationExtensionModelCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ReplicationExtensionModelData : Azure.ResourceManager.Models.ResourceData + { + public ReplicationExtensionModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class ReplicationExtensionModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ReplicationExtensionModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetReplicationExtensionOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetReplicationExtensionOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class VaultModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected VaultModelCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class VaultModelData : Azure.ResourceManager.Models.TrackedResourceData + { + public VaultModelData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties Properties { get { throw null; } set { } } + } + public partial class VaultModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected VaultModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEmailConfigurationModel(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEmailConfigurationModelAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelCollection GetEmailConfigurationModels() { throw null; } + public virtual Azure.Response GetEventModel(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEventModelAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EventModelCollection GetEventModels() { throw null; } + public virtual Azure.Response GetPolicyModel(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPolicyModelAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelCollection GetPolicyModels() { throw null; } + public virtual Azure.Response GetProtectedItemModel(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProtectedItemModelAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelCollection GetProtectedItemModels() { throw null; } + public virtual Azure.Response GetReplicationExtensionModel(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetReplicationExtensionModelAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelCollection GetReplicationExtensionModels() { throw null; } + public virtual Azure.Response GetVaultOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetVaultOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowModel(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowModelAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelCollection GetWorkflowModels() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class WorkflowModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowModelCollection() { } + public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowModelData : Azure.ResourceManager.Models.ResourceData + { + internal WorkflowModelData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties Properties { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + } + public partial class WorkflowModelResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowModelResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string workflowName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public static partial class ArmRecoveryServicesDataReplicationModelFactory + { + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIFabricModelCustomProperties AzStackHCIFabricModelCustomProperties(string azStackHciSiteId = null, System.Collections.Generic.IEnumerable applianceName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties cluster = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.CheckNameAvailabilityResponseModel CheckNameAvailabilityResponseModel(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData DraModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties DraModelProperties(string correlationId = null, string machineId = null, string machineName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel authenticationIdentity = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel resourceAccessIdentity = null, bool? isResponsive = default(bool?), System.DateTimeOffset? lastHeartbeat = default(System.DateTimeOffset?), string versionNumber = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData EmailConfigurationModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ErrorModel ErrorModel(string code = null, string errorModelType = null, string severity = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.EventModelData EventModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties properties = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties EventModelProperties(string resourceType = null, string resourceName = null, string eventType = null, string eventName = null, System.DateTimeOffset? timeOfOccurrence = default(System.DateTimeOffset?), string severity = null, string description = null, string correlationId = null, System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData FabricModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties FabricModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), string serviceEndpoint = null, string serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? health = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties FailoverProtectedItemProperties(string protectedItemName = null, string vmName = null, string testVmName = null, string recoveryPointId = null, System.DateTimeOffset? recoveryPointOn = default(System.DateTimeOffset?), string networkName = null, string subnet = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverWorkflowModelCustomProperties FailoverWorkflowModelCustomProperties(System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthErrorModel HealthErrorModel(string affectedResourceType = null, System.Collections.Generic.IEnumerable affectedResourceCorrelationIds = null, System.Collections.Generic.IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelCustomProperties(string hyperVSiteId = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIEventModelCustomProperties HyperVToAzStackHCIEventModelCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCINicInput HyperVToAzStackHCINicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIProtectedDiskProperties HyperVToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIProtectedItemModelCustomProperties HyperVToAzStackHCIProtectedItemModelCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string fabricDiscoveryMachineId = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string targetVmName = null, string targetResourceGroupId = null, string storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceived = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIProtectedNicProperties HyperVToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIRecoveryPointModelCustomProperties HyperVToAzStackHCIRecoveryPointModelCustomProperties(System.Collections.Generic.IEnumerable diskIds = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIReplicationExtensionModelCustomProperties HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId = null, string hyperVSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.InnerHealthErrorModel InnerHealthErrorModel(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.OperationStatus OperationStatus(string id = null, string name = null, string status = null, string startTime = null, string endTime = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData PolicyModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties PolicyModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties ProtectedItemJobProperties(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData ProtectedItemModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties ProtectedItemModelProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState? protectionState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState?), string protectionStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState? testFailoverState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState?), string testFailoverStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState? resynchronizationState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState?), string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string draId = null, string targetDraId = null, bool? resyncRequired = default(bool?), System.DateTimeOffset? lastSuccessfulPlannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulUnplannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulTestFailoverOn = default(System.DateTimeOffset?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob currentJob = null, System.Collections.Generic.IEnumerable allowedJobs = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob lastFailedEnableProtectionJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob lastFailedPlannedFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob lastTestFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? replicationHealth = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob ProtectedItemModelPropertiesCurrentJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob ProtectedItemModelPropertiesLastFailedEnableProtectionJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob ProtectedItemModelPropertiesLastTestFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelData RecoveryPointModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties properties = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties RecoveryPointModelProperties(System.DateTimeOffset recoveryPointOn = default(System.DateTimeOffset), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType recoveryPointType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData ReplicationExtensionModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties ReplicationExtensionModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskModel TaskModel(string taskName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string customInstanceType = null, System.Collections.Generic.IEnumerable childrenWorkflows = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupWorkflowModelCustomProperties TestFailoverCleanupWorkflowModelCustomProperties(System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null, string comments = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverWorkflowModelCustomProperties TestFailoverWorkflowModelCustomProperties(System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData VaultModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties VaultModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), string serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType? vaultType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCINicInput VMwareToAzStackHCINicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedDiskProperties VMwareToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedItemModelCustomProperties VMwareToAzStackHCIProtectedItemModelCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string storageContainerId = null, string targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string osType = null, string osName = null, string firmwareType = null, string fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceived = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), long? resyncRetryCount = default(long?), bool? resyncRequired = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? resyncState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState?), bool? performAutoResync = default(bool?), long? resumeRetryCount = default(long?), System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = default(bool?), string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIReplicationExtensionModelCustomProperties VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId = null, string vmwareSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = "Unknown", System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData WorkflowModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties properties = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties WorkflowModelProperties(string displayName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? objectType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType?), string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, System.Collections.Generic.IEnumerable allowedActions = null, string activityId = null, System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties customProperties = null) { throw null; } + } + public partial class AzStackHCIClusterProperties + { + public AzStackHCIClusterProperties(string clusterName, string resourceName, string storageAccountName, System.Collections.Generic.IEnumerable storageContainers) { } + public string ClusterName { get { throw null; } set { } } + public string ResourceName { get { throw null; } set { } } + public string StorageAccountName { get { throw null; } set { } } + public System.Collections.Generic.IList StorageContainers { get { throw null; } } + } + public partial class AzStackHCIDraModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties + { + public AzStackHCIDraModelCustomProperties() { } + } + public partial class AzStackHCIFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties + { + public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties cluster, string migrationSolutionId) { } + public System.Collections.Generic.IReadOnlyList ApplianceName { get { throw null; } } + public string AzStackHciSiteId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties Cluster { get { throw null; } set { } } + public string FabricContainerId { get { throw null; } } + public string FabricResourceId { get { throw null; } } + public System.Uri MigrationHubUri { get { throw null; } } + public string MigrationSolutionId { get { throw null; } set { } } + } + public partial class CheckNameAvailabilityModel + { + public CheckNameAvailabilityModel() { } + public string Name { get { throw null; } set { } } + public string ResourceType { get { throw null; } set { } } + } + public partial class CheckNameAvailabilityResponseModel + { + internal CheckNameAvailabilityResponseModel() { } + public string Message { get { throw null; } } + public bool? NameAvailable { get { throw null; } } + public string Reason { get { throw null; } } + } + public partial class DeploymentPreflightModel + { + public DeploymentPreflightModel() { } + public System.Collections.Generic.IList Resources { get { throw null; } } + } + public partial class DeploymentPreflightResource + { + public DeploymentPreflightResource() { } + public string ApiVersion { get { throw null; } set { } } + public string DeploymentPreflightResourceType { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + } + public abstract partial class DraModelCustomProperties + { + protected DraModelCustomProperties() { } + } + public partial class DraModelProperties + { + public DraModelProperties(string machineId, string machineName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel authenticationIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel resourceAccessIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel AuthenticationIdentity { get { throw null; } set { } } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties CustomProperties { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public bool? IsResponsive { get { throw null; } } + public System.DateTimeOffset? LastHeartbeat { get { throw null; } } + public string MachineId { get { throw null; } set { } } + public string MachineName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel ResourceAccessIdentity { get { throw null; } set { } } + public string VersionNumber { get { throw null; } } + } + public partial class EmailConfigurationModelProperties + { + public EmailConfigurationModelProperties(bool sendToOwners) { } + public System.Collections.Generic.IList CustomEmailAddresses { get { throw null; } } + public string Locale { get { throw null; } set { } } + public bool SendToOwners { get { throw null; } set { } } + } + public partial class ErrorModel + { + internal ErrorModel() { } + public string Causes { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string ErrorModelType { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + } + public abstract partial class EventModelCustomProperties + { + protected EventModelCustomProperties() { } + } + public partial class EventModelProperties + { + internal EventModelProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties CustomProperties { get { throw null; } } + public string Description { get { throw null; } } + public string EventName { get { throw null; } } + public string EventType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public string ResourceName { get { throw null; } } + public string ResourceType { get { throw null; } } + public string Severity { get { throw null; } } + public System.DateTimeOffset? TimeOfOccurrence { get { throw null; } } + } + public abstract partial class FabricModelCustomProperties + { + protected FabricModelCustomProperties() { } + } + public partial class FabricModelPatch : Azure.ResourceManager.Models.ResourceData + { + public FabricModelPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class FabricModelProperties + { + public FabricModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? Health { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string ServiceEndpoint { get { throw null; } } + public string ServiceResourceId { get { throw null; } } + } + public partial class FailoverProtectedItemProperties + { + internal FailoverProtectedItemProperties() { } + public string NetworkName { get { throw null; } } + public string ProtectedItemName { get { throw null; } } + public string RecoveryPointId { get { throw null; } } + public System.DateTimeOffset? RecoveryPointOn { get { throw null; } } + public string Subnet { get { throw null; } } + public string TestVmName { get { throw null; } } + public string VmName { get { throw null; } } + } + public partial class FailoverWorkflowModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties + { + internal FailoverWorkflowModelCustomProperties() { } + public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + } + public partial class HealthErrorModel + { + internal HealthErrorModel() { } + public System.Collections.Generic.IReadOnlyList AffectedResourceCorrelationIds { get { throw null; } } + public string AffectedResourceType { get { throw null; } } + public string Category { get { throw null; } } + public string Causes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildErrors { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string HealthCategory { get { throw null; } } + public bool? IsCustomerResolvable { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Source { get { throw null; } } + public string Summary { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HealthStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HealthStatus(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus Critical { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus Normal { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class HyperVMigrateDraModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties + { + public HyperVMigrateDraModelCustomProperties() { } + } + public partial class HyperVMigrateFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties + { + public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migrationSolutionId) { } + public string FabricContainerId { get { throw null; } } + public string FabricResourceId { get { throw null; } } + public string HyperVSiteId { get { throw null; } set { } } + public System.Uri MigrationHubUri { get { throw null; } } + public string MigrationSolutionId { get { throw null; } set { } } + } + public partial class HyperVToAzStackHCIDiskInput + { + public HyperVToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public string DiskFileFormat { get { throw null; } set { } } + public string DiskId { get { throw null; } set { } } + public long DiskSizeGB { get { throw null; } set { } } + public bool? IsDynamic { get { throw null; } set { } } + public bool IsOSDisk { get { throw null; } set { } } + public string StorageContainerId { get { throw null; } set { } } + } + public partial class HyperVToAzStackHCIEventModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties + { + internal HyperVToAzStackHCIEventModelCustomProperties() { } + public string EventSourceFriendlyName { get { throw null; } } + public string ProtectedItemFriendlyName { get { throw null; } } + public string ServerType { get { throw null; } } + public string SourceApplianceName { get { throw null; } } + public string TargetApplianceName { get { throw null; } } + } + public partial class HyperVToAzStackHCINicInput + { + public HyperVToAzStackHCINicInput(string nicId, string targetNetworkId, string testNetworkId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectionTypeForFailover { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + } + public partial class HyperVToAzStackHCIPlannedFailoverModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties + { + public HyperVToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { } + public bool ShutdownSourceVm { get { throw null; } set { } } + } + public partial class HyperVToAzStackHCIPolicyModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties + { + public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } + public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } + public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } + } + public partial class HyperVToAzStackHCIProtectedDiskProperties + { + internal HyperVToAzStackHCIProtectedDiskProperties() { } + public long? CapacityInBytes { get { throw null; } } + public string DiskType { get { throw null; } } + public bool? IsDynamic { get { throw null; } } + public bool? IsOSDisk { get { throw null; } } + public string MigrateDiskName { get { throw null; } } + public string SeedDiskName { get { throw null; } } + public string SourceDiskId { get { throw null; } } + public string SourceDiskName { get { throw null; } } + public string StorageContainerId { get { throw null; } } + public string StorageContainerLocalPath { get { throw null; } } + public string TestMigrateDiskName { get { throw null; } } + } + public partial class HyperVToAzStackHCIProtectedItemModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties + { + public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string fabricDiscoveryMachineId, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceDraName, string targetDraName, string customLocationRegion) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } + public string CustomLocationRegion { get { throw null; } set { } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public string FabricDiscoveryMachineId { get { throw null; } set { } } + public string FailoverRecoveryPointId { get { throw null; } } + public string FirmwareType { get { throw null; } } + public string HyperVGeneration { get { throw null; } set { } } + public int? InitialReplicationProgressPercentage { get { throw null; } } + public bool? IsDynamicRam { get { throw null; } set { } } + public string LastRecoveryPointId { get { throw null; } } + public System.DateTimeOffset? LastRecoveryPointReceived { get { throw null; } } + public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSName { get { throw null; } } + public string OSType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public int? ResyncProgressPercentage { get { throw null; } } + public string RunAsAccountId { get { throw null; } set { } } + public string SourceApplianceName { get { throw null; } } + public int? SourceCpuCores { get { throw null; } } + public string SourceDraName { get { throw null; } set { } } + public double? SourceMemoryInMegaBytes { get { throw null; } } + public string SourceVmName { get { throw null; } } + public string StorageContainerId { get { throw null; } set { } } + public string TargetApplianceName { get { throw null; } } + public string TargetArcClusterCustomLocationId { get { throw null; } set { } } + public string TargetAzStackHciClusterName { get { throw null; } } + public int? TargetCpuCores { get { throw null; } set { } } + public string TargetDraName { get { throw null; } set { } } + public string TargetHciClusterId { get { throw null; } set { } } + public string TargetLocation { get { throw null; } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TargetResourceGroupId { get { throw null; } set { } } + public string TargetVmBiosId { get { throw null; } } + public string TargetVmName { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + } + public partial class HyperVToAzStackHCIProtectedNicProperties + { + internal HyperVToAzStackHCIProtectedNicProperties() { } + public string MacAddress { get { throw null; } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? SelectionTypeForFailover { get { throw null; } } + public string TargetNetworkId { get { throw null; } } + public string TestNetworkId { get { throw null; } } + } + public partial class HyperVToAzStackHCIRecoveryPointModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties + { + internal HyperVToAzStackHCIRecoveryPointModelCustomProperties() { } + public System.Collections.Generic.IReadOnlyList DiskIds { get { throw null; } } + } + public partial class HyperVToAzStackHCIReplicationExtensionModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties + { + public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId, string azStackHciFabricArmId) { } + public System.Uri AsrServiceUri { get { throw null; } } + public string AzStackHciFabricArmId { get { throw null; } set { } } + public string AzStackHciSiteId { get { throw null; } } + public System.Uri GatewayServiceUri { get { throw null; } } + public string HyperVFabricArmId { get { throw null; } set { } } + public string HyperVSiteId { get { throw null; } } + public System.Uri RcmServiceUri { get { throw null; } } + public string ResourceGroup { get { throw null; } } + public string ResourceLocation { get { throw null; } } + public string SourceGatewayServiceId { get { throw null; } } + public string SourceStorageContainerName { get { throw null; } } + public string StorageAccountId { get { throw null; } set { } } + public string StorageAccountSasSecretName { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public string TargetGatewayServiceId { get { throw null; } } + public string TargetStorageContainerName { get { throw null; } } + } + public partial class IdentityModel + { + public IdentityModel(System.Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) { } + public string AadAuthority { get { throw null; } set { } } + public string ApplicationId { get { throw null; } set { } } + public string Audience { get { throw null; } set { } } + public string ObjectId { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + } + public partial class InnerHealthErrorModel + { + internal InnerHealthErrorModel() { } + public string Category { get { throw null; } } + public string Causes { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string HealthCategory { get { throw null; } } + public bool? IsCustomerResolvable { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Source { get { throw null; } } + public string Summary { get { throw null; } } + } + public partial class OperationStatus + { + internal OperationStatus() { } + public string EndTime { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public string StartTime { get { throw null; } } + public string Status { get { throw null; } } + } + public partial class PlannedFailoverModel + { + public PlannedFailoverModel(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties PlannedFailoverModelCustomProperties { get { throw null; } set { } } + } + public abstract partial class PlannedFailoverModelCustomProperties + { + protected PlannedFailoverModelCustomProperties() { } + } + public partial class PlannedFailoverModelProperties + { + public PlannedFailoverModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties CustomProperties { get { throw null; } set { } } + } + public abstract partial class PolicyModelCustomProperties + { + protected PolicyModelCustomProperties() { } + } + public partial class PolicyModelProperties + { + public PolicyModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProtectedItemActiveLocation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProtectedItemActiveLocation(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation Primary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation Recovery { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProtectedItemDynamicMemoryConfig + { + public ProtectedItemDynamicMemoryConfig(long maximumMemoryInMegaBytes, long minimumMemoryInMegaBytes, int targetMemoryBufferPercentage) { } + public long MaximumMemoryInMegaBytes { get { throw null; } set { } } + public long MinimumMemoryInMegaBytes { get { throw null; } set { } } + public int TargetMemoryBufferPercentage { get { throw null; } set { } } + } + public partial class ProtectedItemJobProperties + { + internal ProtectedItemJobProperties() { } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public string ScenarioName { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string State { get { throw null; } } + } + public abstract partial class ProtectedItemModelCustomProperties + { + protected ProtectedItemModelCustomProperties() { } + } + public partial class ProtectedItemModelProperties + { + public ProtectedItemModelProperties(string policyName, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties customProperties) { } + public System.Collections.Generic.IReadOnlyList AllowedJobs { get { throw null; } } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob CurrentJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties CustomProperties { get { throw null; } set { } } + public string DraId { get { throw null; } } + public string FabricId { get { throw null; } } + public string FabricObjectId { get { throw null; } } + public string FabricObjectName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob LastFailedEnableProtectionJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob LastFailedPlannedFailoverJob { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulPlannedFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulTestFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob LastTestFailoverJob { get { throw null; } } + public string PolicyName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState? ProtectionState { get { throw null; } } + public string ProtectionStateDescription { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string ReplicationExtensionName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? ReplicationHealth { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState? ResynchronizationState { get { throw null; } } + public bool? ResyncRequired { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public string TargetDraId { get { throw null; } } + public string TargetFabricId { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState? TestFailoverState { get { throw null; } } + public string TestFailoverStateDescription { get { throw null; } } + } + public partial class ProtectedItemModelPropertiesCurrentJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties + { + internal ProtectedItemModelPropertiesCurrentJob() { } + } + public partial class ProtectedItemModelPropertiesLastFailedEnableProtectionJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties + { + internal ProtectedItemModelPropertiesLastFailedEnableProtectionJob() { } + } + public partial class ProtectedItemModelPropertiesLastFailedPlannedFailoverJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties + { + internal ProtectedItemModelPropertiesLastFailedPlannedFailoverJob() { } + } + public partial class ProtectedItemModelPropertiesLastTestFailoverJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties + { + internal ProtectedItemModelPropertiesLastTestFailoverJob() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProtectionState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState DisablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState DisablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState EnablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState EnablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationCompletedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationCompletedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationInProgress { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState Protected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ProtectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ProtectedStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnprotectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnprotectedStatesEnd { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class RecoveryPointModelCustomProperties + { + protected RecoveryPointModelCustomProperties() { } + } + public partial class RecoveryPointModelProperties + { + internal RecoveryPointModelProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties CustomProperties { get { throw null; } } + public System.DateTimeOffset RecoveryPointOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType RecoveryPointType { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RecoveryPointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RecoveryPointType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType ApplicationConsistent { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType CrashConsistent { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class ReplicationExtensionModelCustomProperties + { + protected ReplicationExtensionModelCustomProperties() { } + } + public partial class ReplicationExtensionModelProperties + { + public ReplicationExtensionModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ReplicationVaultType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ReplicationVaultType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType DisasterRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType Migrate { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResynchronizationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResynchronizationState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState ResynchronizationCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState ResynchronizationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState ResynchronizationInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class StorageContainerProperties + { + public StorageContainerProperties(string name, string clusterSharedVolumePath) { } + public string ClusterSharedVolumePath { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + } + public partial class TaskModel + { + internal TaskModel() { } + public System.Collections.Generic.IReadOnlyList ChildrenWorkflows { get { throw null; } } + public string CustomInstanceType { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState? State { get { throw null; } } + public string TaskName { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TaskState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Skipped { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TestFailoverCleanupWorkflowModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties + { + internal TestFailoverCleanupWorkflowModelCustomProperties() { } + public string Comments { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TestFailoverState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TestFailoverState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCleanupCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCleanupInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TestFailoverWorkflowModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties + { + internal TestFailoverWorkflowModelCustomProperties() { } + public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + } + public partial class VaultModelPatch : Azure.ResourceManager.Models.ResourceData + { + public VaultModelPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class VaultModelProperties + { + public VaultModelProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public string ServiceResourceId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType? VaultType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VmNicSelection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VmNicSelection(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection NotSelected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByDefault { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByUser { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByUserOverride { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection right) { throw null; } + public override string ToString() { throw null; } + } + public partial class VMwareDraModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties + { + public VMwareDraModelCustomProperties(string biosId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel marsAuthenticationIdentity) { } + public string BiosId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel MarsAuthenticationIdentity { get { throw null; } set { } } + } + public partial class VMwareMigrateFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties + { + public VMwareMigrateFabricModelCustomProperties(string vmwareSiteId, string migrationSolutionId) { } + public string MigrationSolutionId { get { throw null; } set { } } + public string VmwareSiteId { get { throw null; } set { } } + } + public partial class VMwareToAzStackHCIDiskInput + { + public VMwareToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public string DiskFileFormat { get { throw null; } set { } } + public string DiskId { get { throw null; } set { } } + public long DiskSizeGB { get { throw null; } set { } } + public bool? IsDynamic { get { throw null; } set { } } + public bool IsOSDisk { get { throw null; } set { } } + public string StorageContainerId { get { throw null; } set { } } + } + public partial class VMwareToAzStackHCINicInput + { + public VMwareToAzStackHCINicInput(string nicId, string label, string targetNetworkId, string testNetworkId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public string Label { get { throw null; } set { } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectionTypeForFailover { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + } + public partial class VMwareToAzStackHCIPlannedFailoverModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties + { + public VMwareToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { } + public bool ShutdownSourceVm { get { throw null; } set { } } + } + public partial class VMwareToAzStackHCIPolicyModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties + { + public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } + public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } + public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } + } + public partial class VMwareToAzStackHCIProtectedDiskProperties + { + internal VMwareToAzStackHCIProtectedDiskProperties() { } + public long? CapacityInBytes { get { throw null; } } + public string DiskType { get { throw null; } } + public bool? IsDynamic { get { throw null; } } + public bool? IsOSDisk { get { throw null; } } + public string MigrateDiskName { get { throw null; } } + public string SeedDiskName { get { throw null; } } + public string SourceDiskId { get { throw null; } } + public string SourceDiskName { get { throw null; } } + public string StorageContainerId { get { throw null; } } + public string StorageContainerLocalPath { get { throw null; } } + public string TestMigrateDiskName { get { throw null; } } + } + public partial class VMwareToAzStackHCIProtectedItemModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties + { + public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string storageContainerId, string targetResourceGroupId, string customLocationRegion, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, string hyperVGeneration, string fabricDiscoveryMachineId, string runAsAccountId, string sourceDraName, string targetDraName) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } + public string CustomLocationRegion { get { throw null; } set { } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public string FabricDiscoveryMachineId { get { throw null; } set { } } + public string FailoverRecoveryPointId { get { throw null; } } + public string FirmwareType { get { throw null; } } + public string HyperVGeneration { get { throw null; } set { } } + public int? InitialReplicationProgressPercentage { get { throw null; } } + public bool? IsDynamicRam { get { throw null; } set { } } + public string LastRecoveryPointId { get { throw null; } } + public System.DateTimeOffset? LastRecoveryPointReceived { get { throw null; } } + public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } + public int? MigrationProgressPercentage { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSName { get { throw null; } } + public string OSType { get { throw null; } } + public bool? PerformAutoResync { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public int? ResumeProgressPercentage { get { throw null; } } + public long? ResumeRetryCount { get { throw null; } } + public int? ResyncProgressPercentage { get { throw null; } } + public bool? ResyncRequired { get { throw null; } } + public long? ResyncRetryCount { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? ResyncState { get { throw null; } } + public string RunAsAccountId { get { throw null; } set { } } + public string SourceApplianceName { get { throw null; } } + public int? SourceCpuCores { get { throw null; } } + public string SourceDraName { get { throw null; } set { } } + public double? SourceMemoryInMegaBytes { get { throw null; } } + public string SourceVmName { get { throw null; } } + public string StorageContainerId { get { throw null; } set { } } + public string TargetApplianceName { get { throw null; } } + public string TargetArcClusterCustomLocationId { get { throw null; } set { } } + public string TargetAzStackHciClusterName { get { throw null; } } + public int? TargetCpuCores { get { throw null; } set { } } + public string TargetDraName { get { throw null; } set { } } + public string TargetHciClusterId { get { throw null; } set { } } + public string TargetLocation { get { throw null; } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TargetResourceGroupId { get { throw null; } set { } } + public string TargetVmBiosId { get { throw null; } } + public string TargetVmName { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + } + public partial class VMwareToAzStackHCIProtectedNicProperties + { + internal VMwareToAzStackHCIProtectedNicProperties() { } + public bool? IsPrimaryNic { get { throw null; } } + public string Label { get { throw null; } } + public string MacAddress { get { throw null; } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? SelectionTypeForFailover { get { throw null; } } + public string TargetNetworkId { get { throw null; } } + public string TestNetworkId { get { throw null; } } + } + public partial class VMwareToAzStackHCIReplicationExtensionModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties + { + public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId, string azStackHciFabricArmId) { } + public System.Uri AsrServiceUri { get { throw null; } } + public string AzStackHciFabricArmId { get { throw null; } set { } } + public string AzStackHciSiteId { get { throw null; } } + public System.Uri GatewayServiceUri { get { throw null; } } + public System.Uri RcmServiceUri { get { throw null; } } + public string ResourceGroup { get { throw null; } } + public string ResourceLocation { get { throw null; } } + public string SourceGatewayServiceId { get { throw null; } } + public string SourceStorageContainerName { get { throw null; } } + public string StorageAccountId { get { throw null; } set { } } + public string StorageAccountSasSecretName { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public string TargetGatewayServiceId { get { throw null; } } + public string TargetStorageContainerName { get { throw null; } } + public string VmwareFabricArmId { get { throw null; } set { } } + public string VmwareSiteId { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VMwareToAzureMigrateResyncState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VMwareToAzureMigrateResyncState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState PreparedForResynchronization { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState StartedResynchronization { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class WorkflowModelCustomProperties + { + protected WorkflowModelCustomProperties() { } + public System.Collections.Generic.IReadOnlyDictionary AffectedObjectDetails { get { throw null; } } + } + public partial class WorkflowModelProperties + { + internal WorkflowModelProperties() { } + public string ActivityId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AllowedActions { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties CustomProperties { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ObjectId { get { throw null; } } + public string ObjectInternalId { get { throw null; } } + public string ObjectInternalName { get { throw null; } } + public string ObjectName { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? ObjectType { get { throw null; } } + public string ReplicationProviderId { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState? State { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tasks { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowObjectType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowObjectType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType AvsDiskPool { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType Dra { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType Fabric { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType Policy { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType ProtectedItem { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType RecoveryPlan { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType ReplicationExtension { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType Vault { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Cancelling { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState CompletedWithErrors { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState CompletedWithInformation { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState CompletedWithWarnings { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState right) { throw null; } + public override string ToString() { throw null; } + } +} From 4992ef2ad32951aadc249d2458d72b1736c043e3 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Mon, 28 Aug 2023 23:10:16 -0700 Subject: [PATCH 3/6] Reverted back until swagger fixed --- ...anager.RecoveryServicesDataReplication.sln | 80 +++++++++---------- .../src/autorest.md | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln index 94c36cd5ffbd..387760608181 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln @@ -3,18 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30309.148 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{6AF6D140-2565-4017-9028-35EA2A1EF975}") = "Azure.ResourceManager.RecoveryServicesDataReplication", "src\Azure.ResourceManager.RecoveryServicesDataReplication.csproj", "{E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}" +Project("{046A2A51-F66F-49DD-83A1-96E02A95B305}") = "Azure.ResourceManager.RecoveryServicesDataReplication", "src\Azure.ResourceManager.RecoveryServicesDataReplication.csproj", "{587570EB-E5C5-4EBE-B38B-6F4E896C96F7}" EndProject -Project("{6AF6D140-2565-4017-9028-35EA2A1EF975}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Tests", "tests\Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj", "{8E18E0C1-6736-4F6B-A42C-D8F5E780F802}" +Project("{046A2A51-F66F-49DD-83A1-96E02A95B305}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Tests", "tests\Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj", "{FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}" EndProject -Project("{6AF6D140-2565-4017-9028-35EA2A1EF975}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Samples", "samples\Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj", "{CA06473B-F372-4D6D-B876-19491DE88DA1}" +Project("{046A2A51-F66F-49DD-83A1-96E02A95B305}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Samples", "samples\Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj", "{0429344B-5071-4E16-8FFA-DF84D1E4663E}" EndProject Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {D5B52D32-C0C0-4902-9DCD-B6485EEE5227} + SolutionGuid = {998F958D-320F-420A-B882-6071D3E36D98} EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -25,41 +25,41 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x64.ActiveCfg = Debug|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x64.Build.0 = Debug|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x86.ActiveCfg = Debug|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Debug|x86.Build.0 = Debug|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|Any CPU.Build.0 = Release|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x64.ActiveCfg = Release|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x64.Build.0 = Release|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x86.ActiveCfg = Release|Any CPU - {E5BB0FAB-BC6D-45D0-AF28-CB1CF971A031}.Release|x86.Build.0 = Release|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x64.ActiveCfg = Debug|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x64.Build.0 = Debug|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x86.ActiveCfg = Debug|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Debug|x86.Build.0 = Debug|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|Any CPU.Build.0 = Release|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x64.ActiveCfg = Release|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x64.Build.0 = Release|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x86.ActiveCfg = Release|Any CPU - {8E18E0C1-6736-4F6B-A42C-D8F5E780F802}.Release|x86.Build.0 = Release|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x64.ActiveCfg = Debug|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x64.Build.0 = Debug|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x86.ActiveCfg = Debug|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Debug|x86.Build.0 = Debug|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|Any CPU.Build.0 = Release|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x64.ActiveCfg = Release|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x64.Build.0 = Release|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x86.ActiveCfg = Release|Any CPU - {CA06473B-F372-4D6D-B876-19491DE88DA1}.Release|x86.Build.0 = Release|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Debug|x64.ActiveCfg = Debug|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Debug|x64.Build.0 = Debug|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Debug|x86.ActiveCfg = Debug|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Debug|x86.Build.0 = Debug|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Release|Any CPU.Build.0 = Release|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Release|x64.ActiveCfg = Release|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Release|x64.Build.0 = Release|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Release|x86.ActiveCfg = Release|Any CPU + {587570EB-E5C5-4EBE-B38B-6F4E896C96F7}.Release|x86.Build.0 = Release|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Debug|x64.ActiveCfg = Debug|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Debug|x64.Build.0 = Debug|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Debug|x86.ActiveCfg = Debug|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Debug|x86.Build.0 = Debug|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Release|Any CPU.Build.0 = Release|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Release|x64.ActiveCfg = Release|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Release|x64.Build.0 = Release|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Release|x86.ActiveCfg = Release|Any CPU + {FA9B8A69-877B-4424-9FBC-CDDEB362A3ED}.Release|x86.Build.0 = Release|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Debug|x64.ActiveCfg = Debug|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Debug|x64.Build.0 = Debug|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Debug|x86.ActiveCfg = Debug|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Debug|x86.Build.0 = Debug|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Release|Any CPU.Build.0 = Release|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Release|x64.ActiveCfg = Release|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Release|x64.Build.0 = Release|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Release|x86.ActiveCfg = Release|Any CPU + {0429344B-5071-4E16-8FFA-DF84D1E4663E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md index a4acdf61cd56..f52355d7dcae 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: RecoveryServicesDataReplication namespace: Azure.ResourceManager.RecoveryServicesDataReplication -require: D:/forked-repos/openapihub/azure-rest-api-specs/specification/recoveryservicesdatareplication/resource-manager/readme.md +require: D:\forked-repos\openapihub\azure-rest-api-specs\specification\recoveryservicesdatareplication\resource-manager\readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true From c6464871dac351514bcebab0f433218d5151b919 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Tue, 29 Aug 2023 00:53:26 -0700 Subject: [PATCH 4/6] Regenerated after swagger update --- ...yServicesDataReplication.netstandard2.0.cs | 42 +++---- ...veryServicesDataReplicationModelFactory.cs | 26 ++--- .../src/Generated/DraModelCollection.cs | 88 +++++++-------- .../src/Generated/DraModelResource.cs | 32 +++--- .../EmailConfigurationModelCollection.cs | 12 +- .../src/Generated/EventModelCollection.cs | 8 +- ...coveryServicesDataReplicationExtensions.cs | 8 +- .../src/Generated/FabricModelCollection.cs | 12 +- .../src/Generated/FabricModelResource.cs | 24 ++-- ...IDraModelCustomProperties.Serialization.cs | 41 ------- .../AzStackHCIDraModelCustomProperties.cs | 26 ----- ...bricModelCustomProperties.Serialization.cs | 6 +- .../AzStackHCIFabricModelCustomProperties.cs | 6 +- .../DraModelCustomProperties.Serialization.cs | 4 +- .../Models/DraModelCustomProperties.cs | 6 +- .../Generated/Models/DraModelProperties.cs | 6 +- .../Models/EventModelCustomProperties.cs | 4 +- ...bricModelCustomProperties.Serialization.cs | 2 +- .../Models/FabricModelCustomProperties.cs | 4 +- .../src/Generated/Models/FabricType.cs | 66 ----------- ...flowModelCustomProperties.Serialization.cs | 4 +- .../FailoverWorkflowModelCustomProperties.cs | 6 +- ...eDraModelCustomProperties.Serialization.cs | 41 ------- .../HyperVMigrateDraModelCustomProperties.cs | 26 ----- ...bricModelCustomProperties.Serialization.cs | 6 +- ...yperVMigrateFabricModelCustomProperties.cs | 6 +- ...ventModelCustomProperties.Serialization.cs | 4 +- ...VToAzStackHCIEventModelCustomProperties.cs | 6 +- ...licyModelCustomProperties.Serialization.cs | 6 +- ...ToAzStackHCIPolicyModelCustomProperties.cs | 6 +- ...ItemModelCustomProperties.Serialization.cs | 6 +- ...ckHCIProtectedItemModelCustomProperties.cs | 6 +- ...ointModelCustomProperties.Serialization.cs | 4 +- ...ckHCIRecoveryPointModelCustomProperties.cs | 6 +- ...sionModelCustomProperties.Serialization.cs | 6 +- ...plicationExtensionModelCustomProperties.cs | 6 +- ...licyModelCustomProperties.Serialization.cs | 2 +- .../Models/PolicyModelCustomProperties.cs | 4 +- ...ItemModelCustomProperties.Serialization.cs | 2 +- .../ProtectedItemModelCustomProperties.cs | 4 +- .../RecoveryPointModelCustomProperties.cs | 4 +- ...sionModelCustomProperties.Serialization.cs | 2 +- ...plicationExtensionModelCustomProperties.cs | 4 +- .../src/Generated/Models/ReplicationType.cs | 63 ----------- ...flowModelCustomProperties.Serialization.cs | 4 +- ...verCleanupWorkflowModelCustomProperties.cs | 6 +- ...flowModelCustomProperties.Serialization.cs | 4 +- ...stFailoverWorkflowModelCustomProperties.cs | 6 +- ...nDraModelCustomProperties.Serialization.cs | 6 +- .../Models/UnknownDraModelCustomProperties.cs | 4 +- ...ventModelCustomProperties.Serialization.cs | 4 +- .../UnknownEventModelCustomProperties.cs | 4 +- ...bricModelCustomProperties.Serialization.cs | 6 +- .../UnknownFabricModelCustomProperties.cs | 4 +- ...licyModelCustomProperties.Serialization.cs | 6 +- .../UnknownPolicyModelCustomProperties.cs | 4 +- ...ItemModelCustomProperties.Serialization.cs | 6 +- ...knownProtectedItemModelCustomProperties.cs | 4 +- ...ointModelCustomProperties.Serialization.cs | 4 +- ...knownRecoveryPointModelCustomProperties.cs | 4 +- ...sionModelCustomProperties.Serialization.cs | 6 +- ...plicationExtensionModelCustomProperties.cs | 4 +- ...flowModelCustomProperties.Serialization.cs | 4 +- .../UnknownWorkflowModelCustomProperties.cs | 4 +- ...eDraModelCustomProperties.Serialization.cs | 6 +- .../Models/VMwareDraModelCustomProperties.cs | 6 +- ...bricModelCustomProperties.Serialization.cs | 6 +- ...MwareMigrateFabricModelCustomProperties.cs | 6 +- ...licyModelCustomProperties.Serialization.cs | 6 +- ...ToAzStackHCIPolicyModelCustomProperties.cs | 6 +- ...ItemModelCustomProperties.Serialization.cs | 6 +- ...ckHCIProtectedItemModelCustomProperties.cs | 6 +- ...sionModelCustomProperties.Serialization.cs | 6 +- ...plicationExtensionModelCustomProperties.cs | 6 +- .../Generated/Models/WorkflowDetailsType.cs | 57 ---------- .../Models/WorkflowModelCustomProperties.cs | 4 +- .../src/Generated/PolicyModelCollection.cs | 12 +- .../Generated/ProtectedItemModelCollection.cs | 12 +- .../Generated/ProtectedItemModelResource.cs | 4 +- .../Generated/RecoveryPointModelCollection.cs | 8 +- .../ReplicationExtensionModelCollection.cs | 12 +- .../DraOperationStatusRestOperations.cs | 32 +++--- .../RestOperations/DraRestOperations.cs | 104 +++++++++--------- .../EmailConfigurationRestOperations.cs | 24 ++-- .../RestOperations/EventRestOperations.cs | 16 +-- .../FabricOperationsStatusRestOperations.cs | 4 +- .../RestOperations/FabricRestOperations.cs | 16 +-- .../PolicyOperationStatusRestOperations.cs | 8 +- .../RestOperations/PolicyRestOperations.cs | 32 +++--- ...tectedItemOperationStatusRestOperations.cs | 8 +- .../ProtectedItemRestOperations.cs | 40 +++---- .../RecoveryPointsRestOperations.cs | 28 ++--- ...nExtensionOperationStatusRestOperations.cs | 8 +- .../ReplicationExtensionRestOperations.cs | 32 +++--- .../VaultOperationStatusRestOperations.cs | 4 +- .../RestOperations/VaultRestOperations.cs | 16 +-- .../WorkflowOperationStatusRestOperations.cs | 32 +++--- .../RestOperations/WorkflowRestOperations.cs | 40 +++---- .../src/Generated/VaultModelCollection.cs | 12 +- .../src/Generated/VaultModelResource.cs | 44 ++++---- .../src/Generated/WorkflowModelCollection.cs | 56 +++++----- .../src/Generated/WorkflowModelResource.cs | 12 +- 102 files changed, 577 insertions(+), 907 deletions(-) delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs index b9bfb8e36c85..98a6be8a2218 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs @@ -3,14 +3,14 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication public partial class DraModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DraModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string draName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string draName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } @@ -29,7 +29,7 @@ protected DraModelResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string draName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -144,8 +144,8 @@ protected FabricModelResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDraModel(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDraModelAsync(string draName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDraModel(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDraModelAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DraModelCollection GetDraModels() { throw null; } public virtual Azure.Response GetFabricOperationsStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetFabricOperationsStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -396,8 +396,8 @@ protected VaultModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelCollection GetReplicationExtensionModels() { throw null; } public virtual Azure.Response GetVaultOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetVaultOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkflowModel(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkflowModelAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowModel(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowModelAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelCollection GetWorkflowModels() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -409,12 +409,12 @@ protected VaultModelResource() { } public partial class WorkflowModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected WorkflowModelCollection() { } - public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAll(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } @@ -431,7 +431,7 @@ public partial class WorkflowModelResource : Azure.ResourceManager.ArmResource protected WorkflowModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string workflowName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetWorkflowOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -488,7 +488,7 @@ public static partial class ArmRecoveryServicesDataReplicationModelFactory public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedItemModelCustomProperties VMwareToAzStackHCIProtectedItemModelCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string storageContainerId = null, string targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string osType = null, string osName = null, string firmwareType = null, string fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceived = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), long? resyncRetryCount = default(long?), bool? resyncRequired = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? resyncState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState?), bool? performAutoResync = default(bool?), long? resumeRetryCount = default(long?), System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = default(bool?), string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIReplicationExtensionModelCustomProperties VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId = null, string vmwareSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = "Unknown", System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = null, System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData WorkflowModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties properties = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties WorkflowModelProperties(string displayName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? objectType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType?), string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, System.Collections.Generic.IEnumerable allowedActions = null, string activityId = null, System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties customProperties = null) { throw null; } } @@ -500,10 +500,6 @@ public AzStackHCIClusterProperties(string clusterName, string resourceName, stri public string StorageAccountName { get { throw null; } set { } } public System.Collections.Generic.IList StorageContainers { get { throw null; } } } - public partial class AzStackHCIDraModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties - { - public AzStackHCIDraModelCustomProperties() { } - } public partial class AzStackHCIFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties { public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties cluster, string migrationSolutionId) { } @@ -669,10 +665,6 @@ internal HealthErrorModel() { } public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class HyperVMigrateDraModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties - { - public HyperVMigrateDraModelCustomProperties() { } - } public partial class HyperVMigrateFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties { public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migrationSolutionId) { } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs index ed3adf9fe882..13249567bb21 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs @@ -46,7 +46,7 @@ public static DraModelData DraModelData(ResourceIdentifier id = null, string nam /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include . /// /// A new instance for mocking. public static DraModelProperties DraModelProperties(string correlationId = null, string machineId = null, string machineName = null, IdentityModel authenticationIdentity = null, IdentityModel resourceAccessIdentity = null, bool? isResponsive = null, DateTimeOffset? lastHeartbeat = null, string versionNumber = null, ProvisioningState? provisioningState = null, IEnumerable healthErrors = null, DraModelCustomProperties customProperties = null) @@ -540,7 +540,7 @@ public static ErrorModel ErrorModel(string code = null, string errorModelType = /// Gets or sets the instance type. /// Gets or sets any custom properties of the affected object. /// A new instance for mocking. - public static WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = "Unknown", IReadOnlyDictionary affectedObjectDetails = null) + public static WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = null, IReadOnlyDictionary affectedObjectDetails = null) { affectedObjectDetails ??= new Dictionary(); @@ -560,7 +560,7 @@ public static AzStackHCIFabricModelCustomProperties AzStackHCIFabricModelCustomP { applianceName ??= new List(); - return new AzStackHCIFabricModelCustomProperties(FabricType.AzStackHCI, azStackHciSiteId, applianceName?.ToList(), cluster, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); + return new AzStackHCIFabricModelCustomProperties("AzStackHCI", azStackHciSiteId, applianceName?.ToList(), cluster, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); } /// Initializes a new instance of FailoverProtectedItemProperties. @@ -586,7 +586,7 @@ public static FailoverWorkflowModelCustomProperties FailoverWorkflowModelCustomP affectedObjectDetails ??= new Dictionary(); protectedItemDetails ??= new List(); - return new FailoverWorkflowModelCustomProperties(WorkflowDetailsType.FailoverWorkflowDetails, affectedObjectDetails, protectedItemDetails?.ToList()); + return new FailoverWorkflowModelCustomProperties("FailoverWorkflowDetails", affectedObjectDetails, protectedItemDetails?.ToList()); } /// Initializes a new instance of HyperVMigrateFabricModelCustomProperties. @@ -598,7 +598,7 @@ public static FailoverWorkflowModelCustomProperties FailoverWorkflowModelCustomP /// A new instance for mocking. public static HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelCustomProperties(string hyperVSiteId = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, Uri migrationHubUri = null) { - return new HyperVMigrateFabricModelCustomProperties(FabricType.HyperVMigrate, hyperVSiteId, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); + return new HyperVMigrateFabricModelCustomProperties("HyperVMigrate", hyperVSiteId, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); } /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. @@ -610,7 +610,7 @@ public static HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelC /// A new instance for mocking. public static HyperVToAzStackHCIEventModelCustomProperties HyperVToAzStackHCIEventModelCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { - return new HyperVToAzStackHCIEventModelCustomProperties(ReplicationType.HyperVToAzStackHCI, eventSourceFriendlyName, protectedItemFriendlyName, sourceApplianceName, targetApplianceName, serverType); + return new HyperVToAzStackHCIEventModelCustomProperties("HyperVToAzStackHCI", eventSourceFriendlyName, protectedItemFriendlyName, sourceApplianceName, targetApplianceName, serverType); } /// Initializes a new instance of HyperVToAzStackHCINicInput. @@ -700,7 +700,7 @@ public static HyperVToAzStackHCIProtectedItemModelCustomProperties HyperVToAzSta protectedDisks ??= new List(); protectedNics ??= new List(); - return new HyperVToAzStackHCIProtectedItemModelCustomProperties(ReplicationType.HyperVToAzStackHCI, activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, fabricDiscoveryMachineId, disksToInclude?.ToList(), nicsToInclude?.ToList(), sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, targetVmName, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, osType, osName, firmwareType, targetLocation, customLocationRegion, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, resyncProgressPercentage, protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, lastReplicationUpdateOn); + return new HyperVToAzStackHCIProtectedItemModelCustomProperties("HyperVToAzStackHCI", activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, fabricDiscoveryMachineId, disksToInclude?.ToList(), nicsToInclude?.ToList(), sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, targetVmName, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, osType, osName, firmwareType, targetLocation, customLocationRegion, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, resyncProgressPercentage, protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, lastReplicationUpdateOn); } /// Initializes a new instance of HyperVToAzStackHCIProtectedNicProperties. @@ -723,7 +723,7 @@ public static HyperVToAzStackHCIRecoveryPointModelCustomProperties HyperVToAzSta { diskIds ??= new List(); - return new HyperVToAzStackHCIRecoveryPointModelCustomProperties(ReplicationType.HyperVToAzStackHCI, diskIds?.ToList()); + return new HyperVToAzStackHCIRecoveryPointModelCustomProperties("HyperVToAzStackHCI", diskIds?.ToList()); } /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. @@ -746,7 +746,7 @@ public static HyperVToAzStackHCIRecoveryPointModelCustomProperties HyperVToAzSta /// A new instance for mocking. public static HyperVToAzStackHCIReplicationExtensionModelCustomProperties HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId = null, string hyperVSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { - return new HyperVToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType.HyperVToAzStackHCI, hyperVFabricArmId, hyperVSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); + return new HyperVToAzStackHCIReplicationExtensionModelCustomProperties("HyperVToAzStackHCI", hyperVFabricArmId, hyperVSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); } /// Initializes a new instance of TestFailoverCleanupWorkflowModelCustomProperties. @@ -757,7 +757,7 @@ public static TestFailoverCleanupWorkflowModelCustomProperties TestFailoverClean { affectedObjectDetails ??= new Dictionary(); - return new TestFailoverCleanupWorkflowModelCustomProperties(WorkflowDetailsType.TestFailoverCleanupWorkflowDetails, affectedObjectDetails, comments); + return new TestFailoverCleanupWorkflowModelCustomProperties("TestFailoverCleanupWorkflowDetails", affectedObjectDetails, comments); } /// Initializes a new instance of TestFailoverWorkflowModelCustomProperties. @@ -769,7 +769,7 @@ public static TestFailoverWorkflowModelCustomProperties TestFailoverWorkflowMode affectedObjectDetails ??= new Dictionary(); protectedItemDetails ??= new List(); - return new TestFailoverWorkflowModelCustomProperties(WorkflowDetailsType.TestFailoverWorkflowDetails, affectedObjectDetails, protectedItemDetails?.ToList()); + return new TestFailoverWorkflowModelCustomProperties("TestFailoverWorkflowDetails", affectedObjectDetails, protectedItemDetails?.ToList()); } /// Initializes a new instance of VMwareToAzStackHCINicInput. @@ -867,7 +867,7 @@ public static VMwareToAzStackHCIProtectedItemModelCustomProperties VMwareToAzSta protectedDisks ??= new List(); protectedNics ??= new List(); - return new VMwareToAzStackHCIProtectedItemModelCustomProperties(ReplicationType.VMwareToAzStackHCI, activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, storageContainerId, targetResourceGroupId, targetLocation, customLocationRegion, disksToInclude?.ToList(), nicsToInclude?.ToList(), protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, targetVmName, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, osType, osName, firmwareType, fabricDiscoveryMachineId, sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, migrationProgressPercentage, resumeProgressPercentage, resyncProgressPercentage, resyncRetryCount, resyncRequired, resyncState, performAutoResync, resumeRetryCount, lastReplicationUpdateOn); + return new VMwareToAzStackHCIProtectedItemModelCustomProperties("VMwareToAzStackHCI", activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, storageContainerId, targetResourceGroupId, targetLocation, customLocationRegion, disksToInclude?.ToList(), nicsToInclude?.ToList(), protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, targetVmName, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, osType, osName, firmwareType, fabricDiscoveryMachineId, sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, migrationProgressPercentage, resumeProgressPercentage, resyncProgressPercentage, resyncRetryCount, resyncRequired, resyncState, performAutoResync, resumeRetryCount, lastReplicationUpdateOn); } /// Initializes a new instance of VMwareToAzStackHCIProtectedNicProperties. @@ -905,7 +905,7 @@ public static VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtect /// A new instance for mocking. public static VMwareToAzStackHCIReplicationExtensionModelCustomProperties VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId = null, string vmwareSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { - return new VMwareToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType.VMwareToAzStackHCI, vmwareFabricArmId, vmwareSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); + return new VMwareToAzStackHCIReplicationExtensionModelCustomProperties("VMwareToAzStackHCI", vmwareFabricArmId, vmwareSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs index 8bacd0130e23..a3a61c57c5db 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs @@ -57,7 +57,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -66,22 +66,22 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Dra name. + /// The fabric agent (Dra) name. /// Dra model. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string draName, DraModelData data, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNull(data, nameof(data)); using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data).Request, response, OperationFinalStateVia.Location); + var response = await _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -98,7 +98,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -107,22 +107,22 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Dra name. + /// The fabric agent (Dra) name. /// Dra model. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string draName, DraModelData data, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNull(data, nameof(data)); using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.CreateOrUpdate"); scope.Start(); try { - var response = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, data).Request, response, OperationFinalStateVia.Location); + var response = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -139,7 +139,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -147,19 +147,19 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// - /// Dra name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string draName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fabricAgentName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Get"); scope.Start(); try { - var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken).ConfigureAwait(false); + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); @@ -176,7 +176,7 @@ public virtual async Task> GetAsync(string draName, C /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -184,19 +184,19 @@ public virtual async Task> GetAsync(string draName, C /// /// /// - /// Dra name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string draName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fabricAgentName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Get"); scope.Start(); try { - var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken); + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); @@ -257,7 +257,7 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -265,19 +265,19 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// - /// Dra name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string draName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fabricAgentName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Exists"); scope.Start(); try { - var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -292,7 +292,7 @@ public virtual async Task> ExistsAsync(string draName, Cancellati /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -300,19 +300,19 @@ public virtual async Task> ExistsAsync(string draName, Cancellati /// /// /// - /// Dra name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string draName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fabricAgentName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Exists"); scope.Start(); try { - var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, draName, cancellationToken: cancellationToken); + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs index 717802ce7ebf..aa445d305b56 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs @@ -27,9 +27,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication public partial class DraModelResource : ArmResource { /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string draName) + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}"; return new ResourceIdentifier(resourceId); } @@ -97,7 +97,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -129,7 +129,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -161,7 +161,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -195,7 +195,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -229,7 +229,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -267,7 +267,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -305,7 +305,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DraMod /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName}/operations/{operationId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}/operations/{operationId} /// /// /// Operation Id @@ -340,7 +340,7 @@ public virtual async Task> GetDraOperationStatuAsync(s /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName}/operations/{operationId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}/operations/{operationId} /// /// /// Operation Id @@ -375,7 +375,7 @@ public virtual Response GetDraOperationStatu(string operationId /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -424,7 +424,7 @@ public virtual async Task> AddTagAsync(string key, st /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -473,7 +473,7 @@ public virtual Response AddTag(string key, string value, Cance /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -521,7 +521,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -569,7 +569,7 @@ public virtual Response SetTags(IDictionary ta /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -616,7 +616,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs index c215e3c6e335..8eea68ee3854 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Email configuration name. + /// The email configuration name. /// EmailConfiguration model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> CreateO /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Email configuration name. + /// The email configuration name. /// EmailConfiguration model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// - /// Email configuration name. + /// The email configuration name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(st /// /// /// - /// Email configuration name. + /// The email configuration name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// - /// Email configuration name. + /// The email configuration name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string emailConfigurationN /// /// /// - /// Email configuration name. + /// The email configuration name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs index b0c97b5c3472..27fbd9a1cd06 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Event name. + /// The event name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -102,7 +102,7 @@ public virtual async Task> GetAsync(string eventNam /// /// /// - /// Event name. + /// The event name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -187,7 +187,7 @@ public virtual Pageable GetAll(string filter = null, string /// /// /// - /// Event name. + /// The event name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -222,7 +222,7 @@ public virtual async Task> ExistsAsync(string eventName, Cancella /// /// /// - /// Event name. + /// The event name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs index ea738c2d5eea..9313199f6bea 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs @@ -262,7 +262,7 @@ public static FabricModelCollection GetFabricModels(this ResourceGroupResource r /// /// /// The instance the method will execute against. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -286,7 +286,7 @@ public static async Task> GetFabricModelAsync(this /// /// /// The instance the method will execute against. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -318,7 +318,7 @@ public static VaultModelCollection GetVaultModels(this ResourceGroupResource res /// /// /// The instance the method will execute against. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -342,7 +342,7 @@ public static async Task> GetVaultModelAsync(this R /// /// /// The instance the method will execute against. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs index ccd5e3ce60d3..67604405f278 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Fabric Name. + /// The fabric name. /// Fabric properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -108,7 +108,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Fabric Name. + /// The fabric name. /// Fabric properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -148,7 +148,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -185,7 +185,7 @@ public virtual async Task> GetAsync(string fabricN /// /// /// - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -268,7 +268,7 @@ public virtual Pageable GetAll(string continuationToken = n /// /// /// - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -303,7 +303,7 @@ public virtual async Task> ExistsAsync(string fabricName, Cancell /// /// /// - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs index e64cdef1b4c7..3dd3162bc2a2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs @@ -105,7 +105,7 @@ public virtual DraModelCollection GetDraModels() /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -113,14 +113,14 @@ public virtual DraModelCollection GetDraModels() /// /// /// - /// Dra name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetDraModelAsync(string draName, CancellationToken cancellationToken = default) + public virtual async Task> GetDraModelAsync(string fabricAgentName, CancellationToken cancellationToken = default) { - return await GetDraModels().GetAsync(draName, cancellationToken).ConfigureAwait(false); + return await GetDraModels().GetAsync(fabricAgentName, cancellationToken).ConfigureAwait(false); } /// @@ -128,7 +128,7 @@ public virtual async Task> GetDraModelAsync(string dr /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{draName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} /// /// /// Operation Id @@ -136,14 +136,14 @@ public virtual async Task> GetDraModelAsync(string dr /// /// /// - /// Dra name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetDraModel(string draName, CancellationToken cancellationToken = default) + public virtual Response GetDraModel(string fabricAgentName, CancellationToken cancellationToken = default) { - return GetDraModels().Get(draName, cancellationToken); + return GetDraModels().Get(fabricAgentName, cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs deleted file mode 100644 index eaa9eae1d65e..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - public partial class AzStackHCIDraModelCustomProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); - writer.WriteEndObject(); - } - - internal static AzStackHCIDraModelCustomProperties DeserializeAzStackHCIDraModelCustomProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - FabricType instanceType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("instanceType"u8)) - { - instanceType = new FabricType(property.Value.GetString()); - continue; - } - } - return new AzStackHCIDraModelCustomProperties(instanceType); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs deleted file mode 100644 index 070575689bcc..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIDraModelCustomProperties.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// AzStackHCI DRA model custom properties. - public partial class AzStackHCIDraModelCustomProperties : DraModelCustomProperties - { - /// Initializes a new instance of AzStackHCIDraModelCustomProperties. - public AzStackHCIDraModelCustomProperties() - { - InstanceType = FabricType.AzStackHCI; - } - - /// Initializes a new instance of AzStackHCIDraModelCustomProperties. - /// Gets or sets the instance type. - internal AzStackHCIDraModelCustomProperties(FabricType instanceType) : base(instanceType) - { - InstanceType = instanceType; - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs index 858ab71063b2..311d04060225 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs @@ -24,7 +24,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("migrationSolutionId"u8); writer.WriteStringValue(MigrationSolutionId); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -41,7 +41,7 @@ internal static AzStackHCIFabricModelCustomProperties DeserializeAzStackHCIFabri Optional fabricContainerId = default; string migrationSolutionId = default; Optional migrationHubUri = default; - FabricType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("azStackHciSiteId"u8)) @@ -94,7 +94,7 @@ internal static AzStackHCIFabricModelCustomProperties DeserializeAzStackHCIFabri } if (property.NameEquals("instanceType"u8)) { - instanceType = new FabricType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs index 4fcfee18ec43..edce1833bb82 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs @@ -29,7 +29,7 @@ public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, AzStackHCI ApplianceName = new ChangeTrackingList(); Cluster = cluster; MigrationSolutionId = migrationSolutionId; - InstanceType = FabricType.AzStackHCI; + InstanceType = "AzStackHCI"; } /// Initializes a new instance of AzStackHCIFabricModelCustomProperties. @@ -41,7 +41,7 @@ public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, AzStackHCI /// Gets or sets the fabric container Id. /// Gets or sets the Migration solution ARM Id. /// Gets or sets the migration hub Uri. - internal AzStackHCIFabricModelCustomProperties(FabricType instanceType, string azStackHciSiteId, IReadOnlyList applianceName, AzStackHCIClusterProperties cluster, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) + internal AzStackHCIFabricModelCustomProperties(string instanceType, string azStackHciSiteId, IReadOnlyList applianceName, AzStackHCIClusterProperties cluster, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) { AzStackHciSiteId = azStackHciSiteId; ApplianceName = applianceName; @@ -50,7 +50,7 @@ internal AzStackHCIFabricModelCustomProperties(FabricType instanceType, string a FabricContainerId = fabricContainerId; MigrationSolutionId = migrationSolutionId; MigrationHubUri = migrationHubUri; - InstanceType = instanceType; + InstanceType = instanceType ?? "AzStackHCI"; } /// Gets or sets the ARM Id of the AzStackHCI site. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs index 4b2d7b777f0a..0c03b5e6fb6c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -30,8 +30,6 @@ internal static DraModelCustomProperties DeserializeDraModelCustomProperties(Jso { switch (discriminator.GetString()) { - case "AzStackHCI": return AzStackHCIDraModelCustomProperties.DeserializeAzStackHCIDraModelCustomProperties(element); - case "HyperVMigrate": return HyperVMigrateDraModelCustomProperties.DeserializeHyperVMigrateDraModelCustomProperties(element); case "VMware": return VMwareDraModelCustomProperties.DeserializeVMwareDraModelCustomProperties(element); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs index 83cebbfcb192..faa16a662a63 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include . /// public abstract partial class DraModelCustomProperties { @@ -21,12 +21,12 @@ protected DraModelCustomProperties() /// Initializes a new instance of DraModelCustomProperties. /// Gets or sets the instance type. - internal DraModelCustomProperties(FabricType instanceType) + internal DraModelCustomProperties(string instanceType) { InstanceType = instanceType; } /// Gets or sets the instance type. - internal FabricType InstanceType { get; set; } + internal string InstanceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs index 5baab8b38b8d..40d7af78d3ed 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs @@ -22,7 +22,7 @@ public partial class DraModelProperties /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include . /// /// , , , or is null. public DraModelProperties(string machineId, string machineName, IdentityModel authenticationIdentity, IdentityModel resourceAccessIdentity, DraModelCustomProperties customProperties) @@ -55,7 +55,7 @@ public DraModelProperties(string machineId, string machineName, IdentityModel au /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include . /// internal DraModelProperties(string correlationId, string machineId, string machineName, IdentityModel authenticationIdentity, IdentityModel resourceAccessIdentity, bool? isResponsive, DateTimeOffset? lastHeartbeat, string versionNumber, ProvisioningState? provisioningState, IReadOnlyList healthErrors, DraModelCustomProperties customProperties) { @@ -95,7 +95,7 @@ internal DraModelProperties(string correlationId, string machineId, string machi /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include . /// public DraModelCustomProperties CustomProperties { get; set; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs index 1f9cb2f00e41..cffa059fb283 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs @@ -21,12 +21,12 @@ protected EventModelCustomProperties() /// Initializes a new instance of EventModelCustomProperties. /// Gets or sets the instance type. - internal EventModelCustomProperties(ReplicationType instanceType) + internal EventModelCustomProperties(string instanceType) { InstanceType = instanceType; } /// Gets or sets the instance type. - internal ReplicationType InstanceType { get; set; } + internal string InstanceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs index 7dc7aa352305..a01e29944ac5 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs index 3d27facd6bdb..b2ebe88811fb 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs @@ -21,12 +21,12 @@ protected FabricModelCustomProperties() /// Initializes a new instance of FabricModelCustomProperties. /// Gets or sets the instance type. - internal FabricModelCustomProperties(FabricType instanceType) + internal FabricModelCustomProperties(string instanceType) { InstanceType = instanceType; } /// Gets or sets the instance type. - internal FabricType InstanceType { get; set; } + internal string InstanceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs deleted file mode 100644 index b2a2bfd7ba42..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricType.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the instance type. - internal readonly partial struct FabricType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FabricType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string VMwareValue = "VMware"; - private const string AVSValue = "AVS"; - private const string AzureValue = "Azure"; - private const string AzStackHCIValue = "AzStackHCI"; - private const string HyperVMigrateValue = "HyperVMigrate"; - private const string VMwareMigrateValue = "VMwareMigrate"; - - /// None. - public static FabricType None { get; } = new FabricType(NoneValue); - /// VMware. - public static FabricType VMware { get; } = new FabricType(VMwareValue); - /// AVS. - public static FabricType AVS { get; } = new FabricType(AVSValue); - /// Azure. - public static FabricType Azure { get; } = new FabricType(AzureValue); - /// AzStackHCI. - public static FabricType AzStackHCI { get; } = new FabricType(AzStackHCIValue); - /// HyperVMigrate. - public static FabricType HyperVMigrate { get; } = new FabricType(HyperVMigrateValue); - /// VMwareMigrate. - public static FabricType VMwareMigrate { get; } = new FabricType(VMwareMigrateValue); - /// Determines if two values are the same. - public static bool operator ==(FabricType left, FabricType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FabricType left, FabricType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FabricType(string value) => new FabricType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FabricType other && Equals(other); - /// - public bool Equals(FabricType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs index 169548401957..5edfb49e62b6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.Serialization.cs @@ -20,7 +20,7 @@ internal static FailoverWorkflowModelCustomProperties DeserializeFailoverWorkflo return null; } Optional> protectedItemDetails = default; - WorkflowDetailsType instanceType = default; + string instanceType = default; Optional> affectedObjectDetails = default; foreach (var property in element.EnumerateObject()) { @@ -40,7 +40,7 @@ internal static FailoverWorkflowModelCustomProperties DeserializeFailoverWorkflo } if (property.NameEquals("instanceType"u8)) { - instanceType = new WorkflowDetailsType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } if (property.NameEquals("affectedObjectDetails"u8)) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs index 92f137fdbc26..94bfe5c4203b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverWorkflowModelCustomProperties.cs @@ -17,17 +17,17 @@ public partial class FailoverWorkflowModelCustomProperties : WorkflowModelCustom internal FailoverWorkflowModelCustomProperties() { ProtectedItemDetails = new ChangeTrackingList(); - InstanceType = WorkflowDetailsType.FailoverWorkflowDetails; + InstanceType = "FailoverWorkflowDetails"; } /// Initializes a new instance of FailoverWorkflowModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets any custom properties of the affected object. /// Gets or sets the failed over protected item details. - internal FailoverWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails) + internal FailoverWorkflowModelCustomProperties(string instanceType, IReadOnlyDictionary affectedObjectDetails, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails) { ProtectedItemDetails = protectedItemDetails; - InstanceType = instanceType; + InstanceType = instanceType ?? "FailoverWorkflowDetails"; } /// Gets or sets the failed over protected item details. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs deleted file mode 100644 index dbf2db622963..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - public partial class HyperVMigrateDraModelCustomProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); - writer.WriteEndObject(); - } - - internal static HyperVMigrateDraModelCustomProperties DeserializeHyperVMigrateDraModelCustomProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - FabricType instanceType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("instanceType"u8)) - { - instanceType = new FabricType(property.Value.GetString()); - continue; - } - } - return new HyperVMigrateDraModelCustomProperties(instanceType); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs deleted file mode 100644 index 3754d0d4a480..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateDraModelCustomProperties.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// HyperVMigrate DRA model custom properties. - public partial class HyperVMigrateDraModelCustomProperties : DraModelCustomProperties - { - /// Initializes a new instance of HyperVMigrateDraModelCustomProperties. - public HyperVMigrateDraModelCustomProperties() - { - InstanceType = FabricType.HyperVMigrate; - } - - /// Initializes a new instance of HyperVMigrateDraModelCustomProperties. - /// Gets or sets the instance type. - internal HyperVMigrateDraModelCustomProperties(FabricType instanceType) : base(instanceType) - { - InstanceType = instanceType; - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs index 734fcd51c5b3..a6db3d0d6b6c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs @@ -21,7 +21,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("migrationSolutionId"u8); writer.WriteStringValue(MigrationSolutionId); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -36,7 +36,7 @@ internal static HyperVMigrateFabricModelCustomProperties DeserializeHyperVMigrat Optional fabricContainerId = default; string migrationSolutionId = default; Optional migrationHubUri = default; - FabricType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("hyperVSiteId"u8)) @@ -70,7 +70,7 @@ internal static HyperVMigrateFabricModelCustomProperties DeserializeHyperVMigrat } if (property.NameEquals("instanceType"u8)) { - instanceType = new FabricType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs index b6a55ca361d5..e078da0aa16b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs @@ -24,7 +24,7 @@ public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migr HyperVSiteId = hyperVSiteId; MigrationSolutionId = migrationSolutionId; - InstanceType = FabricType.HyperVMigrate; + InstanceType = "HyperVMigrate"; } /// Initializes a new instance of HyperVMigrateFabricModelCustomProperties. @@ -34,14 +34,14 @@ public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migr /// Gets or sets the fabric container Id. /// Gets or sets the migration solution ARM Id. /// Gets or sets the migration hub Uri. - internal HyperVMigrateFabricModelCustomProperties(FabricType instanceType, string hyperVSiteId, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) + internal HyperVMigrateFabricModelCustomProperties(string instanceType, string hyperVSiteId, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) { HyperVSiteId = hyperVSiteId; FabricResourceId = fabricResourceId; FabricContainerId = fabricContainerId; MigrationSolutionId = migrationSolutionId; MigrationHubUri = migrationHubUri; - InstanceType = instanceType; + InstanceType = instanceType ?? "HyperVMigrate"; } /// Gets or sets the ARM Id of the HyperV site. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs index 5599bd656ec6..ecf8e697ec0a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs @@ -23,7 +23,7 @@ internal static HyperVToAzStackHCIEventModelCustomProperties DeserializeHyperVTo Optional sourceApplianceName = default; Optional targetApplianceName = default; Optional serverType = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("eventSourceFriendlyName"u8)) @@ -53,7 +53,7 @@ internal static HyperVToAzStackHCIEventModelCustomProperties DeserializeHyperVTo } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs index 4e07c14f113c..841803ad0b89 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs @@ -17,7 +17,7 @@ public partial class HyperVToAzStackHCIEventModelCustomProperties : EventModelCu /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. internal HyperVToAzStackHCIEventModelCustomProperties() { - InstanceType = ReplicationType.HyperVToAzStackHCI; + InstanceType = "HyperVToAzStackHCI"; } /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. @@ -27,14 +27,14 @@ internal HyperVToAzStackHCIEventModelCustomProperties() /// Gets or sets the source appliance name. /// Gets or sets the source target name. /// Gets or sets the server type. - internal HyperVToAzStackHCIEventModelCustomProperties(ReplicationType instanceType, string eventSourceFriendlyName, string protectedItemFriendlyName, string sourceApplianceName, string targetApplianceName, string serverType) : base(instanceType) + internal HyperVToAzStackHCIEventModelCustomProperties(string instanceType, string eventSourceFriendlyName, string protectedItemFriendlyName, string sourceApplianceName, string targetApplianceName, string serverType) : base(instanceType) { EventSourceFriendlyName = eventSourceFriendlyName; ProtectedItemFriendlyName = protectedItemFriendlyName; SourceApplianceName = sourceApplianceName; TargetApplianceName = targetApplianceName; ServerType = serverType; - InstanceType = instanceType; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; } /// Gets or sets the friendly name of the source which has raised this health event. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs index c374df26a63b..511a366ac0d2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs @@ -22,7 +22,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("appConsistentFrequencyInMinutes"u8); writer.WriteNumberValue(AppConsistentFrequencyInMinutes); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -35,7 +35,7 @@ internal static HyperVToAzStackHCIPolicyModelCustomProperties DeserializeHyperVT int recoveryPointHistoryInMinutes = default; int crashConsistentFrequencyInMinutes = default; int appConsistentFrequencyInMinutes = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("recoveryPointHistoryInMinutes"u8)) @@ -55,7 +55,7 @@ internal static HyperVToAzStackHCIPolicyModelCustomProperties DeserializeHyperVT } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs index 19283563729e..40f0edc7614f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs @@ -22,7 +22,7 @@ public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - InstanceType = ReplicationType.HyperVToAzStackHCI; + InstanceType = "HyperVToAzStackHCI"; } /// Initializes a new instance of HyperVToAzStackHCIPolicyModelCustomProperties. @@ -33,12 +33,12 @@ public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// Gets or sets the app consistent snapshot frequency (in minutes). - internal HyperVToAzStackHCIPolicyModelCustomProperties(ReplicationType instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) + internal HyperVToAzStackHCIPolicyModelCustomProperties(string instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) { RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - InstanceType = instanceType; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs index 04ba97809b46..a12b46c84bdf 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs @@ -87,7 +87,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("customLocationRegion"u8); writer.WriteStringValue(CustomLocationRegion); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -136,7 +136,7 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize Optional> protectedNics = default; Optional targetVmBiosId = default; Optional lastReplicationUpdateTime = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("activeLocation"u8)) @@ -408,7 +408,7 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs index de082c7d12de..772f6cd65948 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs @@ -58,7 +58,7 @@ public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus CustomLocationRegion = customLocationRegion; ProtectedDisks = new ChangeTrackingList(); ProtectedNics = new ChangeTrackingList(); - InstanceType = ReplicationType.HyperVToAzStackHCI; + InstanceType = "HyperVToAzStackHCI"; } /// Initializes a new instance of HyperVToAzStackHCIProtectedItemModelCustomProperties. @@ -108,7 +108,7 @@ public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus /// Gets or sets the VM NIC details. /// Gets or sets the BIOS Id of the target AzStackHCI VM. /// Gets or sets the latest timestamp that replication status is updated. - internal HyperVToAzStackHCIProtectedItemModelCustomProperties(ReplicationType instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string fabricDiscoveryMachineId, IList disksToInclude, IList nicsToInclude, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string targetVmName, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string osType, string osName, string firmwareType, string targetLocation, string customLocationRegion, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? resyncProgressPercentage, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) + internal HyperVToAzStackHCIProtectedItemModelCustomProperties(string instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string fabricDiscoveryMachineId, IList disksToInclude, IList nicsToInclude, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string targetVmName, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string osType, string osName, string firmwareType, string targetLocation, string customLocationRegion, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? resyncProgressPercentage, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) { ActiveLocation = activeLocation; TargetHciClusterId = targetHciClusterId; @@ -149,7 +149,7 @@ internal HyperVToAzStackHCIProtectedItemModelCustomProperties(ReplicationType in ProtectedNics = protectedNics; TargetVmBiosId = targetVmBiosId; LastReplicationUpdateOn = lastReplicationUpdateOn; - InstanceType = instanceType; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; } /// Gets or sets the location of the protected item. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs index 2d9ab87a36f3..e7c3b29742d0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs @@ -20,7 +20,7 @@ internal static HyperVToAzStackHCIRecoveryPointModelCustomProperties Deserialize return null; } Optional> diskIds = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("diskIds"u8)) @@ -39,7 +39,7 @@ internal static HyperVToAzStackHCIRecoveryPointModelCustomProperties Deserialize } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs index 3de0be11178f..861b6ff3ca5c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs @@ -17,16 +17,16 @@ public partial class HyperVToAzStackHCIRecoveryPointModelCustomProperties : Reco internal HyperVToAzStackHCIRecoveryPointModelCustomProperties() { DiskIds = new ChangeTrackingList(); - InstanceType = ReplicationType.HyperVToAzStackHCI; + InstanceType = "HyperVToAzStackHCI"; } /// Initializes a new instance of HyperVToAzStackHCIRecoveryPointModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the list of the disk Ids. - internal HyperVToAzStackHCIRecoveryPointModelCustomProperties(ReplicationType instanceType, IReadOnlyList diskIds) : base(instanceType) + internal HyperVToAzStackHCIRecoveryPointModelCustomProperties(string instanceType, IReadOnlyList diskIds) : base(instanceType) { DiskIds = diskIds; - InstanceType = instanceType; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; } /// Gets or sets the list of the disk Ids. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs index 91bb0ac8e21f..3decef324f80 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs @@ -31,7 +31,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(StorageAccountSasSecretName); } writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -57,7 +57,7 @@ internal static HyperVToAzStackHCIReplicationExtensionModelCustomProperties Dese Optional resourceLocation = default; Optional subscriptionId = default; Optional resourceGroup = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("hyperVFabricArmId"u8)) @@ -154,7 +154,7 @@ internal static HyperVToAzStackHCIReplicationExtensionModelCustomProperties Dese } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs index 022fc235573b..8f15537bd5f3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs @@ -24,7 +24,7 @@ public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperV HyperVFabricArmId = hyperVFabricArmId; AzStackHciFabricArmId = azStackHciFabricArmId; - InstanceType = ReplicationType.HyperVToAzStackHCI; + InstanceType = "HyperVToAzStackHCI"; } /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. @@ -45,7 +45,7 @@ public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperV /// Gets or sets the resource location. /// Gets or sets the subscription. /// Gets or sets the resource group. - internal HyperVToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType instanceType, string hyperVFabricArmId, string hyperVSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) + internal HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string instanceType, string hyperVFabricArmId, string hyperVSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) { HyperVFabricArmId = hyperVFabricArmId; HyperVSiteId = hyperVSiteId; @@ -63,7 +63,7 @@ internal HyperVToAzStackHCIReplicationExtensionModelCustomProperties(Replication ResourceLocation = resourceLocation; SubscriptionId = subscriptionId; ResourceGroup = resourceGroup; - InstanceType = instanceType; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; } /// Gets or sets the ARM Id of the source HyperV fabric. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs index a54059bb5fb0..599be153bd48 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs index e1beb6b2b701..56273929fecf 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs @@ -21,12 +21,12 @@ protected PolicyModelCustomProperties() /// Initializes a new instance of PolicyModelCustomProperties. /// Gets or sets the instance type. - internal PolicyModelCustomProperties(ReplicationType instanceType) + internal PolicyModelCustomProperties(string instanceType) { InstanceType = instanceType; } /// Gets or sets the instance type. - internal ReplicationType InstanceType { get; set; } + internal string InstanceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs index 0e0a6f6b7284..b1ad72fdb594 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs index 50394343d958..242eab9ec4c3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs @@ -21,12 +21,12 @@ protected ProtectedItemModelCustomProperties() /// Initializes a new instance of ProtectedItemModelCustomProperties. /// Gets or sets the instance type. - internal ProtectedItemModelCustomProperties(ReplicationType instanceType) + internal ProtectedItemModelCustomProperties(string instanceType) { InstanceType = instanceType; } /// Gets or sets the instance type. - internal ReplicationType InstanceType { get; set; } + internal string InstanceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs index e5ed7f77667f..45d185e5d847 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs @@ -21,12 +21,12 @@ protected RecoveryPointModelCustomProperties() /// Initializes a new instance of RecoveryPointModelCustomProperties. /// Gets or sets the instance type. - internal RecoveryPointModelCustomProperties(ReplicationType instanceType) + internal RecoveryPointModelCustomProperties(string instanceType) { InstanceType = instanceType; } /// Gets or sets the instance type. - internal ReplicationType InstanceType { get; set; } + internal string InstanceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs index f76fb8f632be..5c441a7fa415 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs index d2143c5b5569..b55255fd1977 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs @@ -21,12 +21,12 @@ protected ReplicationExtensionModelCustomProperties() /// Initializes a new instance of ReplicationExtensionModelCustomProperties. /// Gets or sets the instance type. - internal ReplicationExtensionModelCustomProperties(ReplicationType instanceType) + internal ReplicationExtensionModelCustomProperties(string instanceType) { InstanceType = instanceType; } /// Gets or sets the instance type. - internal ReplicationType InstanceType { get; set; } + internal string InstanceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs deleted file mode 100644 index 063e7bb68824..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationType.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the instance type. - internal readonly partial struct ReplicationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ReplicationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string VMwareToAvsValue = "VMwareToAvs"; - private const string VMwareToAvsFailbackValue = "VMwareToAvsFailback"; - private const string VMwareToAzureMigrateValue = "VMwareToAzureMigrate"; - private const string HyperVToAzStackHCIValue = "HyperVToAzStackHCI"; - private const string VMwareToAzStackHCIValue = "VMwareToAzStackHCI"; - - /// None. - public static ReplicationType None { get; } = new ReplicationType(NoneValue); - /// VMwareToAvs. - public static ReplicationType VMwareToAvs { get; } = new ReplicationType(VMwareToAvsValue); - /// VMwareToAvsFailback. - public static ReplicationType VMwareToAvsFailback { get; } = new ReplicationType(VMwareToAvsFailbackValue); - /// VMwareToAzureMigrate. - public static ReplicationType VMwareToAzureMigrate { get; } = new ReplicationType(VMwareToAzureMigrateValue); - /// HyperVToAzStackHCI. - public static ReplicationType HyperVToAzStackHCI { get; } = new ReplicationType(HyperVToAzStackHCIValue); - /// VMwareToAzStackHCI. - public static ReplicationType VMwareToAzStackHCI { get; } = new ReplicationType(VMwareToAzStackHCIValue); - /// Determines if two values are the same. - public static bool operator ==(ReplicationType left, ReplicationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ReplicationType left, ReplicationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ReplicationType(string value) => new ReplicationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ReplicationType other && Equals(other); - /// - public bool Equals(ReplicationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs index e53f071e1b65..fc93577df6a2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.Serialization.cs @@ -20,7 +20,7 @@ internal static TestFailoverCleanupWorkflowModelCustomProperties DeserializeTest return null; } Optional comments = default; - WorkflowDetailsType instanceType = default; + string instanceType = default; Optional> affectedObjectDetails = default; foreach (var property in element.EnumerateObject()) { @@ -31,7 +31,7 @@ internal static TestFailoverCleanupWorkflowModelCustomProperties DeserializeTest } if (property.NameEquals("instanceType"u8)) { - instanceType = new WorkflowDetailsType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } if (property.NameEquals("affectedObjectDetails"u8)) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs index bb0e0764aa06..c3d8d576cfb3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupWorkflowModelCustomProperties.cs @@ -15,17 +15,17 @@ public partial class TestFailoverCleanupWorkflowModelCustomProperties : Workflow /// Initializes a new instance of TestFailoverCleanupWorkflowModelCustomProperties. internal TestFailoverCleanupWorkflowModelCustomProperties() { - InstanceType = WorkflowDetailsType.TestFailoverCleanupWorkflowDetails; + InstanceType = "TestFailoverCleanupWorkflowDetails"; } /// Initializes a new instance of TestFailoverCleanupWorkflowModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets any custom properties of the affected object. /// Gets or sets the test failover cleanup comments. - internal TestFailoverCleanupWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails, string comments) : base(instanceType, affectedObjectDetails) + internal TestFailoverCleanupWorkflowModelCustomProperties(string instanceType, IReadOnlyDictionary affectedObjectDetails, string comments) : base(instanceType, affectedObjectDetails) { Comments = comments; - InstanceType = instanceType; + InstanceType = instanceType ?? "TestFailoverCleanupWorkflowDetails"; } /// Gets or sets the test failover cleanup comments. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs index 0a2a5a61ffef..b53a89e47cdf 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.Serialization.cs @@ -20,7 +20,7 @@ internal static TestFailoverWorkflowModelCustomProperties DeserializeTestFailove return null; } Optional> protectedItemDetails = default; - WorkflowDetailsType instanceType = default; + string instanceType = default; Optional> affectedObjectDetails = default; foreach (var property in element.EnumerateObject()) { @@ -40,7 +40,7 @@ internal static TestFailoverWorkflowModelCustomProperties DeserializeTestFailove } if (property.NameEquals("instanceType"u8)) { - instanceType = new WorkflowDetailsType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } if (property.NameEquals("affectedObjectDetails"u8)) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs index 11a08c032dcd..8553fc88d3cf 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverWorkflowModelCustomProperties.cs @@ -17,17 +17,17 @@ public partial class TestFailoverWorkflowModelCustomProperties : WorkflowModelCu internal TestFailoverWorkflowModelCustomProperties() { ProtectedItemDetails = new ChangeTrackingList(); - InstanceType = WorkflowDetailsType.TestFailoverWorkflowDetails; + InstanceType = "TestFailoverWorkflowDetails"; } /// Initializes a new instance of TestFailoverWorkflowModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets any custom properties of the affected object. /// Gets or sets the test VM details. - internal TestFailoverWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails) + internal TestFailoverWorkflowModelCustomProperties(string instanceType, IReadOnlyDictionary affectedObjectDetails, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails) { ProtectedItemDetails = protectedItemDetails; - InstanceType = instanceType; + InstanceType = instanceType ?? "TestFailoverWorkflowDetails"; } /// Gets or sets the test VM details. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs index ad764a7f1f5e..cade9a245163 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -26,12 +26,12 @@ internal static UnknownDraModelCustomProperties DeserializeUnknownDraModelCustom { return null; } - FabricType instanceType = "Unknown"; + string instanceType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new FabricType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs index c1e924fe05ce..7c89739efc81 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDraModelCustomProperties.cs @@ -12,9 +12,9 @@ internal partial class UnknownDraModelCustomProperties : DraModelCustomPropertie { /// Initializes a new instance of UnknownDraModelCustomProperties. /// Gets or sets the instance type. - internal UnknownDraModelCustomProperties(FabricType instanceType) : base(instanceType) + internal UnknownDraModelCustomProperties(string instanceType) : base(instanceType) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs index 9895db45e97f..870c811db7be 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.Serialization.cs @@ -18,12 +18,12 @@ internal static UnknownEventModelCustomProperties DeserializeUnknownEventModelCu { return null; } - ReplicationType instanceType = "Unknown"; + string instanceType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs index 03abb2e692a8..cb78fe246749 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownEventModelCustomProperties.cs @@ -12,9 +12,9 @@ internal partial class UnknownEventModelCustomProperties : EventModelCustomPrope { /// Initializes a new instance of UnknownEventModelCustomProperties. /// Gets or sets the instance type. - internal UnknownEventModelCustomProperties(ReplicationType instanceType) : base(instanceType) + internal UnknownEventModelCustomProperties(string instanceType) : base(instanceType) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs index 075c8ecf4b53..5fef72fdd65d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -26,12 +26,12 @@ internal static UnknownFabricModelCustomProperties DeserializeUnknownFabricModel { return null; } - FabricType instanceType = "Unknown"; + string instanceType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new FabricType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs index e42d3d1116d8..658d62aafa1e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownFabricModelCustomProperties.cs @@ -12,9 +12,9 @@ internal partial class UnknownFabricModelCustomProperties : FabricModelCustomPro { /// Initializes a new instance of UnknownFabricModelCustomProperties. /// Gets or sets the instance type. - internal UnknownFabricModelCustomProperties(FabricType instanceType) : base(instanceType) + internal UnknownFabricModelCustomProperties(string instanceType) : base(instanceType) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs index 871200c7228b..ca16e10bcd3e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -26,12 +26,12 @@ internal static UnknownPolicyModelCustomProperties DeserializeUnknownPolicyModel { return null; } - ReplicationType instanceType = "Unknown"; + string instanceType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs index 71cb6b67c787..4819228f2ae0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPolicyModelCustomProperties.cs @@ -12,9 +12,9 @@ internal partial class UnknownPolicyModelCustomProperties : PolicyModelCustomPro { /// Initializes a new instance of UnknownPolicyModelCustomProperties. /// Gets or sets the instance type. - internal UnknownPolicyModelCustomProperties(ReplicationType instanceType) : base(instanceType) + internal UnknownPolicyModelCustomProperties(string instanceType) : base(instanceType) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs index f26baf9f9231..cfcf25ab8a7f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -26,12 +26,12 @@ internal static UnknownProtectedItemModelCustomProperties DeserializeUnknownProt { return null; } - ReplicationType instanceType = "Unknown"; + string instanceType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs index 1b11d0626028..189c2443a9f1 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownProtectedItemModelCustomProperties.cs @@ -12,9 +12,9 @@ internal partial class UnknownProtectedItemModelCustomProperties : ProtectedItem { /// Initializes a new instance of UnknownProtectedItemModelCustomProperties. /// Gets or sets the instance type. - internal UnknownProtectedItemModelCustomProperties(ReplicationType instanceType) : base(instanceType) + internal UnknownProtectedItemModelCustomProperties(string instanceType) : base(instanceType) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs index 3be4455f8237..edb7d9eb92d6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.Serialization.cs @@ -18,12 +18,12 @@ internal static UnknownRecoveryPointModelCustomProperties DeserializeUnknownReco { return null; } - ReplicationType instanceType = "Unknown"; + string instanceType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs index ddb6c5741176..6f13ed9b7009 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownRecoveryPointModelCustomProperties.cs @@ -12,9 +12,9 @@ internal partial class UnknownRecoveryPointModelCustomProperties : RecoveryPoint { /// Initializes a new instance of UnknownRecoveryPointModelCustomProperties. /// Gets or sets the instance type. - internal UnknownRecoveryPointModelCustomProperties(ReplicationType instanceType) : base(instanceType) + internal UnknownRecoveryPointModelCustomProperties(string instanceType) : base(instanceType) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs index 862ef4ce45ed..0ecaedee6682 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -26,12 +26,12 @@ internal static UnknownReplicationExtensionModelCustomProperties DeserializeUnkn { return null; } - ReplicationType instanceType = "Unknown"; + string instanceType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs index 3d4dfed16e7c..717edc73d614 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownReplicationExtensionModelCustomProperties.cs @@ -12,9 +12,9 @@ internal partial class UnknownReplicationExtensionModelCustomProperties : Replic { /// Initializes a new instance of UnknownReplicationExtensionModelCustomProperties. /// Gets or sets the instance type. - internal UnknownReplicationExtensionModelCustomProperties(ReplicationType instanceType) : base(instanceType) + internal UnknownReplicationExtensionModelCustomProperties(string instanceType) : base(instanceType) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs index b8c2826e3176..e0f02067d4a0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.Serialization.cs @@ -19,13 +19,13 @@ internal static UnknownWorkflowModelCustomProperties DeserializeUnknownWorkflowM { return null; } - WorkflowDetailsType instanceType = "Unknown"; + string instanceType = "Unknown"; Optional> affectedObjectDetails = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("instanceType"u8)) { - instanceType = new WorkflowDetailsType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } if (property.NameEquals("affectedObjectDetails"u8)) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs index 9f9b937b8c70..c66ca9eb809e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownWorkflowModelCustomProperties.cs @@ -15,9 +15,9 @@ internal partial class UnknownWorkflowModelCustomProperties : WorkflowModelCusto /// Initializes a new instance of UnknownWorkflowModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets any custom properties of the affected object. - internal UnknownWorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails) : base(instanceType, affectedObjectDetails) + internal UnknownWorkflowModelCustomProperties(string instanceType, IReadOnlyDictionary affectedObjectDetails) : base(instanceType, affectedObjectDetails) { - InstanceType = instanceType; + InstanceType = instanceType ?? "Unknown"; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs index cbd9e7d87f01..1892bd1243d1 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs @@ -20,7 +20,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("marsAuthenticationIdentity"u8); writer.WriteObjectValue(MarsAuthenticationIdentity); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -32,7 +32,7 @@ internal static VMwareDraModelCustomProperties DeserializeVMwareDraModelCustomPr } string biosId = default; IdentityModel marsAuthenticationIdentity = default; - FabricType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("biosId"u8)) @@ -47,7 +47,7 @@ internal static VMwareDraModelCustomProperties DeserializeVMwareDraModelCustomPr } if (property.NameEquals("instanceType"u8)) { - instanceType = new FabricType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs index 730cffa0dbea..30a3ae71ee52 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs @@ -24,18 +24,18 @@ public VMwareDraModelCustomProperties(string biosId, IdentityModel marsAuthentic BiosId = biosId; MarsAuthenticationIdentity = marsAuthenticationIdentity; - InstanceType = FabricType.VMware; + InstanceType = "VMware"; } /// Initializes a new instance of VMwareDraModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the BIOS Id of the DRA machine. /// Identity model. - internal VMwareDraModelCustomProperties(FabricType instanceType, string biosId, IdentityModel marsAuthenticationIdentity) : base(instanceType) + internal VMwareDraModelCustomProperties(string instanceType, string biosId, IdentityModel marsAuthenticationIdentity) : base(instanceType) { BiosId = biosId; MarsAuthenticationIdentity = marsAuthenticationIdentity; - InstanceType = instanceType; + InstanceType = instanceType ?? "VMware"; } /// Gets or sets the BIOS Id of the DRA machine. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs index 0682b57f8519..a86e20c90781 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs @@ -20,7 +20,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("migrationSolutionId"u8); writer.WriteStringValue(MigrationSolutionId); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -32,7 +32,7 @@ internal static VMwareMigrateFabricModelCustomProperties DeserializeVMwareMigrat } string vmwareSiteId = default; string migrationSolutionId = default; - FabricType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("vmwareSiteId"u8)) @@ -47,7 +47,7 @@ internal static VMwareMigrateFabricModelCustomProperties DeserializeVMwareMigrat } if (property.NameEquals("instanceType"u8)) { - instanceType = new FabricType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs index 733c09896bd0..788d977c7db9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs @@ -24,18 +24,18 @@ public VMwareMigrateFabricModelCustomProperties(string vmwareSiteId, string migr VmwareSiteId = vmwareSiteId; MigrationSolutionId = migrationSolutionId; - InstanceType = FabricType.VMwareMigrate; + InstanceType = "VMwareMigrate"; } /// Initializes a new instance of VMwareMigrateFabricModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the ARM Id of the VMware site. /// Gets or sets the ARM Id of the migration solution. - internal VMwareMigrateFabricModelCustomProperties(FabricType instanceType, string vmwareSiteId, string migrationSolutionId) : base(instanceType) + internal VMwareMigrateFabricModelCustomProperties(string instanceType, string vmwareSiteId, string migrationSolutionId) : base(instanceType) { VmwareSiteId = vmwareSiteId; MigrationSolutionId = migrationSolutionId; - InstanceType = instanceType; + InstanceType = instanceType ?? "VMwareMigrate"; } /// Gets or sets the ARM Id of the VMware site. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs index 3adc27042ea6..8e2dcc917e80 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs @@ -22,7 +22,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("appConsistentFrequencyInMinutes"u8); writer.WriteNumberValue(AppConsistentFrequencyInMinutes); writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -35,7 +35,7 @@ internal static VMwareToAzStackHCIPolicyModelCustomProperties DeserializeVMwareT int recoveryPointHistoryInMinutes = default; int crashConsistentFrequencyInMinutes = default; int appConsistentFrequencyInMinutes = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("recoveryPointHistoryInMinutes"u8)) @@ -55,7 +55,7 @@ internal static VMwareToAzStackHCIPolicyModelCustomProperties DeserializeVMwareT } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs index 0a26a4d8ec1c..7413a3c94f13 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs @@ -22,7 +22,7 @@ public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - InstanceType = ReplicationType.VMwareToAzStackHCI; + InstanceType = "VMwareToAzStackHCI"; } /// Initializes a new instance of VMwareToAzStackHCIPolicyModelCustomProperties. @@ -33,12 +33,12 @@ public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// Gets or sets the app consistent snapshot frequency (in minutes). - internal VMwareToAzStackHCIPolicyModelCustomProperties(ReplicationType instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) + internal VMwareToAzStackHCIPolicyModelCustomProperties(string instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) { RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; - InstanceType = instanceType; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs index a1ffa69a0b37..cb5ad8969d5a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs @@ -92,7 +92,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteBooleanValue(PerformAutoResync.Value); } writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -148,7 +148,7 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize Optional performAutoResync = default; Optional resumeRetryCount = default; Optional lastReplicationUpdateTime = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("activeLocation"u8)) @@ -483,7 +483,7 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs index 77dfd292c9a0..143e5c64dc31 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs @@ -58,7 +58,7 @@ public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus RunAsAccountId = runAsAccountId; SourceDraName = sourceDraName; TargetDraName = targetDraName; - InstanceType = ReplicationType.VMwareToAzStackHCI; + InstanceType = "VMwareToAzStackHCI"; } /// Initializes a new instance of VMwareToAzStackHCIProtectedItemModelCustomProperties. @@ -115,7 +115,7 @@ public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus /// Gets or sets a value indicating whether auto resync is to be done. /// Gets or sets the resume retry count. /// Gets or sets the latest timestamp that replication status is updated. - internal VMwareToAzStackHCIProtectedItemModelCustomProperties(ReplicationType instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string storageContainerId, string targetResourceGroupId, string targetLocation, string customLocationRegion, IList disksToInclude, IList nicsToInclude, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, string targetVmName, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType, string osName, string firmwareType, string fabricDiscoveryMachineId, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? migrationProgressPercentage, int? resumeProgressPercentage, int? resyncProgressPercentage, long? resyncRetryCount, bool? resyncRequired, VMwareToAzureMigrateResyncState? resyncState, bool? performAutoResync, long? resumeRetryCount, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) + internal VMwareToAzStackHCIProtectedItemModelCustomProperties(string instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string storageContainerId, string targetResourceGroupId, string targetLocation, string customLocationRegion, IList disksToInclude, IList nicsToInclude, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, string targetVmName, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType, string osName, string firmwareType, string fabricDiscoveryMachineId, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? migrationProgressPercentage, int? resumeProgressPercentage, int? resyncProgressPercentage, long? resyncRetryCount, bool? resyncRequired, VMwareToAzureMigrateResyncState? resyncState, bool? performAutoResync, long? resumeRetryCount, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) { ActiveLocation = activeLocation; TargetHciClusterId = targetHciClusterId; @@ -163,7 +163,7 @@ internal VMwareToAzStackHCIProtectedItemModelCustomProperties(ReplicationType in PerformAutoResync = performAutoResync; ResumeRetryCount = resumeRetryCount; LastReplicationUpdateOn = lastReplicationUpdateOn; - InstanceType = instanceType; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; } /// Gets or sets the location of the protected item. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs index caa43c3a1649..a393d9de12b0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs @@ -31,7 +31,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(StorageAccountSasSecretName); } writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType.ToString()); + writer.WriteStringValue(InstanceType); writer.WriteEndObject(); } @@ -57,7 +57,7 @@ internal static VMwareToAzStackHCIReplicationExtensionModelCustomProperties Dese Optional resourceLocation = default; Optional subscriptionId = default; Optional resourceGroup = default; - ReplicationType instanceType = default; + string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("vmwareFabricArmId"u8)) @@ -154,7 +154,7 @@ internal static VMwareToAzStackHCIReplicationExtensionModelCustomProperties Dese } if (property.NameEquals("instanceType"u8)) { - instanceType = new ReplicationType(property.Value.GetString()); + instanceType = property.Value.GetString(); continue; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs index 876847a31a93..c40c771ab934 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs @@ -24,7 +24,7 @@ public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmware VmwareFabricArmId = vmwareFabricArmId; AzStackHciFabricArmId = azStackHciFabricArmId; - InstanceType = ReplicationType.VMwareToAzStackHCI; + InstanceType = "VMwareToAzStackHCI"; } /// Initializes a new instance of VMwareToAzStackHCIReplicationExtensionModelCustomProperties. @@ -45,7 +45,7 @@ public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmware /// Gets or sets the resource location. /// Gets or sets the subscription. /// Gets or sets the resource group. - internal VMwareToAzStackHCIReplicationExtensionModelCustomProperties(ReplicationType instanceType, string vmwareFabricArmId, string vmwareSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) + internal VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string instanceType, string vmwareFabricArmId, string vmwareSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) { VmwareFabricArmId = vmwareFabricArmId; VmwareSiteId = vmwareSiteId; @@ -63,7 +63,7 @@ internal VMwareToAzStackHCIReplicationExtensionModelCustomProperties(Replication ResourceLocation = resourceLocation; SubscriptionId = subscriptionId; ResourceGroup = resourceGroup; - InstanceType = instanceType; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; } /// Gets or sets the ARM Id of the source VMware fabric. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs deleted file mode 100644 index ddb0c86e300c..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowDetailsType.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the instance type. - internal readonly partial struct WorkflowDetailsType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WorkflowDetailsType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string WorkflowDetailsValue = "WorkflowDetails"; - private const string FailoverWorkflowDetailsValue = "FailoverWorkflowDetails"; - private const string TestFailoverWorkflowDetailsValue = "TestFailoverWorkflowDetails"; - private const string TestFailoverCleanupWorkflowDetailsValue = "TestFailoverCleanupWorkflowDetails"; - - /// WorkflowDetails. - public static WorkflowDetailsType WorkflowDetails { get; } = new WorkflowDetailsType(WorkflowDetailsValue); - /// FailoverWorkflowDetails. - public static WorkflowDetailsType FailoverWorkflowDetails { get; } = new WorkflowDetailsType(FailoverWorkflowDetailsValue); - /// TestFailoverWorkflowDetails. - public static WorkflowDetailsType TestFailoverWorkflowDetails { get; } = new WorkflowDetailsType(TestFailoverWorkflowDetailsValue); - /// TestFailoverCleanupWorkflowDetails. - public static WorkflowDetailsType TestFailoverCleanupWorkflowDetails { get; } = new WorkflowDetailsType(TestFailoverCleanupWorkflowDetailsValue); - /// Determines if two values are the same. - public static bool operator ==(WorkflowDetailsType left, WorkflowDetailsType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WorkflowDetailsType left, WorkflowDetailsType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WorkflowDetailsType(string value) => new WorkflowDetailsType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WorkflowDetailsType other && Equals(other); - /// - public bool Equals(WorkflowDetailsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs index 9d994c0f6c6d..adbdaeb5e6ef 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCustomProperties.cs @@ -26,14 +26,14 @@ protected WorkflowModelCustomProperties() /// Initializes a new instance of WorkflowModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets any custom properties of the affected object. - internal WorkflowModelCustomProperties(WorkflowDetailsType instanceType, IReadOnlyDictionary affectedObjectDetails) + internal WorkflowModelCustomProperties(string instanceType, IReadOnlyDictionary affectedObjectDetails) { InstanceType = instanceType; AffectedObjectDetails = affectedObjectDetails; } /// Gets or sets the instance type. - internal WorkflowDetailsType InstanceType { get; set; } + internal string InstanceType { get; set; } /// Gets or sets any custom properties of the affected object. public IReadOnlyDictionary AffectedObjectDetails { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs index 67668a8d85c4..d73618dfa348 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Policy name. + /// The policy name. /// Policy model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Policy name. + /// The policy name. /// Policy model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// - /// Policy name. + /// The policy name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(string policyN /// /// /// - /// Policy name. + /// The policy name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// - /// Policy name. + /// The policy name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string policyName, Cancell /// /// /// - /// Policy name. + /// The policy name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs index 54a86d5acdd2..ca6394085bff 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Protected item name. + /// The protected item name. /// Protected item model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> CreateOrUpda /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Protected item name. + /// The protected item name. /// Protected item model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// - /// Protected item name. + /// The protected item name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(string /// /// /// - /// Protected item name. + /// The protected item name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// - /// Protected item name. + /// The protected item name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string protectedItemName, /// /// /// - /// Protected item name. + /// The protected item name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs index 10bf7a3b56f2..359ef4ef745d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs @@ -112,7 +112,7 @@ public virtual RecoveryPointModelCollection GetRecoveryPointModels() /// /// /// - /// Recovery point name. + /// The recovery point name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -135,7 +135,7 @@ public virtual async Task> GetRecoveryPoint /// /// /// - /// Recovery point name. + /// The recovery point name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs index 90ff8fe047f9..04f979244ea7 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Recovery point name. + /// The recovery point name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -102,7 +102,7 @@ public virtual async Task> GetAsync(string /// /// /// - /// Recovery point name. + /// The recovery point name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -183,7 +183,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// - /// Recovery point name. + /// The recovery point name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -218,7 +218,7 @@ public virtual async Task> ExistsAsync(string recoveryPointName, /// /// /// - /// Recovery point name. + /// The recovery point name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs index fd610b85f8a8..2b3557a95376 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Replication extension name. + /// The replication extension name. /// Replication extension model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> Creat /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Replication extension name. + /// The replication extension name. /// Replication extension model. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// - /// Replication extension name. + /// The replication extension name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsync( /// /// /// - /// Replication extension name. + /// The replication extension name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// - /// Replication extension name. + /// The replication extension name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string replicationExtensio /// /// /// - /// Replication extension name. + /// The replication extension name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs index c6d24c012082..0f01bd6d12cf 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs @@ -37,7 +37,7 @@ public DraOperationStatusRestOperations(HttpPipeline pipeline, string applicatio _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName, string operationId) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, string operationId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -51,7 +51,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); uri.AppendPath(fabricName, true); uri.AppendPath("/fabricAgents/", false); - uri.AppendPath(draName, true); + uri.AppendPath(fabricAgentName, true); uri.AppendPath("/operations/", false); uri.AppendPath(operationId, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -64,21 +64,21 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Tracks the results of an asynchronous operation on the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. - /// Dra name. + /// The fabric name. + /// The fabric agent (Dra) name. /// The ID of an ongoing async operation. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, string operationId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, string operationId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName, operationId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, operationId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -97,21 +97,21 @@ public async Task> GetAsync(string subscriptionId, str /// Tracks the results of an asynchronous operation on the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. - /// Dra name. + /// The fabric name. + /// The fabric agent (Dra) name. /// The ID of an ongoing async operation. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string draName, string operationId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, string operationId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName, operationId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, operationId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs index ebf9f136c409..f81fe9a93de9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs @@ -37,7 +37,7 @@ public DraRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -51,7 +51,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); uri.AppendPath(fabricName, true); uri.AppendPath("/fabricAgents/", false); - uri.AppendPath(draName, true); + uri.AppendPath(fabricAgentName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +62,19 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. - /// Dra name. + /// The fabric name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +95,19 @@ public async Task> GetAsync(string subscriptionId, string /// Gets the details of the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. - /// Dra name. + /// The fabric name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, draName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +125,7 @@ public Response Get(string subscriptionId, string resourceGroupNam } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName, DraModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DraModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -139,7 +139,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); uri.AppendPath(fabricName, true); uri.AppendPath("/fabricAgents/", false); - uri.AppendPath(draName, true); + uri.AppendPath(fabricAgentName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,21 +154,21 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. - /// Dra name. + /// The fabric name. + /// The fabric agent (Dra) name. /// Dra model. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, DraModelData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, draName, data); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -183,21 +183,21 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. - /// Dra name. + /// The fabric name. + /// The fabric agent (Dra) name. /// Dra model. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string fabricName, string draName, DraModelData data, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, draName, data); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -209,7 +209,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string f } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fabricName, string draName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -223,7 +223,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); uri.AppendPath(fabricName, true); uri.AppendPath("/fabricAgents/", false); - uri.AppendPath(draName, true); + uri.AppendPath(fabricAgentName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -234,19 +234,19 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. - /// Dra Name. + /// The fabric name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, draName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -261,19 +261,19 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes the fabric agent. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. - /// Dra Name. + /// The fabric name. + /// The fabric agent (Dra) name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string fabricName, string draName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(draName, nameof(draName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, draName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -309,7 +309,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of fabric agents in the given fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -338,7 +338,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of fabric agents in the given fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -382,7 +382,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -413,7 +413,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs index 606595f4b9c6..f7267a610268 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs @@ -62,8 +62,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the alert configuration setting. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Email configuration name. + /// The vault name. + /// The email configuration name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -95,8 +95,8 @@ public async Task> GetAsync(string subscri /// Gets the details of the alert configuration setting. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Email configuration name. + /// The vault name. + /// The email configuration name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -154,8 +154,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates an alert configuration setting for the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Email configuration name. + /// The vault name. + /// The email configuration name. /// EmailConfiguration model. /// The cancellation token to use. /// , , , or is null. @@ -188,8 +188,8 @@ public async Task> CreateAsync(string subs /// Creates an alert configuration setting for the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Email configuration name. + /// The vault name. + /// The email configuration name. /// EmailConfiguration model. /// The cancellation token to use. /// , , , or is null. @@ -243,7 +243,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of alert configuration settings for the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -272,7 +272,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of alert configuration settings for the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -316,7 +316,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -347,7 +347,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs index 5d38e49084db..f1b918d082cb 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs @@ -62,8 +62,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the event. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Event name. + /// The vault name. + /// The event name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -95,8 +95,8 @@ public async Task> GetAsync(string subscriptionId, stri /// Gets the details of the event. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Event name. + /// The vault name. + /// The event name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -157,7 +157,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of events in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. @@ -188,7 +188,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of events in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. @@ -234,7 +234,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. @@ -267,7 +267,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs index 8b0cc5ec4f86..85386c9e76d1 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs @@ -62,7 +62,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Tracks the results of an asynchronous operation on the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , or is null. @@ -93,7 +93,7 @@ public async Task> GetAsync(string subscriptionId, str /// Tracks the results of an asynchronous operation on the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs index 412419342768..be4ae9e710ac 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs @@ -60,7 +60,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -91,7 +91,7 @@ public async Task> GetAsync(string subscriptionId, str /// Gets the details of the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric name. + /// The fabric name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -146,7 +146,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. + /// The fabric name. /// Fabric properties. /// The cancellation token to use. /// , , or is null. @@ -173,7 +173,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. + /// The fabric name. /// Fabric properties. /// The cancellation token to use. /// , , or is null. @@ -224,7 +224,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Performs update on the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. + /// The fabric name. /// Fabric properties. /// The cancellation token to use. /// , , or is null. @@ -251,7 +251,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Performs update on the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. + /// The fabric name. /// Fabric properties. /// The cancellation token to use. /// , , or is null. @@ -298,7 +298,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Removes the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. + /// The fabric name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -323,7 +323,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Removes the fabric. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Fabric Name. + /// The fabric name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs index e078fbdcaba6..d4f883472ed4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs @@ -64,8 +64,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Tracks the results of an asynchronous operation on the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Policy name. + /// The vault name. + /// The policy name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , , or is null. @@ -97,8 +97,8 @@ public async Task> GetAsync(string subscriptionId, str /// Tracks the results of an asynchronous operation on the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Policy name. + /// The vault name. + /// The policy name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs index 323a862ffe1b..868644c6654e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs @@ -62,8 +62,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Policy name. + /// The vault name. + /// The policy name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -95,8 +95,8 @@ public async Task> GetAsync(string subscriptionId, str /// Gets the details of the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Policy name. + /// The vault name. + /// The policy name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -154,8 +154,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Policy name. + /// The vault name. + /// The policy name. /// Policy model. /// The cancellation token to use. /// , , , or is null. @@ -183,8 +183,8 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Policy name. + /// The vault name. + /// The policy name. /// Policy model. /// The cancellation token to use. /// , , , or is null. @@ -234,8 +234,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Removes the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. - /// Policy Name. + /// The vault name. + /// The policy name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -261,8 +261,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Removes the policy. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. - /// Policy Name. + /// The vault name. + /// The policy name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -309,7 +309,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of policies in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -338,7 +338,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of policies in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -382,7 +382,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -413,7 +413,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs index 61429d9dbe76..460f0ff538cd 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs @@ -64,8 +64,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Tracks the results of an asynchronous operation on the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected Item name. + /// The vault name. + /// The protected item name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , , or is null. @@ -97,8 +97,8 @@ public async Task> GetAsync(string subscriptionId, str /// Tracks the results of an asynchronous operation on the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected Item name. + /// The vault name. + /// The protected item name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs index 2201dcc367cf..edb6b854a54c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs @@ -62,8 +62,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -95,8 +95,8 @@ public async Task> GetAsync(string subscription /// Gets the details of the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -154,8 +154,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// Protected item model. /// The cancellation token to use. /// , , , or is null. @@ -183,8 +183,8 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// Protected item model. /// The cancellation token to use. /// , , , or is null. @@ -238,8 +238,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Removes the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// A flag indicating whether to do force delete or not. /// The cancellation token to use. /// , , or is null. @@ -266,8 +266,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Removes the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// A flag indicating whether to do force delete or not. /// The cancellation token to use. /// , , or is null. @@ -315,7 +315,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of protected items in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -344,7 +344,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of protected items in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -403,8 +403,8 @@ internal HttpMessage CreatePlannedFailoverRequest(string subscriptionId, string /// Performs the planned failover on the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// Planned failover model. /// The cancellation token to use. /// , , or is null. @@ -431,8 +431,8 @@ public async Task PlannedFailoverAsync(string subscriptionId, string r /// Performs the planned failover on the protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// Planned failover model. /// The cancellation token to use. /// , , or is null. @@ -474,7 +474,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -505,7 +505,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs index a5de954a4c8d..4bface856365 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs @@ -64,9 +64,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the recovery point of a protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. - /// Recovery point name. + /// The vault name. + /// The protected item name. + /// The recovery point name. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -99,9 +99,9 @@ public async Task> GetAsync(string subscription /// Gets the details of the recovery point of a protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. - /// Recovery point name. + /// The vault name. + /// The protected item name. + /// The recovery point name. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -157,8 +157,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of recovery points of the given protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -188,8 +188,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of recovery points of the given protected item. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -234,8 +234,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -267,8 +267,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Protected item name. + /// The vault name. + /// The protected item name. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs index 731bd3587c7c..2c9cfeb372ab 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs @@ -64,8 +64,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Tracks the results of an asynchronous operation on the replication extension. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , , or is null. @@ -97,8 +97,8 @@ public async Task> GetAsync(string subscriptionId, str /// Tracks the results of an asynchronous operation on the replication extension. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs index 26c67964427f..d6a23ce1e6a4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs @@ -62,8 +62,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the replication extension. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -95,8 +95,8 @@ public async Task> GetAsync(string subsc /// Gets the details of the replication extension. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -154,8 +154,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates the replication extension in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// Replication extension model. /// The cancellation token to use. /// , , , or is null. @@ -183,8 +183,8 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates the replication extension in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// Replication extension model. /// The cancellation token to use. /// , , , or is null. @@ -234,8 +234,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes the replication extension in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -261,8 +261,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes the replication extension in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. - /// Replication extension name. + /// The vault name. + /// The replication extension name. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -309,7 +309,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of replication extensions in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -338,7 +338,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of replication extensions in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -382,7 +382,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -413,7 +413,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs index ac2956c0bf93..72b8bb8e37db 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs @@ -62,7 +62,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Tracks the results of an asynchronous operation on the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , or is null. @@ -93,7 +93,7 @@ public async Task> GetAsync(string subscriptionId, str /// Tracks the results of an asynchronous operation on the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The ID of an ongoing async operation. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs index db956805d415..9ff2f9dd199e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs @@ -60,7 +60,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -91,7 +91,7 @@ public async Task> GetAsync(string subscriptionId, stri /// Gets the details of the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -146,7 +146,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. + /// The vault name. /// Vault properties. /// The cancellation token to use. /// , , or is null. @@ -173,7 +173,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. + /// The vault name. /// Vault properties. /// The cancellation token to use. /// , , or is null. @@ -224,7 +224,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Performs update on the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. + /// The vault name. /// Vault properties. /// The cancellation token to use. /// , , or is null. @@ -251,7 +251,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Performs update on the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. + /// The vault name. /// Vault properties. /// The cancellation token to use. /// , , or is null. @@ -298,7 +298,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Removes the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -323,7 +323,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Removes the vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault Name. + /// The vault name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs index 0ed599ae9dbb..8cf9195c5da2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs @@ -37,7 +37,7 @@ public WorkflowOperationStatusRestOperations(HttpPipeline pipeline, string appli _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, string operationId) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string jobName, string operationId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -51,7 +51,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); uri.AppendPath(vaultName, true); uri.AppendPath("/jobs/", false); - uri.AppendPath(workflowName, true); + uri.AppendPath(jobName, true); uri.AppendPath("/operations/", false); uri.AppendPath(operationId, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -64,21 +64,21 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Tracks the results of an asynchronous operation on the job. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Workflow name. + /// The vault name. + /// The job (workflow) name. /// The ID of an ongoing async operation. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, string operationId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string jobName, string operationId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName, operationId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName, operationId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -97,21 +97,21 @@ public async Task> GetAsync(string subscriptionId, str /// Tracks the results of an asynchronous operation on the job. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Workflow name. + /// The vault name. + /// The job (workflow) name. /// The ID of an ongoing async operation. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, string operationId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string jobName, string operationId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName, operationId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName, operationId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs index fc7a5c126e11..80153aff19c1 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs @@ -37,7 +37,7 @@ public WorkflowRestOperations(HttpPipeline pipeline, string applicationId, Uri e _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string workflowName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string jobName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -51,7 +51,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); uri.AppendPath(vaultName, true); uri.AppendPath("/jobs/", false); - uri.AppendPath(workflowName, true); + uri.AppendPath(jobName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +62,19 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets the details of the job. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Workflow name. + /// The vault name. + /// The job (workflow) name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +95,19 @@ public async Task> GetAsync(string subscriptionId, s /// Gets the details of the job. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. - /// Workflow name. + /// The vault name. + /// The job (workflow) name. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string workflowName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, workflowName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -157,7 +157,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of jobs in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. @@ -188,7 +188,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Gets the list of jobs in the given vault. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. @@ -234,7 +234,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. @@ -267,7 +267,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Vault name. + /// The vault name. /// Filter string. /// Continuation token. /// The cancellation token to use. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs index 3be413deeb1a..ed9dcf1c1d57 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs @@ -67,7 +67,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Vault Name. + /// The vault name. /// Vault properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -108,7 +108,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Vault Name. + /// The vault name. /// Vault properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -148,7 +148,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// - /// Vault name. + /// The vault name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -185,7 +185,7 @@ public virtual async Task> GetAsync(string vaultNam /// /// /// - /// Vault name. + /// The vault name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -268,7 +268,7 @@ public virtual Pageable GetAll(string continuationToken = nu /// /// /// - /// Vault name. + /// The vault name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -303,7 +303,7 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella /// /// /// - /// Vault name. + /// The vault name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs index e6602d15bc18..d1eb8e1ce789 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs @@ -113,7 +113,7 @@ public virtual EmailConfigurationModelCollection GetEmailConfigurationModels() /// /// /// - /// Email configuration name. + /// The email configuration name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -136,7 +136,7 @@ public virtual async Task> GetEmailCon /// /// /// - /// Email configuration name. + /// The email configuration name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -166,7 +166,7 @@ public virtual EventModelCollection GetEventModels() /// /// /// - /// Event name. + /// The event name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -189,7 +189,7 @@ public virtual async Task> GetEventModelAsync(strin /// /// /// - /// Event name. + /// The event name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -219,7 +219,7 @@ public virtual PolicyModelCollection GetPolicyModels() /// /// /// - /// Policy name. + /// The policy name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -242,7 +242,7 @@ public virtual async Task> GetPolicyModelAsync(str /// /// /// - /// Policy name. + /// The policy name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -272,7 +272,7 @@ public virtual ProtectedItemModelCollection GetProtectedItemModels() /// /// /// - /// Protected item name. + /// The protected item name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -295,7 +295,7 @@ public virtual async Task> GetProtectedItem /// /// /// - /// Protected item name. + /// The protected item name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -325,7 +325,7 @@ public virtual ReplicationExtensionModelCollection GetReplicationExtensionModels /// /// /// - /// Replication extension name. + /// The replication extension name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -348,7 +348,7 @@ public virtual async Task> GetReplic /// /// /// - /// Replication extension name. + /// The replication extension name. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -370,7 +370,7 @@ public virtual WorkflowModelCollection GetWorkflowModels() /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -378,14 +378,14 @@ public virtual WorkflowModelCollection GetWorkflowModels() /// /// /// - /// Workflow name. + /// The job (workflow) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetWorkflowModelAsync(string workflowName, CancellationToken cancellationToken = default) + public virtual async Task> GetWorkflowModelAsync(string jobName, CancellationToken cancellationToken = default) { - return await GetWorkflowModels().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + return await GetWorkflowModels().GetAsync(jobName, cancellationToken).ConfigureAwait(false); } /// @@ -393,7 +393,7 @@ public virtual async Task> GetWorkflowModelAsync /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -401,14 +401,14 @@ public virtual async Task> GetWorkflowModelAsync /// /// /// - /// Workflow name. + /// The job (workflow) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetWorkflowModel(string workflowName, CancellationToken cancellationToken = default) + public virtual Response GetWorkflowModel(string jobName, CancellationToken cancellationToken = default) { - return GetWorkflowModels().Get(workflowName, cancellationToken); + return GetWorkflowModels().Get(jobName, cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs index 4ca9deec9d3a..04df796e7a25 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs @@ -57,7 +57,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -65,19 +65,19 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Workflow name. + /// The job (workflow) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string workflowName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string jobName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Get"); scope.Start(); try { - var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken).ConfigureAwait(false); + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); @@ -94,7 +94,7 @@ public virtual async Task> GetAsync(string workf /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -102,19 +102,19 @@ public virtual async Task> GetAsync(string workf /// /// /// - /// Workflow name. + /// The job (workflow) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string workflowName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string jobName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Get"); scope.Start(); try { - var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken); + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); @@ -179,7 +179,7 @@ public virtual Pageable GetAll(string filter = null, stri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -187,19 +187,19 @@ public virtual Pageable GetAll(string filter = null, stri /// /// /// - /// Workflow name. + /// The job (workflow) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string workflowName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string jobName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Exists"); scope.Start(); try { - var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -214,7 +214,7 @@ public virtual async Task> ExistsAsync(string workflowName, Cance /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -222,19 +222,19 @@ public virtual async Task> ExistsAsync(string workflowName, Cance /// /// /// - /// Workflow name. + /// The job (workflow) name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string workflowName, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string jobName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Exists"); scope.Start(); try { - var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken); + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs index 380394f89e09..71d965967a82 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs @@ -26,9 +26,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication public partial class WorkflowModelResource : ArmResource { /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string workflowName) + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}"; return new ResourceIdentifier(resourceId); } @@ -96,7 +96,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -128,7 +128,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} /// /// /// Operation Id @@ -160,7 +160,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName}/operations/{operationId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}/operations/{operationId} /// /// /// Operation Id @@ -195,7 +195,7 @@ public virtual async Task> GetWorkflowOperationStatuAs /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{workflowName}/operations/{operationId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}/operations/{operationId} /// /// /// Operation Id From d7c23bf1b2c0901c63ea5807fc519b17119ef88c Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Wed, 6 Sep 2023 16:28:58 -0700 Subject: [PATCH 5/6] Used merged public swagger --- sdk/applicationinsights/ci.yml | 10 + sdk/operationalinsights/ci.yml | 11 + .../CHANGELOG.md | 2 +- .../README.md | 2 +- ...yServicesDataReplication.netstandard2.0.cs | 54 +--- ...veryServicesDataReplicationModelFactory.cs | 56 +--- .../src/Generated/DraModelCollection.cs | 5 +- .../src/Generated/DraModelData.cs | 8 +- .../src/Generated/DraModelResource.cs | 289 ------------------ .../EmailConfigurationModelCollection.cs | 5 +- .../Generated/EmailConfigurationModelData.cs | 8 +- .../EmailConfigurationModelResource.cs | 289 ------------------ .../src/Generated/EventModelCollection.cs | 5 +- .../src/Generated/EventModelData.cs | 8 +- .../SubscriptionResourceExtensionClient.cs | 9 +- .../src/Generated/FabricModelCollection.cs | 5 +- .../Models/DraModelData.Serialization.cs | 29 +- ...ailConfigurationModelData.Serialization.cs | 29 +- .../Models/EventModelData.Serialization.cs | 18 +- .../Models/FabricModelPatch.Serialization.cs | 10 +- .../src/Generated/Models/FabricModelPatch.cs | 4 +- .../Models/PolicyModelData.Serialization.cs | 29 +- .../ProtectedItemModelData.Serialization.cs | 29 +- .../RecoveryPointModelData.Serialization.cs | 18 +- ...icationExtensionModelData.Serialization.cs | 29 +- .../Models/VaultModelPatch.Serialization.cs | 10 +- .../src/Generated/Models/VaultModelPatch.cs | 4 +- .../Models/WorkflowModelData.Serialization.cs | 18 +- .../src/Generated/PolicyModelCollection.cs | 5 +- .../src/Generated/PolicyModelData.cs | 8 +- .../src/Generated/PolicyModelResource.cs | 289 ------------------ .../Generated/ProtectedItemModelCollection.cs | 5 +- .../src/Generated/ProtectedItemModelData.cs | 8 +- .../Generated/ProtectedItemModelResource.cs | 289 ------------------ .../Generated/RecoveryPointModelCollection.cs | 5 +- .../src/Generated/RecoveryPointModelData.cs | 8 +- .../ReplicationExtensionModelCollection.cs | 5 +- .../ReplicationExtensionModelData.cs | 8 +- .../ReplicationExtensionModelResource.cs | 289 ------------------ .../src/Generated/VaultModelCollection.cs | 5 +- .../src/Generated/WorkflowModelCollection.cs | 5 +- .../src/Generated/WorkflowModelData.cs | 8 +- .../src/Properties/AssemblyInfo.cs | 2 +- .../src/autorest.md | 2 +- 44 files changed, 114 insertions(+), 1820 deletions(-) create mode 100644 sdk/applicationinsights/ci.yml create mode 100644 sdk/operationalinsights/ci.yml diff --git a/sdk/applicationinsights/ci.yml b/sdk/applicationinsights/ci.yml new file mode 100644 index 000000000000..a8f462befe27 --- /dev/null +++ b/sdk/applicationinsights/ci.yml @@ -0,0 +1,10 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: none +pr: none + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: applicationinsights + ArtifactName: packages + Artifacts: diff --git a/sdk/operationalinsights/ci.yml b/sdk/operationalinsights/ci.yml new file mode 100644 index 000000000000..670ea5db71e9 --- /dev/null +++ b/sdk/operationalinsights/ci.yml @@ -0,0 +1,11 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none +pr: none + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: operationalinsights + ArtifactName: packages + Artifacts: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md index 23f86d1e896e..4f204a19265e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-09-30) ### General New Features diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md index 24b442c6a37c..f9a1842b1c84 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md @@ -1,6 +1,6 @@ # Microsoft Azure RecoveryServicesDataReplication management client library for .NET -**[Describe the service briefly first.]** +The Azure RecoveryServicesDataReplication provides VM migration capabilities from Hyper-V and VMware platforms to Azure Stack HCI utilizing Azure Migrate. The data movement that the service provides stays on-premises at all times while using Azure Migrate as the management plane. This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs index 98a6be8a2218..442356c0cb6d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs @@ -19,7 +19,6 @@ public partial class DraModelData : Azure.ResourceManager.Models.ResourceData { public DraModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties properties) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } public partial class DraModelResource : Azure.ResourceManager.ArmResource { @@ -27,8 +26,6 @@ public partial class DraModelResource : Azure.ResourceManager.ArmResource protected DraModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -36,10 +33,6 @@ protected DraModelResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDraOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDraOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -62,7 +55,6 @@ public partial class EmailConfigurationModelData : Azure.ResourceManager.Models. { public EmailConfigurationModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties properties) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } public partial class EmailConfigurationModelResource : Azure.ResourceManager.ArmResource { @@ -70,15 +62,9 @@ public partial class EmailConfigurationModelResource : Azure.ResourceManager.Arm protected EmailConfigurationModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -99,7 +85,6 @@ public partial class EventModelData : Azure.ResourceManager.Models.ResourceData { internal EventModelData() { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties Properties { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } } public partial class EventModelResource : Azure.ResourceManager.ArmResource { @@ -175,7 +160,6 @@ public partial class PolicyModelData : Azure.ResourceManager.Models.ResourceData { public PolicyModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties properties) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } public partial class PolicyModelResource : Azure.ResourceManager.ArmResource { @@ -183,8 +167,6 @@ public partial class PolicyModelResource : Azure.ResourceManager.ArmResource protected PolicyModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -192,10 +174,6 @@ protected PolicyModelResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetPolicyOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPolicyOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -218,7 +196,6 @@ public partial class ProtectedItemModelData : Azure.ResourceManager.Models.Resou { public ProtectedItemModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties properties) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } public partial class ProtectedItemModelResource : Azure.ResourceManager.ArmResource { @@ -226,8 +203,6 @@ public partial class ProtectedItemModelResource : Azure.ResourceManager.ArmResou protected ProtectedItemModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -240,10 +215,6 @@ protected ProtectedItemModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelCollection GetRecoveryPointModels() { throw null; } public virtual Azure.ResourceManager.ArmOperation PlannedFailover(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PlannedFailoverAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -264,7 +235,6 @@ public partial class RecoveryPointModelData : Azure.ResourceManager.Models.Resou { internal RecoveryPointModelData() { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties Properties { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } } public partial class RecoveryPointModelResource : Azure.ResourceManager.ArmResource { @@ -322,7 +292,6 @@ public partial class ReplicationExtensionModelData : Azure.ResourceManager.Model { public ReplicationExtensionModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties properties) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } public partial class ReplicationExtensionModelResource : Azure.ResourceManager.ArmResource { @@ -330,8 +299,6 @@ public partial class ReplicationExtensionModelResource : Azure.ResourceManager.A protected ReplicationExtensionModelResource() { } public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -339,10 +306,6 @@ protected ReplicationExtensionModelResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetReplicationExtensionOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetReplicationExtensionOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -423,7 +386,6 @@ public partial class WorkflowModelData : Azure.ResourceManager.Models.ResourceDa { internal WorkflowModelData() { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties Properties { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } } public partial class WorkflowModelResource : Azure.ResourceManager.ArmResource { @@ -444,11 +406,11 @@ public static partial class ArmRecoveryServicesDataReplicationModelFactory { public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIFabricModelCustomProperties AzStackHCIFabricModelCustomProperties(string azStackHciSiteId = null, System.Collections.Generic.IEnumerable applianceName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties cluster = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.CheckNameAvailabilityResponseModel CheckNameAvailabilityResponseModel(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData DraModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData DraModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties DraModelProperties(string correlationId = null, string machineId = null, string machineName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel authenticationIdentity = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel resourceAccessIdentity = null, bool? isResponsive = default(bool?), System.DateTimeOffset? lastHeartbeat = default(System.DateTimeOffset?), string versionNumber = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties customProperties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData EmailConfigurationModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData EmailConfigurationModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ErrorModel ErrorModel(string code = null, string errorModelType = null, string severity = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string message = null, string causes = null, string recommendation = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.EventModelData EventModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties properties = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.EventModelData EventModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties EventModelProperties(string resourceType = null, string resourceName = null, string eventType = null, string eventName = null, System.DateTimeOffset? timeOfOccurrence = default(System.DateTimeOffset?), string severity = null, string description = null, string correlationId = null, System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties customProperties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData FabricModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties FabricModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), string serviceEndpoint = null, string serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? health = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties customProperties = null) { throw null; } @@ -465,18 +427,18 @@ public static partial class ArmRecoveryServicesDataReplicationModelFactory public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIReplicationExtensionModelCustomProperties HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId = null, string hyperVSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.InnerHealthErrorModel InnerHealthErrorModel(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.OperationStatus OperationStatus(string id = null, string name = null, string status = null, string startTime = null, string endTime = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData PolicyModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData PolicyModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties PolicyModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties customProperties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties ProtectedItemJobProperties(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData ProtectedItemModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData ProtectedItemModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties ProtectedItemModelProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState? protectionState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState?), string protectionStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState? testFailoverState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState?), string testFailoverStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState? resynchronizationState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState?), string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string draId = null, string targetDraId = null, bool? resyncRequired = default(bool?), System.DateTimeOffset? lastSuccessfulPlannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulUnplannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulTestFailoverOn = default(System.DateTimeOffset?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob currentJob = null, System.Collections.Generic.IEnumerable allowedJobs = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob lastFailedEnableProtectionJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob lastFailedPlannedFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob lastTestFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? replicationHealth = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties customProperties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob ProtectedItemModelPropertiesCurrentJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob ProtectedItemModelPropertiesLastFailedEnableProtectionJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob ProtectedItemModelPropertiesLastTestFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelData RecoveryPointModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties properties = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelData RecoveryPointModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties RecoveryPointModelProperties(System.DateTimeOffset recoveryPointOn = default(System.DateTimeOffset), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType recoveryPointType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties customProperties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData ReplicationExtensionModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties properties = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData ReplicationExtensionModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties ReplicationExtensionModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties customProperties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskModel TaskModel(string taskName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string customInstanceType = null, System.Collections.Generic.IEnumerable childrenWorkflows = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupWorkflowModelCustomProperties TestFailoverCleanupWorkflowModelCustomProperties(System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null, string comments = null) { throw null; } @@ -489,7 +451,7 @@ public static partial class ArmRecoveryServicesDataReplicationModelFactory public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = default(bool?), string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIReplicationExtensionModelCustomProperties VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId = null, string vmwareSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = null, System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData WorkflowModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties properties = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData WorkflowModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties properties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties WorkflowModelProperties(string displayName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? objectType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType?), string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, System.Collections.Generic.IEnumerable allowedActions = null, string activityId = null, System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties customProperties = null) { throw null; } } public partial class AzStackHCIClusterProperties diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs index 13249567bb21..f75f5f260655 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs @@ -23,13 +23,10 @@ public static partial class ArmRecoveryServicesDataReplicationModelFactory /// The resourceType. /// The systemData. /// Dra model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static DraModelData DraModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DraModelProperties properties = null, IDictionary tags = null) + public static DraModelData DraModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DraModelProperties properties = null) { - tags ??= new Dictionary(); - - return new DraModelData(id, name, resourceType, systemData, properties, tags); + return new DraModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of DraModelProperties. @@ -123,13 +120,10 @@ public static OperationStatus OperationStatus(string id = null, string name = nu /// The resourceType. /// The systemData. /// Email configuration model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static EmailConfigurationModelData EmailConfigurationModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EmailConfigurationModelProperties properties = null, IDictionary tags = null) + public static EmailConfigurationModelData EmailConfigurationModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EmailConfigurationModelProperties properties = null) { - tags ??= new Dictionary(); - - return new EmailConfigurationModelData(id, name, resourceType, systemData, properties, tags); + return new EmailConfigurationModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of EventModelData. @@ -138,13 +132,10 @@ public static EmailConfigurationModelData EmailConfigurationModelData(ResourceId /// The resourceType. /// The systemData. /// Event model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static EventModelData EventModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EventModelProperties properties = null, IReadOnlyDictionary tags = null) + public static EventModelData EventModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EventModelProperties properties = null) { - tags ??= new Dictionary(); - - return new EventModelData(id, name, resourceType, systemData, properties, tags); + return new EventModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of EventModelProperties. @@ -211,13 +202,10 @@ public static FabricModelProperties FabricModelProperties(ProvisioningState? pro /// The resourceType. /// The systemData. /// Policy model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static PolicyModelData PolicyModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PolicyModelProperties properties = null, IDictionary tags = null) + public static PolicyModelData PolicyModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PolicyModelProperties properties = null) { - tags ??= new Dictionary(); - - return new PolicyModelData(id, name, resourceType, systemData, properties, tags); + return new PolicyModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of PolicyModelProperties. @@ -239,13 +227,10 @@ public static PolicyModelProperties PolicyModelProperties(ProvisioningState? pro /// The resourceType. /// The systemData. /// Protected item model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static ProtectedItemModelData ProtectedItemModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProtectedItemModelProperties properties = null, IDictionary tags = null) + public static ProtectedItemModelData ProtectedItemModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProtectedItemModelProperties properties = null) { - tags ??= new Dictionary(); - - return new ProtectedItemModelData(id, name, resourceType, systemData, properties, tags); + return new ProtectedItemModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of ProtectedItemModelProperties. @@ -367,13 +352,10 @@ public static ProtectedItemModelPropertiesLastTestFailoverJob ProtectedItemModel /// The resourceType. /// The systemData. /// Recovery point model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static RecoveryPointModelData RecoveryPointModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RecoveryPointModelProperties properties = null, IReadOnlyDictionary tags = null) + public static RecoveryPointModelData RecoveryPointModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RecoveryPointModelProperties properties = null) { - tags ??= new Dictionary(); - - return new RecoveryPointModelData(id, name, resourceType, systemData, properties, tags); + return new RecoveryPointModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of RecoveryPointModelProperties. @@ -402,13 +384,10 @@ public static RecoveryPointModelProperties RecoveryPointModelProperties(DateTime /// The resourceType. /// The systemData. /// Replication extension model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static ReplicationExtensionModelData ReplicationExtensionModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationExtensionModelProperties properties = null, IDictionary tags = null) + public static ReplicationExtensionModelData ReplicationExtensionModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationExtensionModelProperties properties = null) { - tags ??= new Dictionary(); - - return new ReplicationExtensionModelData(id, name, resourceType, systemData, properties, tags); + return new ReplicationExtensionModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of ReplicationExtensionModelProperties. @@ -466,13 +445,10 @@ public static VaultModelProperties VaultModelProperties(ProvisioningState? provi /// The resourceType. /// The systemData. /// Workflow model properties. - /// Gets or sets the resource tags. /// A new instance for mocking. - public static WorkflowModelData WorkflowModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkflowModelProperties properties = null, IReadOnlyDictionary tags = null) + public static WorkflowModelData WorkflowModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkflowModelProperties properties = null) { - tags ??= new Dictionary(); - - return new WorkflowModelData(id, name, resourceType, systemData, properties, tags); + return new WorkflowModelData(id, name, resourceType, systemData, properties); } /// Initializes a new instance of WorkflowModelProperties. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs index a3a61c57c5db..1321b08ea388 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -227,7 +228,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can { HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,7 +250,7 @@ public virtual Pageable GetAll(CancellationToken cancellationT { HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs index ef5d0156e47f..17929878fe0a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ public DraModelData(DraModelProperties properties) Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of DraModelData. @@ -36,16 +34,12 @@ public DraModelData(DraModelProperties properties) /// The resourceType. /// The systemData. /// Dra model properties. - /// Gets or sets the resource tags. - internal DraModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DraModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + internal DraModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DraModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Dra model properties. public DraModelProperties Properties { get; set; } - /// Gets or sets the resource tags. - public IDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs index aa445d305b56..714c92a47794 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -369,293 +368,5 @@ public virtual Response GetDraOperationStatu(string operationId throw; } } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} - /// - /// - /// Operation Id - /// Dra_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} - /// - /// - /// Operation Id - /// Dra_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} - /// - /// - /// Operation Id - /// Dra_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} - /// - /// - /// Operation Id - /// Dra_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} - /// - /// - /// Operation Id - /// Dra_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} - /// - /// - /// Operation Id - /// Dra_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs index 8eea68ee3854..7125005f717d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -227,7 +228,7 @@ public virtual AsyncPageable GetAllAsync(Cancel { HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,7 +250,7 @@ public virtual Pageable GetAll(CancellationToke { HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs index 79dbbb0d5b21..cb7c8aab934f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ public EmailConfigurationModelData(EmailConfigurationModelProperties properties) Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of EmailConfigurationModelData. @@ -36,16 +34,12 @@ public EmailConfigurationModelData(EmailConfigurationModelProperties properties) /// The resourceType. /// The systemData. /// Email configuration model properties. - /// Gets or sets the resource tags. - internal EmailConfigurationModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EmailConfigurationModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + internal EmailConfigurationModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EmailConfigurationModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Email configuration model properties. public EmailConfigurationModelProperties Properties { get; set; } - /// Gets or sets the resource tags. - public IDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs index 6fabaa51c587..fc1c3c73570f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -226,293 +225,5 @@ public virtual ArmOperation Update(WaitUntil wa throw; } } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} - /// - /// - /// Operation Id - /// EmailConfiguration_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} - /// - /// - /// Operation Id - /// EmailConfiguration_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} - /// - /// - /// Operation Id - /// EmailConfiguration_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} - /// - /// - /// Operation Id - /// EmailConfiguration_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} - /// - /// - /// Operation Id - /// EmailConfiguration_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} - /// - /// - /// Operation Id - /// EmailConfiguration_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs index 27fbd9a1cd06..25a2564f3ee4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -147,7 +148,7 @@ public virtual AsyncPageable GetAllAsync(string filter = nul { HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -171,7 +172,7 @@ public virtual Pageable GetAll(string filter = null, string { HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs index ae34c01c4c6a..f223067faa93 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ internal EventModelData(EventModelProperties properties) Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of EventModelData. @@ -36,16 +34,12 @@ internal EventModelData(EventModelProperties properties) /// The resourceType. /// The systemData. /// Event model properties. - /// Gets or sets the resource tags. - internal EventModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EventModelProperties properties, IReadOnlyDictionary tags) : base(id, name, resourceType, systemData) + internal EventModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EventModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Event model properties. public EventModelProperties Properties { get; } - /// Gets or sets the resource tags. - public IReadOnlyDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 915f202d57e2..3f05aad57ba3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -8,6 +8,7 @@ using System; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -71,7 +72,7 @@ public virtual AsyncPageable GetFabricModelsAsync(string co { HttpMessage FirstPageRequest(int? pageSizeHint) => FabricModelFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricModelFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); } /// @@ -94,7 +95,7 @@ public virtual Pageable GetFabricModels(string continuation { HttpMessage FirstPageRequest(int? pageSizeHint) => FabricModelFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricModelFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); } /// @@ -181,7 +182,7 @@ public virtual AsyncPageable GetVaultModelsAsync(string cont { HttpMessage FirstPageRequest(int? pageSizeHint) => VaultModelVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VaultModelVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); } /// @@ -204,7 +205,7 @@ public virtual Pageable GetVaultModels(string continuationTo { HttpMessage FirstPageRequest(int? pageSizeHint) => VaultModelVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VaultModelVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs index 67604405f278..3798222dc0ca 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -229,7 +230,7 @@ public virtual AsyncPageable GetAllAsync(string continuatio { HttpMessage FirstPageRequest(int? pageSizeHint) => _fabricModelFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fabricModelFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -252,7 +253,7 @@ public virtual Pageable GetAll(string continuationToken = n { HttpMessage FirstPageRequest(int? pageSizeHint) => _fabricModelFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fabricModelFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs index e7f04dcca520..b63b2479e43b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -20,17 +19,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WriteEndObject(); } @@ -41,7 +29,6 @@ internal static DraModelData DeserializeDraModelData(JsonElement element) return null; } DraModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -53,20 +40,6 @@ internal static DraModelData DeserializeDraModelData(JsonElement element) properties = DraModelProperties.DeserializeDraModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -92,7 +65,7 @@ internal static DraModelData DeserializeDraModelData(JsonElement element) continue; } } - return new DraModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new DraModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs index cf0b13159734..d72737b00dc5 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -20,17 +19,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WriteEndObject(); } @@ -41,7 +29,6 @@ internal static EmailConfigurationModelData DeserializeEmailConfigurationModelDa return null; } EmailConfigurationModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -53,20 +40,6 @@ internal static EmailConfigurationModelData DeserializeEmailConfigurationModelDa properties = EmailConfigurationModelProperties.DeserializeEmailConfigurationModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -92,7 +65,7 @@ internal static EmailConfigurationModelData DeserializeEmailConfigurationModelDa continue; } } - return new EmailConfigurationModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new EmailConfigurationModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs index 3d8c0253fdce..18841dbb6c31 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -22,7 +21,6 @@ internal static EventModelData DeserializeEventModelData(JsonElement element) return null; } EventModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -34,20 +32,6 @@ internal static EventModelData DeserializeEventModelData(JsonElement element) properties = EventModelProperties.DeserializeEventModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -73,7 +57,7 @@ internal static EventModelData DeserializeEventModelData(JsonElement element) continue; } } - return new EventModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new EventModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs index fd3633c56977..ffc65e03237d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs @@ -15,11 +15,6 @@ public partial class FabricModelPatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -31,6 +26,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } writer.WriteEndObject(); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs index f1c5eb7901a7..e6d4ced4e58d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs @@ -20,9 +20,9 @@ public FabricModelPatch() Tags = new ChangeTrackingDictionary(); } - /// Fabric model properties. - public FabricModelProperties Properties { get; set; } /// Gets or sets the resource tags. public IDictionary Tags { get; } + /// Fabric model properties. + public FabricModelProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs index c96479eac3a4..650cd0072f30 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -20,17 +19,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WriteEndObject(); } @@ -41,7 +29,6 @@ internal static PolicyModelData DeserializePolicyModelData(JsonElement element) return null; } PolicyModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -53,20 +40,6 @@ internal static PolicyModelData DeserializePolicyModelData(JsonElement element) properties = PolicyModelProperties.DeserializePolicyModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -92,7 +65,7 @@ internal static PolicyModelData DeserializePolicyModelData(JsonElement element) continue; } } - return new PolicyModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new PolicyModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs index 189b732f14d3..f98798f9e439 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -20,17 +19,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WriteEndObject(); } @@ -41,7 +29,6 @@ internal static ProtectedItemModelData DeserializeProtectedItemModelData(JsonEle return null; } ProtectedItemModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -53,20 +40,6 @@ internal static ProtectedItemModelData DeserializeProtectedItemModelData(JsonEle properties = ProtectedItemModelProperties.DeserializeProtectedItemModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -92,7 +65,7 @@ internal static ProtectedItemModelData DeserializeProtectedItemModelData(JsonEle continue; } } - return new ProtectedItemModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new ProtectedItemModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs index 842d85807053..e4882452e6d1 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -22,7 +21,6 @@ internal static RecoveryPointModelData DeserializeRecoveryPointModelData(JsonEle return null; } RecoveryPointModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -34,20 +32,6 @@ internal static RecoveryPointModelData DeserializeRecoveryPointModelData(JsonEle properties = RecoveryPointModelProperties.DeserializeRecoveryPointModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -73,7 +57,7 @@ internal static RecoveryPointModelData DeserializeRecoveryPointModelData(JsonEle continue; } } - return new RecoveryPointModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new RecoveryPointModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs index a3c34072e738..918e7e16d7e4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -20,17 +19,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } writer.WriteEndObject(); } @@ -41,7 +29,6 @@ internal static ReplicationExtensionModelData DeserializeReplicationExtensionMod return null; } ReplicationExtensionModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -53,20 +40,6 @@ internal static ReplicationExtensionModelData DeserializeReplicationExtensionMod properties = ReplicationExtensionModelProperties.DeserializeReplicationExtensionModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -92,7 +65,7 @@ internal static ReplicationExtensionModelData DeserializeReplicationExtensionMod continue; } } - return new ReplicationExtensionModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new ReplicationExtensionModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs index e330f9907fe4..e8af3fd7f484 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs @@ -15,11 +15,6 @@ public partial class VaultModelPatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -31,6 +26,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + } writer.WriteEndObject(); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs index 87fd255d7626..5bb7c6a16499 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs @@ -20,9 +20,9 @@ public VaultModelPatch() Tags = new ChangeTrackingDictionary(); } - /// Vault properties. - public VaultModelProperties Properties { get; set; } /// Gets or sets the resource tags. public IDictionary Tags { get; } + /// Vault properties. + public VaultModelProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs index eb3698f12e2c..eeba8caf995b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -22,7 +21,6 @@ internal static WorkflowModelData DeserializeWorkflowModelData(JsonElement eleme return null; } WorkflowModelProperties properties = default; - Optional> tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -34,20 +32,6 @@ internal static WorkflowModelData DeserializeWorkflowModelData(JsonElement eleme properties = WorkflowModelProperties.DeserializeWorkflowModelProperties(property.Value); continue; } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -73,7 +57,7 @@ internal static WorkflowModelData DeserializeWorkflowModelData(JsonElement eleme continue; } } - return new WorkflowModelData(id, name, type, systemData.Value, properties, Optional.ToDictionary(tags)); + return new WorkflowModelData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs index d73618dfa348..f54b350e673e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -227,7 +228,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken { HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,7 +250,7 @@ public virtual Pageable GetAll(CancellationToken cancellati { HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs index 7bb36be1cd6f..2459a4e14a6a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ public PolicyModelData(PolicyModelProperties properties) Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of PolicyModelData. @@ -36,16 +34,12 @@ public PolicyModelData(PolicyModelProperties properties) /// The resourceType. /// The systemData. /// Policy model properties. - /// Gets or sets the resource tags. - internal PolicyModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PolicyModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + internal PolicyModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PolicyModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Policy model properties. public PolicyModelProperties Properties { get; set; } - /// Gets or sets the resource tags. - public IDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs index 9af98eb0b2ec..d4c11e7b221c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -369,293 +368,5 @@ public virtual Response GetPolicyOperationStatu(string operatio throw; } } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} - /// - /// - /// Operation Id - /// Policy_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} - /// - /// - /// Operation Id - /// Policy_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} - /// - /// - /// Operation Id - /// Policy_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} - /// - /// - /// Operation Id - /// Policy_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} - /// - /// - /// Operation Id - /// Policy_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} - /// - /// - /// Operation Id - /// Policy_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs index ca6394085bff..29b51ddbc799 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -227,7 +228,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio { HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,7 +250,7 @@ public virtual Pageable GetAll(CancellationToken can { HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs index 10483d0b64ea..7bf747be9845 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ public ProtectedItemModelData(ProtectedItemModelProperties properties) Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of ProtectedItemModelData. @@ -36,16 +34,12 @@ public ProtectedItemModelData(ProtectedItemModelProperties properties) /// The resourceType. /// The systemData. /// Protected item model properties. - /// Gets or sets the resource tags. - internal ProtectedItemModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProtectedItemModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + internal ProtectedItemModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProtectedItemModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Protected item model properties. public ProtectedItemModelProperties Properties { get; set; } - /// Gets or sets the resource tags. - public IDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs index 359ef4ef745d..3d6c176b477a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -494,293 +493,5 @@ public virtual Response GetProtectedItemOperationStatu(string o throw; } } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} - /// - /// - /// Operation Id - /// ProtectedItem_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} - /// - /// - /// Operation Id - /// ProtectedItem_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} - /// - /// - /// Operation Id - /// ProtectedItem_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} - /// - /// - /// Operation Id - /// ProtectedItem_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} - /// - /// - /// Operation Id - /// ProtectedItem_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} - /// - /// - /// Operation Id - /// ProtectedItem_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs index 04f979244ea7..9a3386aa1909 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -145,7 +146,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio { HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -167,7 +168,7 @@ public virtual Pageable GetAll(CancellationToken can { HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs index b4cb025335f5..64963ba1916d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ internal RecoveryPointModelData(RecoveryPointModelProperties properties) Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of RecoveryPointModelData. @@ -36,16 +34,12 @@ internal RecoveryPointModelData(RecoveryPointModelProperties properties) /// The resourceType. /// The systemData. /// Recovery point model properties. - /// Gets or sets the resource tags. - internal RecoveryPointModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RecoveryPointModelProperties properties, IReadOnlyDictionary tags) : base(id, name, resourceType, systemData) + internal RecoveryPointModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RecoveryPointModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Recovery point model properties. public RecoveryPointModelProperties Properties { get; } - /// Gets or sets the resource tags. - public IReadOnlyDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs index 2b3557a95376..98ee077086dd 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -227,7 +228,7 @@ public virtual AsyncPageable GetAllAsync(Canc { HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -249,7 +250,7 @@ public virtual Pageable GetAll(CancellationTo { HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs index 340c6845a305..597355c79e05 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ public ReplicationExtensionModelData(ReplicationExtensionModelProperties propert Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of ReplicationExtensionModelData. @@ -36,16 +34,12 @@ public ReplicationExtensionModelData(ReplicationExtensionModelProperties propert /// The resourceType. /// The systemData. /// Replication extension model properties. - /// Gets or sets the resource tags. - internal ReplicationExtensionModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ReplicationExtensionModelProperties properties, IDictionary tags) : base(id, name, resourceType, systemData) + internal ReplicationExtensionModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ReplicationExtensionModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Replication extension model properties. public ReplicationExtensionModelProperties Properties { get; set; } - /// Gets or sets the resource tags. - public IDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs index faa600b5a809..668503252c2f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -369,293 +368,5 @@ public virtual Response GetReplicationExtensionOperationStatu(s throw; } } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} - /// - /// - /// Operation Id - /// ReplicationExtension_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} - /// - /// - /// Operation Id - /// ReplicationExtension_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags[key] = value; - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} - /// - /// - /// Operation Id - /// ReplicationExtension_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} - /// - /// - /// Operation Id - /// ReplicationExtension_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} - /// - /// - /// Operation Id - /// ReplicationExtension_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - current.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} - /// - /// - /// Operation Id - /// ReplicationExtension_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - current.Tags.Remove(key); - var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs index ed9dcf1c1d57..dfc4f8a205d8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -229,7 +230,7 @@ public virtual AsyncPageable GetAllAsync(string continuation { HttpMessage FirstPageRequest(int? pageSizeHint) => _vaultModelVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _vaultModelVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -252,7 +253,7 @@ public virtual Pageable GetAll(string continuationToken = nu { HttpMessage FirstPageRequest(int? pageSizeHint) => _vaultModelVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _vaultModelVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs index 04df796e7a25..34d1eb82205f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs @@ -11,6 +11,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure; using Azure.Core; using Azure.Core.Pipeline; @@ -147,7 +148,7 @@ public virtual AsyncPageable GetAllAsync(string filter = { HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -171,7 +172,7 @@ public virtual Pageable GetAll(string filter = null, stri { HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs index 9e4939501f47..a459287e69aa 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.RecoveryServicesDataReplication.Models; @@ -27,7 +26,6 @@ internal WorkflowModelData(WorkflowModelProperties properties) Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; - Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of WorkflowModelData. @@ -36,16 +34,12 @@ internal WorkflowModelData(WorkflowModelProperties properties) /// The resourceType. /// The systemData. /// Workflow model properties. - /// Gets or sets the resource tags. - internal WorkflowModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkflowModelProperties properties, IReadOnlyDictionary tags) : base(id, name, resourceType, systemData) + internal WorkflowModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkflowModelProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; - Tags = tags; } /// Workflow model properties. public WorkflowModelProperties Properties { get; } - /// Gets or sets the resource tags. - public IReadOnlyDictionary Tags { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs index 3ac26d5bc492..b55f2d37e18c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; -[assembly: Azure.Core.AzureResourceProviderNamespace("RecoveryServicesDataReplication")] +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.DataReplication")] [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] [assembly: InternalsVisibleTo("Azure.ResourceManager.RecoveryServicesDataReplication.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md index f52355d7dcae..6ec2a89b9837 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: RecoveryServicesDataReplication namespace: Azure.ResourceManager.RecoveryServicesDataReplication -require: D:\forked-repos\openapihub\azure-rest-api-specs\specification\recoveryservicesdatareplication\resource-manager\readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/64cddc58b25ae7d6e50cc0dfb5bc19af4ea23f65/specification/recoveryservicesdatareplication/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true From ad38c503b7ee70b2cb88afda1fd7b35d65104840 Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Sat, 16 Sep 2023 17:02:01 +0800 Subject: [PATCH 6/6] update --- .../src/autorest.md | 5 +- ...yServicesDataReplication.netstandard2.0.cs | 1688 ++++++++--------- .../Sample_DataReplicationDraCollection.cs | 161 ++ .../Sample_DataReplicationDraResource.cs | 115 ++ ...ReplicationEmailConfigurationCollection.cs | 168 ++ ...taReplicationEmailConfigurationResource.cs | 94 + .../Sample_DataReplicationEventCollection.cs | 124 ++ .../Sample_DataReplicationEventResource.cs | 51 + .../Sample_DataReplicationFabricCollection.cs | 165 ++ .../Sample_DataReplicationFabricResource.cs | 153 ++ .../Sample_DataReplicationPolicyCollection.cs | 161 ++ .../Sample_DataReplicationPolicyResource.cs | 115 ++ ..._DataReplicationProtectedItemCollection.cs | 161 ++ ...le_DataReplicationProtectedItemResource.cs | 146 ++ ..._DataReplicationRecoveryPointCollection.cs | 125 ++ ...le_DataReplicationRecoveryPointResource.cs | 52 + ...plicationReplicationExtensionCollection.cs | 161 ++ ...ReplicationReplicationExtensionResource.cs | 115 ++ .../Sample_DataReplicationVaultCollection.cs | 169 ++ .../Sample_DataReplicationVaultResource.cs | 156 ++ ...ample_DataReplicationWorkflowCollection.cs | 124 ++ .../Sample_DataReplicationWorkflowResource.cs | 51 + .../Sample_ResourceGroupResourceExtensions.cs | 61 + .../Sample_SubscriptionResourceExtensions.cs | 52 + ...veryServicesDataReplicationModelFactory.cs | 431 ++--- ...ion.cs => DataReplicationDraCollection.cs} | 94 +- ...ModelData.cs => DataReplicationDraData.cs} | 14 +- ...ource.cs => DataReplicationDraResource.cs} | 157 +- ...eplicationEmailConfigurationCollection.cs} | 94 +- ... DataReplicationEmailConfigurationData.cs} | 14 +- ...aReplicationEmailConfigurationResource.cs} | 70 +- ...n.cs => DataReplicationEventCollection.cs} | 78 +- ...delData.cs => DataReplicationEventData.cs} | 14 +- ...rce.cs => DataReplicationEventResource.cs} | 54 +- ....cs => DataReplicationFabricCollection.cs} | 90 +- ...elData.cs => DataReplicationFabricData.cs} | 14 +- ...ce.cs => DataReplicationFabricResource.cs} | 232 +-- ....cs => DataReplicationPolicyCollection.cs} | 94 +- ...elData.cs => DataReplicationPolicyData.cs} | 14 +- ...ce.cs => DataReplicationPolicyResource.cs} | 157 +- ...DataReplicationProtectedItemCollection.cs} | 94 +- ...cs => DataReplicationProtectedItemData.cs} | 14 +- ...> DataReplicationProtectedItemResource.cs} | 184 +- ...DataReplicationRecoveryPointCollection.cs} | 78 +- ...cs => DataReplicationRecoveryPointData.cs} | 14 +- ...> DataReplicationRecoveryPointResource.cs} | 54 +- ...licationReplicationExtensionCollection.cs} | 94 +- ...ataReplicationReplicationExtensionData.cs} | 14 +- ...eplicationReplicationExtensionResource.cs} | 157 +- ...n.cs => DataReplicationVaultCollection.cs} | 90 +- ...delData.cs => DataReplicationVaultData.cs} | 14 +- ...rce.cs => DataReplicationVaultResource.cs} | 312 ++- ...s => DataReplicationWorkflowCollection.cs} | 78 +- ...Data.cs => DataReplicationWorkflowData.cs} | 14 +- .../DataReplicationWorkflowResource.cs | 153 ++ ...coveryServicesDataReplicationExtensions.cs | 208 +- .../ResourceGroupResourceExtensionClient.cs | 16 +- .../SubscriptionResourceExtensionClient.cs | 72 +- ...s => DataReplicationDraOperationSource.cs} | 16 +- .../DataReplicationFabricOperationSource.cs | 40 + .../DataReplicationPolicyOperationSource.cs | 40 + ...ReplicationProtectedItemOperationSource.cs | 40 + ...tionReplicationExtensionOperationSource.cs | 40 + .../DataReplicationVaultOperationSource.cs | 40 + .../DraModelOperationSource.cs | 40 - .../FabricModelOperationSource.cs | 40 - .../PolicyModelOperationSource.cs | 40 - ...eplicationExtensionModelOperationSource.cs | 40 - .../VaultModelOperationSource.cs | 40 - ...tackHciClusterProperties.Serialization.cs} | 6 +- ...ties.cs => AzStackHciClusterProperties.cs} | 10 +- ...ricModelCustomProperties.Serialization.cs} | 26 +- ... AzStackHciFabricModelCustomProperties.cs} | 18 +- ...> DataReplicationDraData.Serialization.cs} | 10 +- ...ReplicationDraListResult.Serialization.cs} | 12 +- ...ion.cs => DataReplicationDraListResult.cs} | 14 +- ...ReplicationDraProperties.Serialization.cs} | 24 +- ...ies.cs => DataReplicationDraProperties.cs} | 32 +- ...onEmailConfigurationData.Serialization.cs} | 10 +- ...ilConfigurationListResult.Serialization.cs | 50 + ...eplicationEmailConfigurationListResult.cs} | 14 +- ...lConfigurationProperties.Serialization.cs} | 6 +- ...eplicationEmailConfigurationProperties.cs} | 10 +- ...DataReplicationErrorInfo.Serialization.cs} | 6 +- ...orModel.cs => DataReplicationErrorInfo.cs} | 10 +- ...DataReplicationEventData.Serialization.cs} | 10 +- ...plicationEventListResult.Serialization.cs} | 12 +- ...n.cs => DataReplicationEventListResult.cs} | 14 +- ...plicationEventProperties.Serialization.cs} | 20 +- ...s.cs => DataReplicationEventProperties.cs} | 28 +- ...ataReplicationFabricData.Serialization.cs} | 10 +- ...licationFabricListResult.Serialization.cs} | 12 +- ....cs => DataReplicationFabricListResult.cs} | 14 +- ...taReplicationFabricPatch.Serialization.cs} | 2 +- ...Patch.cs => DataReplicationFabricPatch.cs} | 8 +- ...licationFabricProperties.Serialization.cs} | 28 +- ....cs => DataReplicationFabricProperties.cs} | 26 +- ...plicationHealthErrorInfo.Serialization.cs} | 12 +- ...l.cs => DataReplicationHealthErrorInfo.cs} | 14 +- .../Models/DataReplicationHealthStatus.cs | 54 + ... DataReplicationIdentity.Serialization.cs} | 6 +- ...ityModel.cs => DataReplicationIdentity.cs} | 6 +- ...tionInnerHealthErrorInfo.Serialization.cs} | 6 +- ...=> DataReplicationInnerHealthErrorInfo.cs} | 10 +- ...nNameAvailabilityContent.Serialization.cs} | 4 +- ...DataReplicationNameAvailabilityContent.cs} | 10 +- ...onNameAvailabilityResult.Serialization.cs} | 6 +- ... DataReplicationNameAvailabilityResult.cs} | 16 +- ...ataReplicationPolicyData.Serialization.cs} | 10 +- ...licationPolicyListResult.Serialization.cs} | 12 +- ....cs => DataReplicationPolicyListResult.cs} | 14 +- ...licationPolicyProperties.Serialization.cs} | 10 +- ....cs => DataReplicationPolicyProperties.cs} | 18 +- ...icationProtectedItemData.Serialization.cs} | 10 +- ...onProtectedItemListResult.Serialization.cs | 50 + ...DataReplicationProtectedItemListResult.cs} | 14 +- ...nProtectedItemProperties.Serialization.cs} | 48 +- ...DataReplicationProtectedItemProperties.cs} | 60 +- .../Models/DataReplicationProtectionState.cs | 201 ++ .../DataReplicationProvisioningState.cs | 66 + ...icationRecoveryPointData.Serialization.cs} | 10 +- ...onRecoveryPointListResult.Serialization.cs | 50 + ...DataReplicationRecoveryPointListResult.cs} | 14 +- ...nRecoveryPointProperties.Serialization.cs} | 10 +- ...DataReplicationRecoveryPointProperties.cs} | 12 +- .../DataReplicationRecoveryPointType.cs | 51 + ...nReplicationExtensionData.Serialization.cs | 71 + ...cationExtensionListResult.Serialization.cs | 50 + ...licationReplicationExtensionListResult.cs} | 14 +- ...ationExtensionProperties.Serialization.cs} | 10 +- ...licationReplicationExtensionProperties.cs} | 18 +- .../DataReplicationReplicationVaultType.cs | 51 + .../DataReplicationResynchronizationState.cs | 57 + ...s => DataReplicationTask.Serialization.cs} | 16 +- .../{TaskModel.cs => DataReplicationTask.cs} | 16 +- .../Models/DataReplicationTaskState.cs | 63 + .../DataReplicationTestFailoverState.cs | 72 + ...DataReplicationVaultData.Serialization.cs} | 10 +- ...plicationVaultListResult.Serialization.cs} | 12 +- ...n.cs => DataReplicationVaultListResult.cs} | 14 +- ...ataReplicationVaultPatch.Serialization.cs} | 2 +- ...lPatch.cs => DataReplicationVaultPatch.cs} | 8 +- ...plicationVaultProperties.Serialization.cs} | 22 +- ...s.cs => DataReplicationVaultProperties.cs} | 18 +- ...aReplicationWorkflowData.Serialization.cs} | 10 +- ...cationWorkflowListResult.Serialization.cs} | 12 +- ...s => DataReplicationWorkflowListResult.cs} | 14 +- ...cationWorkflowProperties.Serialization.cs} | 22 +- ...s => DataReplicationWorkflowProperties.cs} | 20 +- .../Models/DataReplicationWorkflowState.cs | 72 + ...ploymentPreflightResource.Serialization.cs | 12 +- .../Models/DeploymentPreflightResource.cs | 4 +- .../DraModelCustomProperties.Serialization.cs | 1 + .../Models/DraModelCustomProperties.cs | 2 +- ...ventModelCustomProperties.Serialization.cs | 2 +- .../Models/EventModelCustomProperties.cs | 2 +- ...bricModelCustomProperties.Serialization.cs | 3 +- .../Models/FabricModelCustomProperties.cs | 2 +- ...lDraModelCustomProperties.Serialization.cs | 41 + .../Models/GeneralDraModelCustomProperties.cs | 26 + ...bricModelCustomProperties.Serialization.cs | 41 + .../GeneralFabricModelCustomProperties.cs | 26 + ...overModelCustomProperties.Serialization.cs | 41 + ...ralPlannedFailoverModelCustomProperties.cs | 26 + ...licyModelCustomProperties.Serialization.cs | 41 + .../GeneralPolicyModelCustomProperties.cs | 26 + ...ItemModelCustomProperties.Serialization.cs | 41 + ...neralProtectedItemModelCustomProperties.cs | 26 + ...sionModelCustomProperties.Serialization.cs | 41 + ...plicationExtensionModelCustomProperties.cs | 26 + .../src/Generated/Models/HealthStatus.cs | 54 - ...bricModelCustomProperties.Serialization.cs | 16 +- ...yperVMigrateFabricModelCustomProperties.cs | 10 +- ...erVToAzStackHciDiskInput.Serialization.cs} | 14 +- ...nput.cs => HyperVToAzStackHciDiskInput.cs} | 12 +- ...entModelCustomProperties.Serialization.cs} | 6 +- ...ToAzStackHciEventModelCustomProperties.cs} | 10 +- ...perVToAzStackHciNicInput.Serialization.cs} | 6 +- ...Input.cs => HyperVToAzStackHciNicInput.cs} | 10 +- ...verModelCustomProperties.Serialization.cs} | 6 +- ...ciPlannedFailoverModelCustomProperties.cs} | 10 +- ...icyModelCustomProperties.Serialization.cs} | 6 +- ...oAzStackHciPolicyModelCustomProperties.cs} | 10 +- ...iProtectedDiskProperties.Serialization.cs} | 14 +- ...erVToAzStackHciProtectedDiskProperties.cs} | 14 +- ...temModelCustomProperties.Serialization.cs} | 50 +- ...kHciProtectedItemModelCustomProperties.cs} | 32 +- ...ciProtectedNicProperties.Serialization.cs} | 6 +- ...perVToAzStackHciProtectedNicProperties.cs} | 10 +- ...intModelCustomProperties.Serialization.cs} | 6 +- ...kHciRecoveryPointModelCustomProperties.cs} | 10 +- ...ionModelCustomProperties.Serialization.cs} | 30 +- ...licationExtensionModelCustomProperties.cs} | 18 +- .../Models/OperationStatus.Serialization.cs | 57 - .../src/Generated/Models/OperationStatus.cs | 50 - .../Generated/Models/PlannedFailoverModel.cs | 2 +- ...overModelCustomProperties.Serialization.cs | 5 +- .../PlannedFailoverModelCustomProperties.cs | 2 +- .../Models/PlannedFailoverModelProperties.cs | 4 +- ...licyModelCustomProperties.Serialization.cs | 5 +- .../Models/PolicyModelCustomProperties.cs | 2 +- ...ItemModelCustomProperties.Serialization.cs | 5 +- .../ProtectedItemModelCustomProperties.cs | 2 +- ...ModelPropertiesCurrentJob.Serialization.cs | 78 - .../ProtectedItemModelPropertiesCurrentJob.cs | 32 - ...FailedEnableProtectionJob.Serialization.cs | 78 - ...PropertiesLastFailedEnableProtectionJob.cs | 32 - ...tFailedPlannedFailoverJob.Serialization.cs | 78 - ...lPropertiesLastFailedPlannedFailoverJob.cs | 32 - ...ertiesLastTestFailoverJob.Serialization.cs | 78 - ...dItemModelPropertiesLastTestFailoverJob.cs | 32 - .../src/Generated/Models/ProtectionState.cs | 201 -- .../src/Generated/Models/ProvisioningState.cs | 66 - ...overyPointModelCollection.Serialization.cs | 50 - ...ointModelCustomProperties.Serialization.cs | 2 +- .../RecoveryPointModelCustomProperties.cs | 2 +- .../src/Generated/Models/RecoveryPointType.cs | 51 - ...nExtensionModelCollection.Serialization.cs | 50 - ...sionModelCustomProperties.Serialization.cs | 5 +- ...plicationExtensionModelCustomProperties.cs | 2 +- ...icationExtensionModelData.Serialization.cs | 71 - .../Generated/Models/ReplicationVaultType.cs | 51 - .../Models/ResynchronizationState.cs | 57 - .../src/Generated/Models/TaskState.cs | 63 - .../src/Generated/Models/TestFailoverState.cs | 72 - ...eDraModelCustomProperties.Serialization.cs | 4 +- .../Models/VMwareDraModelCustomProperties.cs | 6 +- ...bricModelCustomProperties.Serialization.cs | 10 +- ...MwareMigrateFabricModelCustomProperties.cs | 20 +- ...areToAzStackHciDiskInput.Serialization.cs} | 6 +- ...nput.cs => VMwareToAzStackHciDiskInput.cs} | 10 +- ...wareToAzStackHciNicInput.Serialization.cs} | 6 +- ...Input.cs => VMwareToAzStackHciNicInput.cs} | 10 +- ...verModelCustomProperties.Serialization.cs} | 6 +- ...ciPlannedFailoverModelCustomProperties.cs} | 10 +- ...icyModelCustomProperties.Serialization.cs} | 6 +- ...oAzStackHciPolicyModelCustomProperties.cs} | 10 +- ...iProtectedDiskProperties.Serialization.cs} | 14 +- ...areToAzStackHciProtectedDiskProperties.cs} | 14 +- ...temModelCustomProperties.Serialization.cs} | 50 +- ...kHciProtectedItemModelCustomProperties.cs} | 32 +- ...ciProtectedNicProperties.Serialization.cs} | 6 +- ...wareToAzStackHciProtectedNicProperties.cs} | 10 +- ...ionModelCustomProperties.Serialization.cs} | 38 +- ...licationExtensionModelCustomProperties.cs} | 20 +- .../VaultModelCollection.Serialization.cs | 50 - .../WorkflowModelCollection.Serialization.cs | 50 - .../src/Generated/Models/WorkflowState.cs | 72 - ...overyManagementServiceAPIRestOperations.cs | 30 +- .../DraOperationStatusRestOperations.cs | 130 -- .../RestOperations/DraRestOperations.cs | 46 +- .../EmailConfigurationRestOperations.cs | 54 +- .../RestOperations/EventRestOperations.cs | 40 +- .../FabricOperationsStatusRestOperations.cs | 124 -- .../RestOperations/FabricRestOperations.cs | 76 +- .../PolicyOperationStatusRestOperations.cs | 130 -- .../RestOperations/PolicyRestOperations.cs | 46 +- ...tectedItemOperationStatusRestOperations.cs | 130 -- .../ProtectedItemRestOperations.cs | 46 +- .../RecoveryPointsRestOperations.cs | 40 +- ...nExtensionOperationStatusRestOperations.cs | 130 -- .../ReplicationExtensionRestOperations.cs | 46 +- .../VaultOperationStatusRestOperations.cs | 124 -- .../RestOperations/VaultRestOperations.cs | 76 +- .../WorkflowOperationStatusRestOperations.cs | 130 -- .../RestOperations/WorkflowRestOperations.cs | 40 +- .../src/Generated/WorkflowModelResource.cs | 228 --- .../src/autorest.md | 185 +- sdk/resourcemanager/ci.mgmt.yml | 2 + 269 files changed, 7845 insertions(+), 6565 deletions(-) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowCollection.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowResource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{DraModelCollection.cs => DataReplicationDraCollection.cs} (65%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{DraModelData.cs => DataReplicationDraData.cs} (62%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{DraModelResource.cs => DataReplicationDraResource.cs} (57%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{EmailConfigurationModelCollection.cs => DataReplicationEmailConfigurationCollection.cs} (63%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{EmailConfigurationModelData.cs => DataReplicationEmailConfigurationData.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{EmailConfigurationModelResource.cs => DataReplicationEmailConfigurationResource.cs} (64%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{EventModelCollection.cs => DataReplicationEventCollection.cs} (62%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{EventModelData.cs => DataReplicationEventData.cs} (62%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{EventModelResource.cs => DataReplicationEventResource.cs} (64%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{FabricModelCollection.cs => DataReplicationFabricCollection.cs} (65%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{FabricModelData.cs => DataReplicationFabricData.cs} (62%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{FabricModelResource.cs => DataReplicationFabricResource.cs} (66%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{PolicyModelCollection.cs => DataReplicationPolicyCollection.cs} (64%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{PolicyModelData.cs => DataReplicationPolicyData.cs} (62%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{PolicyModelResource.cs => DataReplicationPolicyResource.cs} (56%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{ProtectedItemModelCollection.cs => DataReplicationProtectedItemCollection.cs} (62%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{ProtectedItemModelData.cs => DataReplicationProtectedItemData.cs} (60%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{ProtectedItemModelResource.cs => DataReplicationProtectedItemResource.cs} (60%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{RecoveryPointModelCollection.cs => DataReplicationRecoveryPointCollection.cs} (60%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{RecoveryPointModelData.cs => DataReplicationRecoveryPointData.cs} (60%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{RecoveryPointModelResource.cs => DataReplicationRecoveryPointResource.cs} (62%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{ReplicationExtensionModelCollection.cs => DataReplicationReplicationExtensionCollection.cs} (61%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{ReplicationExtensionModelData.cs => DataReplicationReplicationExtensionData.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{ReplicationExtensionModelResource.cs => DataReplicationReplicationExtensionResource.cs} (53%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{VaultModelCollection.cs => DataReplicationVaultCollection.cs} (65%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{VaultModelData.cs => DataReplicationVaultData.cs} (57%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{VaultModelResource.cs => DataReplicationVaultResource.cs} (67%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{WorkflowModelCollection.cs => DataReplicationWorkflowCollection.cs} (61%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/{WorkflowModelData.cs => DataReplicationWorkflowData.cs} (61%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowResource.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/{ProtectedItemModelOperationSource.cs => DataReplicationDraOperationSource.cs} (50%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationPolicyOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationProtectedItemOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationReplicationExtensionOperationSource.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationVaultOperationSource.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{AzStackHCIClusterProperties.Serialization.cs => AzStackHciClusterProperties.Serialization.cs} (91%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{AzStackHCIClusterProperties.cs => AzStackHciClusterProperties.cs} (90%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{AzStackHCIFabricModelCustomProperties.Serialization.cs => AzStackHciFabricModelCustomProperties.Serialization.cs} (76%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{AzStackHCIFabricModelCustomProperties.cs => AzStackHciFabricModelCustomProperties.cs} (77%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ProtectedItemModelData.Serialization.cs => DataReplicationDraData.Serialization.cs} (83%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ProtectedItemModelCollection.Serialization.cs => DataReplicationDraListResult.Serialization.cs} (72%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{DraModelCollection.cs => DataReplicationDraListResult.cs} (60%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{DraModelProperties.Serialization.cs => DataReplicationDraProperties.Serialization.cs} (75%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{DraModelProperties.cs => DataReplicationDraProperties.cs} (72%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EmailConfigurationModelData.Serialization.cs => DataReplicationEmailConfigurationData.Serialization.cs} (78%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationListResult.Serialization.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EmailConfigurationModelCollection.cs => DataReplicationEmailConfigurationListResult.cs} (56%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EmailConfigurationModelProperties.Serialization.cs => DataReplicationEmailConfigurationProperties.Serialization.cs} (86%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EmailConfigurationModelProperties.cs => DataReplicationEmailConfigurationProperties.cs} (75%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ErrorModel.Serialization.cs => DataReplicationErrorInfo.Serialization.cs} (87%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ErrorModel.cs => DataReplicationErrorInfo.cs} (81%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{RecoveryPointModelData.Serialization.cs => DataReplicationEventData.Serialization.cs} (80%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{PolicyModelCollection.Serialization.cs => DataReplicationEventListResult.Serialization.cs} (69%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EventModelCollection.cs => DataReplicationEventListResult.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EventModelProperties.Serialization.cs => DataReplicationEventProperties.Serialization.cs} (75%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EventModelProperties.cs => DataReplicationEventProperties.cs} (76%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{FabricModelData.Serialization.cs => DataReplicationFabricData.Serialization.cs} (87%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EventModelCollection.Serialization.cs => DataReplicationFabricListResult.Serialization.cs} (68%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{FabricModelCollection.cs => DataReplicationFabricListResult.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{FabricModelPatch.Serialization.cs => DataReplicationFabricPatch.Serialization.cs} (93%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{FabricModelPatch.cs => DataReplicationFabricPatch.cs} (69%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{FabricModelProperties.Serialization.cs => DataReplicationFabricProperties.Serialization.cs} (64%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{FabricModelProperties.cs => DataReplicationFabricProperties.cs} (65%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HealthErrorModel.Serialization.cs => DataReplicationHealthErrorInfo.Serialization.cs} (84%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HealthErrorModel.cs => DataReplicationHealthErrorInfo.cs} (83%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthStatus.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{IdentityModel.Serialization.cs => DataReplicationIdentity.Serialization.cs} (89%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{IdentityModel.cs => DataReplicationIdentity.cs} (90%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{InnerHealthErrorModel.Serialization.cs => DataReplicationInnerHealthErrorInfo.Serialization.cs} (87%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{InnerHealthErrorModel.cs => DataReplicationInnerHealthErrorInfo.cs} (83%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{CheckNameAvailabilityModel.Serialization.cs => DataReplicationNameAvailabilityContent.Serialization.cs} (82%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{CheckNameAvailabilityModel.cs => DataReplicationNameAvailabilityContent.cs} (61%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{CheckNameAvailabilityResponseModel.Serialization.cs => DataReplicationNameAvailabilityResult.Serialization.cs} (80%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{CheckNameAvailabilityResponseModel.cs => DataReplicationNameAvailabilityResult.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{PolicyModelData.Serialization.cs => DataReplicationPolicyData.Serialization.cs} (81%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{DraModelCollection.Serialization.cs => DataReplicationPolicyListResult.Serialization.cs} (68%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{PolicyModelCollection.cs => DataReplicationPolicyListResult.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{PolicyModelProperties.Serialization.cs => DataReplicationPolicyProperties.Serialization.cs} (73%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{PolicyModelProperties.cs => DataReplicationPolicyProperties.cs} (67%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{DraModelData.Serialization.cs => DataReplicationProtectedItemData.Serialization.cs} (80%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemListResult.Serialization.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ProtectedItemModelCollection.cs => DataReplicationProtectedItemListResult.cs} (58%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ProtectedItemModelProperties.Serialization.cs => DataReplicationProtectedItemProperties.Serialization.cs} (76%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ProtectedItemModelProperties.cs => DataReplicationProtectedItemProperties.cs} (70%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectionState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProvisioningState.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{WorkflowModelData.Serialization.cs => DataReplicationRecoveryPointData.Serialization.cs} (78%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointListResult.Serialization.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{RecoveryPointModelCollection.cs => DataReplicationRecoveryPointListResult.cs} (58%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{RecoveryPointModelProperties.Serialization.cs => DataReplicationRecoveryPointProperties.Serialization.cs} (71%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{RecoveryPointModelProperties.cs => DataReplicationRecoveryPointProperties.cs} (78%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionData.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionListResult.Serialization.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ReplicationExtensionModelCollection.cs => DataReplicationReplicationExtensionListResult.cs} (56%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ReplicationExtensionModelProperties.Serialization.cs => DataReplicationReplicationExtensionProperties.Serialization.cs} (71%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{ReplicationExtensionModelProperties.cs => DataReplicationReplicationExtensionProperties.cs} (65%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationVaultType.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationResynchronizationState.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{TaskModel.Serialization.cs => DataReplicationTask.Serialization.cs} (77%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{TaskModel.cs => DataReplicationTask.cs} (72%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTestFailoverState.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VaultModelData.Serialization.cs => DataReplicationVaultData.Serialization.cs} (87%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{FabricModelCollection.Serialization.cs => DataReplicationVaultListResult.Serialization.cs} (69%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VaultModelCollection.cs => DataReplicationVaultListResult.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VaultModelPatch.Serialization.cs => DataReplicationVaultPatch.Serialization.cs} (93%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VaultModelPatch.cs => DataReplicationVaultPatch.cs} (69%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VaultModelProperties.Serialization.cs => DataReplicationVaultProperties.Serialization.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VaultModelProperties.cs => DataReplicationVaultProperties.cs} (56%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EventModelData.Serialization.cs => DataReplicationWorkflowData.Serialization.cs} (79%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{EmailConfigurationModelCollection.Serialization.cs => DataReplicationWorkflowListResult.Serialization.cs} (71%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{WorkflowModelCollection.cs => DataReplicationWorkflowListResult.cs} (59%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{WorkflowModelProperties.Serialization.cs => DataReplicationWorkflowProperties.Serialization.cs} (81%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{WorkflowModelProperties.cs => DataReplicationWorkflowProperties.cs} (83%) create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowState.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.Serialization.cs create mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIDiskInput.Serialization.cs => HyperVToAzStackHciDiskInput.Serialization.cs} (84%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIDiskInput.cs => HyperVToAzStackHciDiskInput.cs} (87%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs => HyperVToAzStackHciEventModelCustomProperties.Serialization.cs} (89%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIEventModelCustomProperties.cs => HyperVToAzStackHciEventModelCustomProperties.cs} (90%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCINicInput.Serialization.cs => HyperVToAzStackHciNicInput.Serialization.cs} (91%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCINicInput.cs => HyperVToAzStackHciNicInput.cs} (92%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs => HyperVToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs} (85%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs => HyperVToAzStackHciPlannedFailoverModelCustomProperties.cs} (81%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs => HyperVToAzStackHciPolicyModelCustomProperties.Serialization.cs} (90%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIPolicyModelCustomProperties.cs => HyperVToAzStackHciPolicyModelCustomProperties.cs} (91%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs => HyperVToAzStackHciProtectedDiskProperties.Serialization.cs} (87%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIProtectedDiskProperties.cs => HyperVToAzStackHciProtectedDiskProperties.cs} (84%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs => HyperVToAzStackHciProtectedItemModelCustomProperties.Serialization.cs} (88%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIProtectedItemModelCustomProperties.cs => HyperVToAzStackHciProtectedItemModelCustomProperties.cs} (85%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIProtectedNicProperties.Serialization.cs => HyperVToAzStackHciProtectedNicProperties.Serialization.cs} (89%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIProtectedNicProperties.cs => HyperVToAzStackHciProtectedNicProperties.cs} (88%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs => HyperVToAzStackHciRecoveryPointModelCustomProperties.Serialization.cs} (85%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs => HyperVToAzStackHciRecoveryPointModelCustomProperties.cs} (79%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs => HyperVToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs} (84%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs => HyperVToAzStackHciReplicationExtensionModelCustomProperties.cs} (82%) delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIDiskInput.Serialization.cs => VMwareToAzStackHciDiskInput.Serialization.cs} (92%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIDiskInput.cs => VMwareToAzStackHciDiskInput.cs} (92%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCINicInput.Serialization.cs => VMwareToAzStackHciNicInput.Serialization.cs} (91%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCINicInput.cs => VMwareToAzStackHciNicInput.cs} (93%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs => VMwareToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs} (85%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs => VMwareToAzStackHciPlannedFailoverModelCustomProperties.cs} (81%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs => VMwareToAzStackHciPolicyModelCustomProperties.Serialization.cs} (90%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIPolicyModelCustomProperties.cs => VMwareToAzStackHciPolicyModelCustomProperties.cs} (91%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs => VMwareToAzStackHciProtectedDiskProperties.Serialization.cs} (87%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIProtectedDiskProperties.cs => VMwareToAzStackHciProtectedDiskProperties.cs} (84%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs => VMwareToAzStackHciProtectedItemModelCustomProperties.Serialization.cs} (90%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIProtectedItemModelCustomProperties.cs => VMwareToAzStackHciProtectedItemModelCustomProperties.cs} (85%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIProtectedNicProperties.Serialization.cs => VMwareToAzStackHciProtectedNicProperties.Serialization.cs} (92%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIProtectedNicProperties.cs => VMwareToAzStackHciProtectedNicProperties.cs} (90%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs => VMwareToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs} (80%) rename sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/{VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs => VMwareToAzStackHciReplicationExtensionModelCustomProperties.cs} (81%) delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs delete mode 100644 sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/src/autorest.md b/sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/src/autorest.md index c9092189954e..006847c1f940 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/src/autorest.md +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight.Containers/src/autorest.md @@ -11,6 +11,9 @@ require: https://github.com/Azure/azure-rest-api-specs/blob/5372f410f6af3de9559b # tag: package-2023-06-preview output-folder: $(this-folder)/Generated clear-output-folder: true +sample-gen: + output-folder: $(this-folder)/../samples/Generated + clear-output-folder: true skip-csproj: true modelerfour: flatten-payloads: false @@ -88,7 +91,7 @@ format-by-name-rules: '*Uri': 'Uri' '*Uris': 'Uri' -rename-rules: +acronym-mapping: CPU: Cpu CPUs: Cpus Os: OS diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs index 442356c0cb6d..1c9784be7f29 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs @@ -1,533 +1,484 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class DraModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DataReplicationDraCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected DraModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected DataReplicationDraCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DraModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationDraData : Azure.ResourceManager.Models.ResourceData { - public DraModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties properties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties Properties { get { throw null; } set { } } + public DataReplicationDraData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDraProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDraProperties Properties { get { throw null; } set { } } } - public partial class DraModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationDraResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected DraModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData Data { get { throw null; } } + protected DataReplicationDraResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDraOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDraOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class EmailConfigurationModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected EmailConfigurationModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationEmailConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationEmailConfigurationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class EmailConfigurationModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationEmailConfigurationData : Azure.ResourceManager.Models.ResourceData { - public EmailConfigurationModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties properties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties Properties { get { throw null; } set { } } + public DataReplicationEmailConfigurationData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties Properties { get { throw null; } set { } } } - public partial class EmailConfigurationModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationEmailConfigurationResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected EmailConfigurationModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData Data { get { throw null; } } + protected DataReplicationEmailConfigurationResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class EventModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DataReplicationEventCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected EventModelCollection() { } + protected DataReplicationEventCollection() { } public virtual Azure.Response Exists(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class EventModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationEventData : Azure.ResourceManager.Models.ResourceData { - internal EventModelData() { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties Properties { get { throw null; } } + internal DataReplicationEventData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties Properties { get { throw null; } } } - public partial class EventModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationEventResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected EventModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EventModelData Data { get { throw null; } } + protected DataReplicationEventResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string eventName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class FabricModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DataReplicationFabricCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected FabricModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected DataReplicationFabricCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class FabricModelData : Azure.ResourceManager.Models.TrackedResourceData + public partial class DataReplicationFabricData : Azure.ResourceManager.Models.TrackedResourceData { - public FabricModelData(Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties properties) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties Properties { get { throw null; } set { } } + public DataReplicationFabricData(Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties properties) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties Properties { get { throw null; } set { } } } - public partial class FabricModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationFabricResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected FabricModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData Data { get { throw null; } } + protected DataReplicationFabricResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDraModel(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDraModelAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DraModelCollection GetDraModels() { throw null; } - public virtual Azure.Response GetFabricOperationsStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetFabricOperationsStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class PolicyModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected PolicyModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationDra(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationDraAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraCollection GetDataReplicationDras() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class PolicyModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationPolicyData : Azure.ResourceManager.Models.ResourceData { - public PolicyModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties properties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties Properties { get { throw null; } set { } } + public DataReplicationPolicyData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties Properties { get { throw null; } set { } } } - public partial class PolicyModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationPolicyResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected PolicyModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData Data { get { throw null; } } + protected DataReplicationPolicyResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetPolicyOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPolicyOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ProtectedItemModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ProtectedItemModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationProtectedItemCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationProtectedItemCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ProtectedItemModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationProtectedItemData : Azure.ResourceManager.Models.ResourceData { - public ProtectedItemModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties properties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties Properties { get { throw null; } set { } } + public DataReplicationProtectedItemData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties Properties { get { throw null; } set { } } } - public partial class ProtectedItemModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationProtectedItemResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected ProtectedItemModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData Data { get { throw null; } } + protected DataReplicationProtectedItemResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetProtectedItemOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetProtectedItemOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRecoveryPointModel(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetRecoveryPointModelAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelCollection GetRecoveryPointModels() { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationRecoveryPoint(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationRecoveryPointAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointCollection GetDataReplicationRecoveryPoints() { throw null; } public virtual Azure.ResourceManager.ArmOperation PlannedFailover(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PlannedFailoverAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class RecoveryPointModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DataReplicationRecoveryPointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected RecoveryPointModelCollection() { } + protected DataReplicationRecoveryPointCollection() { } public virtual Azure.Response Exists(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class RecoveryPointModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationRecoveryPointData : Azure.ResourceManager.Models.ResourceData { - internal RecoveryPointModelData() { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties Properties { get { throw null; } } + internal DataReplicationRecoveryPointData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties Properties { get { throw null; } } } - public partial class RecoveryPointModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationRecoveryPointResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected RecoveryPointModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelData Data { get { throw null; } } + protected DataReplicationRecoveryPointResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public static partial class RecoveryServicesDataReplicationExtensions + public partial class DataReplicationReplicationExtensionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - public static Azure.Response CheckNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.CheckNameAvailabilityModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CheckNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.CheckNameAvailabilityModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response DeploymentPreflight(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> DeploymentPreflightAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.DraModelResource GetDraModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelResource GetEmailConfigurationModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.EventModelResource GetEventModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetFabricModel(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetFabricModelAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelResource GetFabricModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelCollection GetFabricModels(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetFabricModels(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetFabricModelsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelResource GetPolicyModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelResource GetProtectedItemModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelResource GetRecoveryPointModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelResource GetReplicationExtensionModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetVaultModel(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetVaultModelAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelResource GetVaultModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelCollection GetVaultModels(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetVaultModels(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetVaultModelsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelResource GetWorkflowModelResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - } - public partial class ReplicationExtensionModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ReplicationExtensionModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected DataReplicationReplicationExtensionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ReplicationExtensionModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationReplicationExtensionData : Azure.ResourceManager.Models.ResourceData { - public ReplicationExtensionModelData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties properties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties Properties { get { throw null; } set { } } + public DataReplicationReplicationExtensionData(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationExtensionProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationExtensionProperties Properties { get { throw null; } set { } } } - public partial class ReplicationExtensionModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationReplicationExtensionResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected ReplicationExtensionModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData Data { get { throw null; } } + protected DataReplicationReplicationExtensionResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetReplicationExtensionOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetReplicationExtensionOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class VaultModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected VaultModelCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationVaultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationVaultCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class VaultModelData : Azure.ResourceManager.Models.TrackedResourceData + public partial class DataReplicationVaultData : Azure.ResourceManager.Models.TrackedResourceData { - public VaultModelData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties Properties { get { throw null; } set { } } + public DataReplicationVaultData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties Properties { get { throw null; } set { } } } - public partial class VaultModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationVaultResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected VaultModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData Data { get { throw null; } } + protected DataReplicationVaultResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetEmailConfigurationModel(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetEmailConfigurationModelAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelCollection GetEmailConfigurationModels() { throw null; } - public virtual Azure.Response GetEventModel(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetEventModelAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.EventModelCollection GetEventModels() { throw null; } - public virtual Azure.Response GetPolicyModel(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPolicyModelAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelCollection GetPolicyModels() { throw null; } - public virtual Azure.Response GetProtectedItemModel(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetProtectedItemModelAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelCollection GetProtectedItemModels() { throw null; } - public virtual Azure.Response GetReplicationExtensionModel(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetReplicationExtensionModelAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelCollection GetReplicationExtensionModels() { throw null; } - public virtual Azure.Response GetVaultOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetVaultOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkflowModel(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkflowModelAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelCollection GetWorkflowModels() { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class WorkflowModelCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected WorkflowModelCollection() { } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationEmailConfiguration(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationEmailConfigurationAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationCollection GetDataReplicationEmailConfigurations() { throw null; } + public virtual Azure.Response GetDataReplicationEvent(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationEventAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventCollection GetDataReplicationEvents() { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyCollection GetDataReplicationPolicies() { throw null; } + public virtual Azure.Response GetDataReplicationPolicy(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPolicyAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationProtectedItem(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationProtectedItemAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemCollection GetDataReplicationProtectedItems() { throw null; } + public virtual Azure.Response GetDataReplicationReplicationExtension(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationReplicationExtensionAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionCollection GetDataReplicationReplicationExtensions() { throw null; } + public virtual Azure.Response GetDataReplicationWorkflow(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationWorkflowAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationWorkflowCollection GetDataReplicationWorkflows() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationWorkflowCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationWorkflowCollection() { } public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class WorkflowModelData : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationWorkflowData : Azure.ResourceManager.Models.ResourceData { - internal WorkflowModelData() { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties Properties { get { throw null; } } + internal DataReplicationWorkflowData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowProperties Properties { get { throw null; } } } - public partial class WorkflowModelResource : Azure.ResourceManager.ArmResource + public partial class DataReplicationWorkflowResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected WorkflowModelResource() { } - public virtual Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData Data { get { throw null; } } + protected DataReplicationWorkflowResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationWorkflowData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkflowOperationStatu(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkflowOperationStatuAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class RecoveryServicesDataReplicationExtensions + { + public static Azure.Response CheckDataReplicationNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckDataReplicationNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response DeploymentPreflight(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> DeploymentPreflightAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraResource GetDataReplicationDraResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventResource GetDataReplicationEventResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDataReplicationFabric(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDataReplicationFabricAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricResource GetDataReplicationFabricResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricCollection GetDataReplicationFabrics(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDataReplicationFabrics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDataReplicationFabricsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyResource GetDataReplicationPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionResource GetDataReplicationReplicationExtensionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDataReplicationVault(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDataReplicationVaultAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultResource GetDataReplicationVaultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultCollection GetDataReplicationVaults(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDataReplicationVaults(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDataReplicationVaultsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationWorkflowResource GetDataReplicationWorkflowResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } } namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { public static partial class ArmRecoveryServicesDataReplicationModelFactory { - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIFabricModelCustomProperties AzStackHCIFabricModelCustomProperties(string azStackHciSiteId = null, System.Collections.Generic.IEnumerable applianceName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties cluster = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.CheckNameAvailabilityResponseModel CheckNameAvailabilityResponseModel(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.DraModelData DraModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelProperties DraModelProperties(string correlationId = null, string machineId = null, string machineName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel authenticationIdentity = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel resourceAccessIdentity = null, bool? isResponsive = default(bool?), System.DateTimeOffset? lastHeartbeat = default(System.DateTimeOffset?), string versionNumber = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties customProperties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.EmailConfigurationModelData EmailConfigurationModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EmailConfigurationModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ErrorModel ErrorModel(string code = null, string errorModelType = null, string severity = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string message = null, string causes = null, string recommendation = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.EventModelData EventModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelProperties EventModelProperties(string resourceType = null, string resourceName = null, string eventType = null, string eventName = null, System.DateTimeOffset? timeOfOccurrence = default(System.DateTimeOffset?), string severity = null, string description = null, string correlationId = null, System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties customProperties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.FabricModelData FabricModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties FabricModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), string serviceEndpoint = null, string serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? health = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciFabricModelCustomProperties AzStackHciFabricModelCustomProperties(Azure.Core.ResourceIdentifier azStackHciSiteId = null, System.Collections.Generic.IEnumerable applianceName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties cluster = null, Azure.Core.ResourceIdentifier fabricResourceId = null, string fabricContainerId = null, Azure.Core.ResourceIdentifier migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationDraData DataReplicationDraData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDraProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDraProperties DataReplicationDraProperties(string correlationId = null, string machineId = null, string machineName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity authenticationIdentity = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity resourceAccessIdentity = null, bool? isResponsive = default(bool?), System.DateTimeOffset? lastHeartbeatOn = default(System.DateTimeOffset?), string versionNumber = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData DataReplicationEmailConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationErrorInfo DataReplicationErrorInfo(string code = null, string errorModelType = null, string severity = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData DataReplicationEventData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties DataReplicationEventProperties(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string resourceName = null, string eventType = null, string eventName = null, System.DateTimeOffset? occurredOn = default(System.DateTimeOffset?), string severity = null, string description = null, string correlationId = null, System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData DataReplicationFabricData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties DataReplicationFabricProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), string serviceEndpoint = null, Azure.Core.ResourceIdentifier serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? health = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthErrorInfo DataReplicationHealthErrorInfo(string affectedResourceType = null, System.Collections.Generic.IEnumerable affectedResourceCorrelationIds = null, System.Collections.Generic.IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationInnerHealthErrorInfo DataReplicationInnerHealthErrorInfo(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityResult DataReplicationNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData DataReplicationPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties DataReplicationPolicyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData DataReplicationProtectedItemData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties DataReplicationProtectedItemProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState? protectionState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState?), string protectionStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState? testFailoverState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState?), string testFailoverStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState? resynchronizationState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState?), string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string draId = null, string targetDraId = null, bool? isResyncRequired = default(bool?), System.DateTimeOffset? lastSuccessfulPlannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulUnplannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulTestFailoverOn = default(System.DateTimeOffset?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties currentJob = null, System.Collections.Generic.IEnumerable allowedJobs = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastFailedEnableProtectionJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastFailedPlannedFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastTestFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? replicationHealth = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData DataReplicationRecoveryPointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties DataReplicationRecoveryPointProperties(System.DateTimeOffset recoveryPointOn = default(System.DateTimeOffset), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType recoveryPointType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationReplicationExtensionData DataReplicationReplicationExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationExtensionProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationExtensionProperties DataReplicationReplicationExtensionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTask DataReplicationTask(string taskName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string customInstanceType = null, System.Collections.Generic.IEnumerable childrenWorkflows = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData DataReplicationVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties DataReplicationVaultProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.Core.ResourceIdentifier serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType? vaultType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationWorkflowData DataReplicationWorkflowData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowProperties DataReplicationWorkflowProperties(string displayName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? objectType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType?), string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, System.Collections.Generic.IEnumerable allowedActions = null, string activityId = null, System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties customProperties = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties FailoverProtectedItemProperties(string protectedItemName = null, string vmName = null, string testVmName = null, string recoveryPointId = null, System.DateTimeOffset? recoveryPointOn = default(System.DateTimeOffset?), string networkName = null, string subnet = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverWorkflowModelCustomProperties FailoverWorkflowModelCustomProperties(System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthErrorModel HealthErrorModel(string affectedResourceType = null, System.Collections.Generic.IEnumerable affectedResourceCorrelationIds = null, System.Collections.Generic.IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelCustomProperties(string hyperVSiteId = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIEventModelCustomProperties HyperVToAzStackHCIEventModelCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCINicInput HyperVToAzStackHCINicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIProtectedDiskProperties HyperVToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIProtectedItemModelCustomProperties HyperVToAzStackHCIProtectedItemModelCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string fabricDiscoveryMachineId = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string targetVmName = null, string targetResourceGroupId = null, string storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceived = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIProtectedNicProperties HyperVToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIRecoveryPointModelCustomProperties HyperVToAzStackHCIRecoveryPointModelCustomProperties(System.Collections.Generic.IEnumerable diskIds = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHCIReplicationExtensionModelCustomProperties HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId = null, string hyperVSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.InnerHealthErrorModel InnerHealthErrorModel(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.OperationStatus OperationStatus(string id = null, string name = null, string status = null, string startTime = null, string endTime = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.PolicyModelData PolicyModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelProperties PolicyModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelCustomProperties(Azure.Core.ResourceIdentifier hyperVSiteId = null, Azure.Core.ResourceIdentifier fabricResourceId = null, string fabricContainerId = null, Azure.Core.ResourceIdentifier migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciEventModelCustomProperties HyperVToAzStackHciEventModelCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciNicInput HyperVToAzStackHciNicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedDiskProperties HyperVToAzStackHciProtectedDiskProperties(Azure.Core.ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemModelCustomProperties HyperVToAzStackHciProtectedItemModelCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), Azure.Core.ResourceIdentifier targetHciClusterId = null, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string targetVmName = null, Azure.Core.ResourceIdentifier targetResourceGroupId = null, Azure.Core.ResourceIdentifier storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceived = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedNicProperties HyperVToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciRecoveryPointModelCustomProperties HyperVToAzStackHciRecoveryPointModelCustomProperties(System.Collections.Generic.IEnumerable diskIds = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciReplicationExtensionModelCustomProperties HyperVToAzStackHciReplicationExtensionModelCustomProperties(Azure.Core.ResourceIdentifier hyperVFabricArmId = null, Azure.Core.ResourceIdentifier hyperVSiteId = null, Azure.Core.ResourceIdentifier azStackHciFabricArmId = null, Azure.Core.ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties ProtectedItemJobProperties(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.ProtectedItemModelData ProtectedItemModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelProperties ProtectedItemModelProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState? protectionState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState?), string protectionStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState? testFailoverState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState?), string testFailoverStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState? resynchronizationState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState?), string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string draId = null, string targetDraId = null, bool? resyncRequired = default(bool?), System.DateTimeOffset? lastSuccessfulPlannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulUnplannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulTestFailoverOn = default(System.DateTimeOffset?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob currentJob = null, System.Collections.Generic.IEnumerable allowedJobs = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob lastFailedEnableProtectionJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob lastFailedPlannedFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob lastTestFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? replicationHealth = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties customProperties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob ProtectedItemModelPropertiesCurrentJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob ProtectedItemModelPropertiesLastFailedEnableProtectionJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob ProtectedItemModelPropertiesLastTestFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.RecoveryPointModelData RecoveryPointModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelProperties RecoveryPointModelProperties(System.DateTimeOffset recoveryPointOn = default(System.DateTimeOffset), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType recoveryPointType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties customProperties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.ReplicationExtensionModelData ReplicationExtensionModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelProperties ReplicationExtensionModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties customProperties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskModel TaskModel(string taskName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string customInstanceType = null, System.Collections.Generic.IEnumerable childrenWorkflows = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupWorkflowModelCustomProperties TestFailoverCleanupWorkflowModelCustomProperties(System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null, string comments = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverWorkflowModelCustomProperties TestFailoverWorkflowModelCustomProperties(System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.VaultModelData VaultModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties VaultModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState?), string serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType? vaultType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCINicInput VMwareToAzStackHCINicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedDiskProperties VMwareToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedItemModelCustomProperties VMwareToAzStackHCIProtectedItemModelCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string storageContainerId = null, string targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string osType = null, string osName = null, string firmwareType = null, string fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceived = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), long? resyncRetryCount = default(long?), bool? resyncRequired = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? resyncState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState?), bool? performAutoResync = default(bool?), long? resumeRetryCount = default(long?), System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = default(bool?), string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHCIReplicationExtensionModelCustomProperties VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId = null, string vmwareSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciNicInput VMwareToAzStackHciNicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedDiskProperties VMwareToAzStackHciProtectedDiskProperties(Azure.Core.ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemModelCustomProperties VMwareToAzStackHciProtectedItemModelCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), Azure.Core.ResourceIdentifier targetHciClusterId = null, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, Azure.Core.ResourceIdentifier storageContainerId = null, Azure.Core.ResourceIdentifier targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string osType = null, string osName = null, string firmwareType = null, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceived = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), long? resyncRetryCount = default(long?), bool? resyncRequired = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? resyncState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState?), bool? performAutoResync = default(bool?), long? resumeRetryCount = default(long?), System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedNicProperties VMwareToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = default(bool?), string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciReplicationExtensionModelCustomProperties VMwareToAzStackHciReplicationExtensionModelCustomProperties(Azure.Core.ResourceIdentifier vmwareFabricArmId = null, Azure.Core.ResourceIdentifier vmwareSiteId = null, Azure.Core.ResourceIdentifier azStackHciFabricArmId = null, Azure.Core.ResourceIdentifier azStackHciSiteId = null, Azure.Core.ResourceIdentifier storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties WorkflowModelCustomProperties(string instanceType = null, System.Collections.Generic.IReadOnlyDictionary affectedObjectDetails = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.WorkflowModelData WorkflowModelData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties properties = null) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelProperties WorkflowModelProperties(string displayName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? objectType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType?), string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, System.Collections.Generic.IEnumerable allowedActions = null, string activityId = null, System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties customProperties = null) { throw null; } } - public partial class AzStackHCIClusterProperties + public partial class AzStackHciClusterProperties { - public AzStackHCIClusterProperties(string clusterName, string resourceName, string storageAccountName, System.Collections.Generic.IEnumerable storageContainers) { } + public AzStackHciClusterProperties(string clusterName, string resourceName, string storageAccountName, System.Collections.Generic.IEnumerable storageContainers) { } public string ClusterName { get { throw null; } set { } } public string ResourceName { get { throw null; } set { } } public string StorageAccountName { get { throw null; } set { } } public System.Collections.Generic.IList StorageContainers { get { throw null; } } } - public partial class AzStackHCIFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties + public partial class AzStackHciFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties { - public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties cluster, string migrationSolutionId) { } + public AzStackHciFabricModelCustomProperties(Azure.Core.ResourceIdentifier azStackHciSiteId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties cluster, Azure.Core.ResourceIdentifier migrationSolutionId) { } public System.Collections.Generic.IReadOnlyList ApplianceName { get { throw null; } } - public string AzStackHciSiteId { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHCIClusterProperties Cluster { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties Cluster { get { throw null; } set { } } public string FabricContainerId { get { throw null; } } - public string FabricResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier FabricResourceId { get { throw null; } } public System.Uri MigrationHubUri { get { throw null; } } - public string MigrationSolutionId { get { throw null; } set { } } - } - public partial class CheckNameAvailabilityModel - { - public CheckNameAvailabilityModel() { } - public string Name { get { throw null; } set { } } - public string ResourceType { get { throw null; } set { } } - } - public partial class CheckNameAvailabilityResponseModel - { - internal CheckNameAvailabilityResponseModel() { } - public string Message { get { throw null; } } - public bool? NameAvailable { get { throw null; } } - public string Reason { get { throw null; } } - } - public partial class DeploymentPreflightModel - { - public DeploymentPreflightModel() { } - public System.Collections.Generic.IList Resources { get { throw null; } } - } - public partial class DeploymentPreflightResource - { - public DeploymentPreflightResource() { } - public string ApiVersion { get { throw null; } set { } } - public string DeploymentPreflightResourceType { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - } - public abstract partial class DraModelCustomProperties - { - protected DraModelCustomProperties() { } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } } - public partial class DraModelProperties + public partial class DataReplicationDraProperties { - public DraModelProperties(string machineId, string machineName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel authenticationIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel resourceAccessIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties customProperties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel AuthenticationIdentity { get { throw null; } set { } } + public DataReplicationDraProperties(string machineId, string machineName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity authenticationIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity resourceAccessIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity AuthenticationIdentity { get { throw null; } set { } } public string CorrelationId { get { throw null; } } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties CustomProperties { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } public bool? IsResponsive { get { throw null; } } - public System.DateTimeOffset? LastHeartbeat { get { throw null; } } + public System.DateTimeOffset? LastHeartbeatOn { get { throw null; } } public string MachineId { get { throw null; } set { } } public string MachineName { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel ResourceAccessIdentity { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity ResourceAccessIdentity { get { throw null; } set { } } public string VersionNumber { get { throw null; } } } - public partial class EmailConfigurationModelProperties + public partial class DataReplicationEmailConfigurationProperties { - public EmailConfigurationModelProperties(bool sendToOwners) { } + public DataReplicationEmailConfigurationProperties(bool sendToOwners) { } public System.Collections.Generic.IList CustomEmailAddresses { get { throw null; } } public string Locale { get { throw null; } set { } } public bool SendToOwners { get { throw null; } set { } } } - public partial class ErrorModel + public partial class DataReplicationErrorInfo { - internal ErrorModel() { } + internal DataReplicationErrorInfo() { } public string Causes { get { throw null; } } public string Code { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } @@ -536,68 +487,87 @@ internal ErrorModel() { } public string Recommendation { get { throw null; } } public string Severity { get { throw null; } } } - public abstract partial class EventModelCustomProperties + public partial class DataReplicationEventProperties { - protected EventModelCustomProperties() { } - } - public partial class EventModelProperties - { - internal EventModelProperties() { } + internal DataReplicationEventProperties() { } public string CorrelationId { get { throw null; } } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties CustomProperties { get { throw null; } } public string Description { get { throw null; } } public string EventName { get { throw null; } } public string EventType { get { throw null; } } - public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public System.DateTimeOffset? OccurredOn { get { throw null; } } public string ResourceName { get { throw null; } } - public string ResourceType { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } public string Severity { get { throw null; } } - public System.DateTimeOffset? TimeOfOccurrence { get { throw null; } } - } - public abstract partial class FabricModelCustomProperties - { - protected FabricModelCustomProperties() { } } - public partial class FabricModelPatch : Azure.ResourceManager.Models.ResourceData + public partial class DataReplicationFabricPatch : Azure.ResourceManager.Models.ResourceData { - public FabricModelPatch() { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelProperties Properties { get { throw null; } set { } } + public DataReplicationFabricPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class FabricModelProperties + public partial class DataReplicationFabricProperties { - public FabricModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties customProperties) { } + public DataReplicationFabricProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties customProperties) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties CustomProperties { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? Health { get { throw null; } } - public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? Health { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } public string ServiceEndpoint { get { throw null; } } - public string ServiceResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceResourceId { get { throw null; } } } - public partial class FailoverProtectedItemProperties + public partial class DataReplicationHealthErrorInfo { - internal FailoverProtectedItemProperties() { } - public string NetworkName { get { throw null; } } - public string ProtectedItemName { get { throw null; } } - public string RecoveryPointId { get { throw null; } } - public System.DateTimeOffset? RecoveryPointOn { get { throw null; } } - public string Subnet { get { throw null; } } - public string TestVmName { get { throw null; } } - public string VmName { get { throw null; } } + internal DataReplicationHealthErrorInfo() { } + public System.Collections.Generic.IReadOnlyList AffectedResourceCorrelationIds { get { throw null; } } + public string AffectedResourceType { get { throw null; } } + public string Category { get { throw null; } } + public string Causes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildErrors { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string HealthCategory { get { throw null; } } + public bool? IsCustomerResolvable { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Source { get { throw null; } } + public string Summary { get { throw null; } } } - public partial class FailoverWorkflowModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationHealthStatus : System.IEquatable { - internal FailoverWorkflowModelCustomProperties() { } - public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationHealthStatus(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Critical { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Normal { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus right) { throw null; } + public override string ToString() { throw null; } } - public partial class HealthErrorModel + public partial class DataReplicationIdentity { - internal HealthErrorModel() { } - public System.Collections.Generic.IReadOnlyList AffectedResourceCorrelationIds { get { throw null; } } - public string AffectedResourceType { get { throw null; } } + public DataReplicationIdentity(System.Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) { } + public string AadAuthority { get { throw null; } set { } } + public string ApplicationId { get { throw null; } set { } } + public string Audience { get { throw null; } set { } } + public string ObjectId { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + } + public partial class DataReplicationInnerHealthErrorInfo + { + internal DataReplicationInnerHealthErrorInfo() { } public string Category { get { throw null; } } public string Causes { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ChildErrors { get { throw null; } } public string Code { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string HealthCategory { get { throw null; } } @@ -608,77 +578,451 @@ internal HealthErrorModel() { } public string Source { get { throw null; } } public string Summary { get { throw null; } } } + public partial class DataReplicationNameAvailabilityContent + { + public DataReplicationNameAvailabilityContent() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } set { } } + } + public partial class DataReplicationNameAvailabilityResult + { + internal DataReplicationNameAvailabilityResult() { } + public bool? IsNameAvailable { get { throw null; } } + public string Message { get { throw null; } } + public string Reason { get { throw null; } } + } + public partial class DataReplicationPolicyProperties + { + public DataReplicationPolicyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class DataReplicationProtectedItemProperties + { + public DataReplicationProtectedItemProperties(string policyName, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties customProperties) { } + public System.Collections.Generic.IReadOnlyList AllowedJobs { get { throw null; } } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties CurrentJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties CustomProperties { get { throw null; } set { } } + public string DraId { get { throw null; } } + public string FabricId { get { throw null; } } + public string FabricObjectId { get { throw null; } } + public string FabricObjectName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public bool? IsResyncRequired { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastFailedEnableProtectionJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastFailedPlannedFailoverJob { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulPlannedFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulTestFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastTestFailoverJob { get { throw null; } } + public string PolicyName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState? ProtectionState { get { throw null; } } + public string ProtectionStateDescription { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ReplicationExtensionName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? ReplicationHealth { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState? ResynchronizationState { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public string TargetDraId { get { throw null; } } + public string TargetFabricId { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState? TestFailoverState { get { throw null; } } + public string TestFailoverStateDescription { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationProtectionState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState DisablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState DisablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState EnablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState EnablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationCompletedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationCompletedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationInProgress { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState Protected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ProtectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ProtectedStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnprotectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnprotectedStatesEnd { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationRecoveryPointProperties + { + internal DataReplicationRecoveryPointProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties CustomProperties { get { throw null; } } + public System.DateTimeOffset RecoveryPointOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType RecoveryPointType { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationRecoveryPointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationRecoveryPointType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType ApplicationConsistent { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType CrashConsistent { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationReplicationExtensionProperties + { + public DataReplicationReplicationExtensionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationReplicationVaultType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationReplicationVaultType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType DisasterRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType Migrate { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationResynchronizationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationResynchronizationState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationTask + { + internal DataReplicationTask() { } + public System.Collections.Generic.IReadOnlyList ChildrenWorkflows { get { throw null; } } + public string CustomInstanceType { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState? State { get { throw null; } } + public string TaskName { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationTaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationTaskState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Skipped { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationTestFailoverState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationTestFailoverState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCleanupCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCleanupInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationVaultPatch : Azure.ResourceManager.Models.ResourceData + { + public DataReplicationVaultPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class DataReplicationVaultProperties + { + public DataReplicationVaultProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceResourceId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationReplicationVaultType? VaultType { get { throw null; } set { } } + } + public partial class DataReplicationWorkflowProperties + { + internal DataReplicationWorkflowProperties() { } + public string ActivityId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AllowedActions { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties CustomProperties { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ObjectId { get { throw null; } } + public string ObjectInternalId { get { throw null; } } + public string ObjectInternalName { get { throw null; } } + public string ObjectName { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? ObjectType { get { throw null; } } + public string ReplicationProviderId { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState? State { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tasks { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HealthStatus : System.IEquatable + public readonly partial struct DataReplicationWorkflowState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public HealthStatus(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus Critical { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus Normal { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus Warning { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus other) { throw null; } + public DataReplicationWorkflowState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState Cancelling { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState CompletedWithErrors { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState CompletedWithInformation { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState CompletedWithWarnings { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationWorkflowState right) { throw null; } public override string ToString() { throw null; } } + public partial class DeploymentPreflightModel + { + public DeploymentPreflightModel() { } + public System.Collections.Generic.IList Resources { get { throw null; } } + } + public partial class DeploymentPreflightResource + { + public DeploymentPreflightResource() { } + public string ApiVersion { get { throw null; } set { } } + public Azure.Core.ResourceType? DeploymentPreflightResourceType { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + } + public abstract partial class DraModelCustomProperties + { + protected DraModelCustomProperties() { } + } + public abstract partial class EventModelCustomProperties + { + protected EventModelCustomProperties() { } + } + public abstract partial class FabricModelCustomProperties + { + protected FabricModelCustomProperties() { } + } + public partial class FailoverProtectedItemProperties + { + internal FailoverProtectedItemProperties() { } + public string NetworkName { get { throw null; } } + public string ProtectedItemName { get { throw null; } } + public string RecoveryPointId { get { throw null; } } + public System.DateTimeOffset? RecoveryPointOn { get { throw null; } } + public string Subnet { get { throw null; } } + public string TestVmName { get { throw null; } } + public string VmName { get { throw null; } } + } + public partial class FailoverWorkflowModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties + { + internal FailoverWorkflowModelCustomProperties() { } + public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + } + public partial class GeneralDraModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties + { + public GeneralDraModelCustomProperties() { } + } + public partial class GeneralFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties + { + public GeneralFabricModelCustomProperties() { } + } + public partial class GeneralPlannedFailoverModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties + { + public GeneralPlannedFailoverModelCustomProperties() { } + } + public partial class GeneralPolicyModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties + { + public GeneralPolicyModelCustomProperties() { } + } + public partial class GeneralProtectedItemModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties + { + public GeneralProtectedItemModelCustomProperties() { } + } + public partial class GeneralReplicationExtensionModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties + { + public GeneralReplicationExtensionModelCustomProperties() { } + } public partial class HyperVMigrateFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties { - public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migrationSolutionId) { } + public HyperVMigrateFabricModelCustomProperties(Azure.Core.ResourceIdentifier hyperVSiteId, Azure.Core.ResourceIdentifier migrationSolutionId) { } public string FabricContainerId { get { throw null; } } - public string FabricResourceId { get { throw null; } } - public string HyperVSiteId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier HyperVSiteId { get { throw null; } set { } } public System.Uri MigrationHubUri { get { throw null; } } - public string MigrationSolutionId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } } - public partial class HyperVToAzStackHCIDiskInput + public partial class HyperVToAzStackHciDiskInput { - public HyperVToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public HyperVToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } public string DiskFileFormat { get { throw null; } set { } } public string DiskId { get { throw null; } set { } } public long DiskSizeGB { get { throw null; } set { } } public bool? IsDynamic { get { throw null; } set { } } public bool IsOSDisk { get { throw null; } set { } } - public string StorageContainerId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } } - public partial class HyperVToAzStackHCIEventModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties + public partial class HyperVToAzStackHciEventModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.EventModelCustomProperties { - internal HyperVToAzStackHCIEventModelCustomProperties() { } + internal HyperVToAzStackHciEventModelCustomProperties() { } public string EventSourceFriendlyName { get { throw null; } } public string ProtectedItemFriendlyName { get { throw null; } } public string ServerType { get { throw null; } } public string SourceApplianceName { get { throw null; } } public string TargetApplianceName { get { throw null; } } } - public partial class HyperVToAzStackHCINicInput + public partial class HyperVToAzStackHciNicInput { - public HyperVToAzStackHCINicInput(string nicId, string targetNetworkId, string testNetworkId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public HyperVToAzStackHciNicInput(string nicId, string targetNetworkId, string testNetworkId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } public string NetworkName { get { throw null; } } public string NicId { get { throw null; } set { } } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectionTypeForFailover { get { throw null; } set { } } public string TargetNetworkId { get { throw null; } set { } } public string TestNetworkId { get { throw null; } set { } } } - public partial class HyperVToAzStackHCIPlannedFailoverModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties + public partial class HyperVToAzStackHciPlannedFailoverModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties { - public HyperVToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { } + public HyperVToAzStackHciPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { } public bool ShutdownSourceVm { get { throw null; } set { } } } - public partial class HyperVToAzStackHCIPolicyModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties + public partial class HyperVToAzStackHciPolicyModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties { - public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public HyperVToAzStackHciPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } } - public partial class HyperVToAzStackHCIProtectedDiskProperties + public partial class HyperVToAzStackHciProtectedDiskProperties { - internal HyperVToAzStackHCIProtectedDiskProperties() { } + internal HyperVToAzStackHciProtectedDiskProperties() { } public long? CapacityInBytes { get { throw null; } } public string DiskType { get { throw null; } } public bool? IsDynamic { get { throw null; } } @@ -687,18 +1031,18 @@ internal HyperVToAzStackHCIProtectedDiskProperties() { } public string SeedDiskName { get { throw null; } } public string SourceDiskId { get { throw null; } } public string SourceDiskName { get { throw null; } } - public string StorageContainerId { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } } public string StorageContainerLocalPath { get { throw null; } } public string TestMigrateDiskName { get { throw null; } } } - public partial class HyperVToAzStackHCIProtectedItemModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties + public partial class HyperVToAzStackHciProtectedItemModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties { - public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string fabricDiscoveryMachineId, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceDraName, string targetDraName, string customLocationRegion) { } + public HyperVToAzStackHciProtectedItemModelCustomProperties(Azure.Core.ResourceIdentifier targetHciClusterId, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, Azure.Core.ResourceIdentifier targetResourceGroupId, Azure.Core.ResourceIdentifier storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceDraName, string targetDraName, string customLocationRegion) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } public string CustomLocationRegion { get { throw null; } set { } } - public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } - public string FabricDiscoveryMachineId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricDiscoveryMachineId { get { throw null; } set { } } public string FailoverRecoveryPointId { get { throw null; } } public string FirmwareType { get { throw null; } } public string HyperVGeneration { get { throw null; } set { } } @@ -707,11 +1051,11 @@ public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus public string LastRecoveryPointId { get { throw null; } } public System.DateTimeOffset? LastRecoveryPointReceived { get { throw null; } } public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } - public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } public string OSName { get { throw null; } } public string OSType { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } public int? ResyncProgressPercentage { get { throw null; } } public string RunAsAccountId { get { throw null; } set { } } public string SourceApplianceName { get { throw null; } } @@ -719,24 +1063,24 @@ public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus public string SourceDraName { get { throw null; } set { } } public double? SourceMemoryInMegaBytes { get { throw null; } } public string SourceVmName { get { throw null; } } - public string StorageContainerId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } public string TargetApplianceName { get { throw null; } } - public string TargetArcClusterCustomLocationId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetArcClusterCustomLocationId { get { throw null; } set { } } public string TargetAzStackHciClusterName { get { throw null; } } public int? TargetCpuCores { get { throw null; } set { } } public string TargetDraName { get { throw null; } set { } } - public string TargetHciClusterId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetHciClusterId { get { throw null; } set { } } public string TargetLocation { get { throw null; } } public int? TargetMemoryInMegaBytes { get { throw null; } set { } } public string TargetNetworkId { get { throw null; } set { } } - public string TargetResourceGroupId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetResourceGroupId { get { throw null; } set { } } public string TargetVmBiosId { get { throw null; } } public string TargetVmName { get { throw null; } set { } } public string TestNetworkId { get { throw null; } set { } } } - public partial class HyperVToAzStackHCIProtectedNicProperties + public partial class HyperVToAzStackHciProtectedNicProperties { - internal HyperVToAzStackHCIProtectedNicProperties() { } + internal HyperVToAzStackHciProtectedNicProperties() { } public string MacAddress { get { throw null; } } public string NetworkName { get { throw null; } } public string NicId { get { throw null; } } @@ -744,20 +1088,20 @@ internal HyperVToAzStackHCIProtectedNicProperties() { } public string TargetNetworkId { get { throw null; } } public string TestNetworkId { get { throw null; } } } - public partial class HyperVToAzStackHCIRecoveryPointModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties + public partial class HyperVToAzStackHciRecoveryPointModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties { - internal HyperVToAzStackHCIRecoveryPointModelCustomProperties() { } + internal HyperVToAzStackHciRecoveryPointModelCustomProperties() { } public System.Collections.Generic.IReadOnlyList DiskIds { get { throw null; } } } - public partial class HyperVToAzStackHCIReplicationExtensionModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties + public partial class HyperVToAzStackHciReplicationExtensionModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties { - public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId, string azStackHciFabricArmId) { } + public HyperVToAzStackHciReplicationExtensionModelCustomProperties(Azure.Core.ResourceIdentifier hyperVFabricArmId, Azure.Core.ResourceIdentifier azStackHciFabricArmId) { } public System.Uri AsrServiceUri { get { throw null; } } - public string AzStackHciFabricArmId { get { throw null; } set { } } - public string AzStackHciSiteId { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } } public System.Uri GatewayServiceUri { get { throw null; } } - public string HyperVFabricArmId { get { throw null; } set { } } - public string HyperVSiteId { get { throw null; } } + public Azure.Core.ResourceIdentifier HyperVFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier HyperVSiteId { get { throw null; } } public System.Uri RcmServiceUri { get { throw null; } } public string ResourceGroup { get { throw null; } } public string ResourceLocation { get { throw null; } } @@ -769,39 +1113,6 @@ public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperV public string TargetGatewayServiceId { get { throw null; } } public string TargetStorageContainerName { get { throw null; } } } - public partial class IdentityModel - { - public IdentityModel(System.Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) { } - public string AadAuthority { get { throw null; } set { } } - public string ApplicationId { get { throw null; } set { } } - public string Audience { get { throw null; } set { } } - public string ObjectId { get { throw null; } set { } } - public System.Guid TenantId { get { throw null; } set { } } - } - public partial class InnerHealthErrorModel - { - internal InnerHealthErrorModel() { } - public string Category { get { throw null; } } - public string Causes { get { throw null; } } - public string Code { get { throw null; } } - public System.DateTimeOffset? CreatedOn { get { throw null; } } - public string HealthCategory { get { throw null; } } - public bool? IsCustomerResolvable { get { throw null; } } - public string Message { get { throw null; } } - public string Recommendation { get { throw null; } } - public string Severity { get { throw null; } } - public string Source { get { throw null; } } - public string Summary { get { throw null; } } - } - public partial class OperationStatus - { - internal OperationStatus() { } - public string EndTime { get { throw null; } } - public string Id { get { throw null; } } - public string Name { get { throw null; } } - public string StartTime { get { throw null; } } - public string Status { get { throw null; } } - } public partial class PlannedFailoverModel { public PlannedFailoverModel(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelProperties properties) { } @@ -820,12 +1131,6 @@ public abstract partial class PolicyModelCustomProperties { protected PolicyModelCustomProperties() { } } - public partial class PolicyModelProperties - { - public PolicyModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties customProperties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties CustomProperties { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ProtectedItemActiveLocation : System.IEquatable { @@ -866,309 +1171,30 @@ public abstract partial class ProtectedItemModelCustomProperties { protected ProtectedItemModelCustomProperties() { } } - public partial class ProtectedItemModelProperties - { - public ProtectedItemModelProperties(string policyName, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties customProperties) { } - public System.Collections.Generic.IReadOnlyList AllowedJobs { get { throw null; } } - public string CorrelationId { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesCurrentJob CurrentJob { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties CustomProperties { get { throw null; } set { } } - public string DraId { get { throw null; } } - public string FabricId { get { throw null; } } - public string FabricObjectId { get { throw null; } } - public string FabricObjectName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedEnableProtectionJob LastFailedEnableProtectionJob { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastFailedPlannedFailoverJob LastFailedPlannedFailoverJob { get { throw null; } } - public System.DateTimeOffset? LastSuccessfulPlannedFailoverOn { get { throw null; } } - public System.DateTimeOffset? LastSuccessfulTestFailoverOn { get { throw null; } } - public System.DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelPropertiesLastTestFailoverJob LastTestFailoverJob { get { throw null; } } - public string PolicyName { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState? ProtectionState { get { throw null; } } - public string ProtectionStateDescription { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public string ReplicationExtensionName { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.HealthStatus? ReplicationHealth { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState? ResynchronizationState { get { throw null; } } - public bool? ResyncRequired { get { throw null; } } - public string SourceFabricProviderId { get { throw null; } } - public string TargetDraId { get { throw null; } } - public string TargetFabricId { get { throw null; } } - public string TargetFabricProviderId { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState? TestFailoverState { get { throw null; } } - public string TestFailoverStateDescription { get { throw null; } } - } - public partial class ProtectedItemModelPropertiesCurrentJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties - { - internal ProtectedItemModelPropertiesCurrentJob() { } - } - public partial class ProtectedItemModelPropertiesLastFailedEnableProtectionJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties - { - internal ProtectedItemModelPropertiesLastFailedEnableProtectionJob() { } - } - public partial class ProtectedItemModelPropertiesLastFailedPlannedFailoverJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties - { - internal ProtectedItemModelPropertiesLastFailedPlannedFailoverJob() { } - } - public partial class ProtectedItemModelPropertiesLastTestFailoverJob : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties - { - internal ProtectedItemModelPropertiesLastTestFailoverJob() { } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProtectionState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ProtectionState(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverFailedOnPrimary { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverFailedOnRecovery { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverInProgressOnPrimary { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverInProgressOnRecovery { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CancelFailoverStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointCompleted { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointInitiated { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ChangeRecoveryPointStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverCompleted { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverFailedOnPrimary { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverFailedOnRecovery { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverInProgressOnPrimary { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverInProgressOnRecovery { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState CommitFailoverStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState DisablingFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState DisablingProtection { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState EnablingFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState EnablingProtection { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationCompletedOnPrimary { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationCompletedOnRecovery { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationInProgress { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState InitialReplicationStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState MarkedForDeletion { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverCompleted { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverCompleting { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverCompletionFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverInitiated { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverTransitionStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState PlannedFailoverTransitionStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState Protected { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ProtectedStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ProtectedStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectInitiated { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState ReprotectStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverCompleted { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverCompleting { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverCompletionFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverInitiated { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverTransitionStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnplannedFailoverTransitionStatesEnd { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnprotectedStatesBegin { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState UnprotectedStatesEnd { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectionState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Deleted { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } public abstract partial class RecoveryPointModelCustomProperties { protected RecoveryPointModelCustomProperties() { } } - public partial class RecoveryPointModelProperties - { - internal RecoveryPointModelProperties() { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointModelCustomProperties CustomProperties { get { throw null; } } - public System.DateTimeOffset RecoveryPointOn { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType RecoveryPointType { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RecoveryPointType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RecoveryPointType(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType ApplicationConsistent { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType CrashConsistent { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.RecoveryPointType right) { throw null; } - public override string ToString() { throw null; } - } public abstract partial class ReplicationExtensionModelCustomProperties { protected ReplicationExtensionModelCustomProperties() { } } - public partial class ReplicationExtensionModelProperties - { - public ReplicationExtensionModelProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties customProperties) { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties CustomProperties { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ReplicationVaultType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ReplicationVaultType(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType DisasterRecovery { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType Migrate { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ResynchronizationState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ResynchronizationState(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState None { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState ResynchronizationCompleted { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState ResynchronizationFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState ResynchronizationInitiated { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ResynchronizationState right) { throw null; } - public override string ToString() { throw null; } - } public partial class StorageContainerProperties { public StorageContainerProperties(string name, string clusterSharedVolumePath) { } public string ClusterSharedVolumePath { get { throw null; } set { } } public string Name { get { throw null; } set { } } } - public partial class TaskModel - { - internal TaskModel() { } - public System.Collections.Generic.IReadOnlyList ChildrenWorkflows { get { throw null; } } - public string CustomInstanceType { get { throw null; } } - public System.DateTimeOffset? EndOn { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState? State { get { throw null; } } - public string TaskName { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct TaskState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TaskState(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Cancelled { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Failed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Pending { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Skipped { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Started { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TaskState right) { throw null; } - public override string ToString() { throw null; } - } public partial class TestFailoverCleanupWorkflowModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties { internal TestFailoverCleanupWorkflowModelCustomProperties() { } public string Comments { get { throw null; } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct TestFailoverState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TestFailoverState(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState MarkedForDeletion { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState None { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCleanupCompleting { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCleanupInitiated { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCompleted { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCompleting { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverCompletionFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverFailed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState TestFailoverInitiated { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverState right) { throw null; } - public override string ToString() { throw null; } - } public partial class TestFailoverWorkflowModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties { internal TestFailoverWorkflowModelCustomProperties() { } public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } } - public partial class VaultModelPatch : Azure.ResourceManager.Models.ResourceData - { - public VaultModelPatch() { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VaultModelProperties Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - public partial class VaultModelProperties - { - public VaultModelProperties() { } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public string ServiceResourceId { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationVaultType? VaultType { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct VmNicSelection : System.IEquatable { @@ -1191,19 +1217,19 @@ public VaultModelProperties() { } } public partial class VMwareDraModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DraModelCustomProperties { - public VMwareDraModelCustomProperties(string biosId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel marsAuthenticationIdentity) { } + public VMwareDraModelCustomProperties(string biosId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity marsAuthenticationIdentity) { } public string BiosId { get { throw null; } set { } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.IdentityModel MarsAuthenticationIdentity { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity MarsAuthenticationIdentity { get { throw null; } set { } } } public partial class VMwareMigrateFabricModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.FabricModelCustomProperties { - public VMwareMigrateFabricModelCustomProperties(string vmwareSiteId, string migrationSolutionId) { } - public string MigrationSolutionId { get { throw null; } set { } } - public string VmwareSiteId { get { throw null; } set { } } + public VMwareMigrateFabricModelCustomProperties(Azure.Core.ResourceIdentifier vMwareSiteId, Azure.Core.ResourceIdentifier migrationSolutionId) { } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VMwareSiteId { get { throw null; } set { } } } - public partial class VMwareToAzStackHCIDiskInput + public partial class VMwareToAzStackHciDiskInput { - public VMwareToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public VMwareToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } public string DiskFileFormat { get { throw null; } set { } } public string DiskId { get { throw null; } set { } } public long DiskSizeGB { get { throw null; } set { } } @@ -1211,9 +1237,9 @@ public VMwareToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFi public bool IsOSDisk { get { throw null; } set { } } public string StorageContainerId { get { throw null; } set { } } } - public partial class VMwareToAzStackHCINicInput + public partial class VMwareToAzStackHciNicInput { - public VMwareToAzStackHCINicInput(string nicId, string label, string targetNetworkId, string testNetworkId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public VMwareToAzStackHciNicInput(string nicId, string label, string targetNetworkId, string testNetworkId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } public string Label { get { throw null; } set { } } public string NetworkName { get { throw null; } } public string NicId { get { throw null; } set { } } @@ -1221,21 +1247,21 @@ public VMwareToAzStackHCINicInput(string nicId, string label, string targetNetwo public string TargetNetworkId { get { throw null; } set { } } public string TestNetworkId { get { throw null; } set { } } } - public partial class VMwareToAzStackHCIPlannedFailoverModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties + public partial class VMwareToAzStackHciPlannedFailoverModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverModelCustomProperties { - public VMwareToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { } + public VMwareToAzStackHciPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { } public bool ShutdownSourceVm { get { throw null; } set { } } } - public partial class VMwareToAzStackHCIPolicyModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties + public partial class VMwareToAzStackHciPolicyModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PolicyModelCustomProperties { - public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public VMwareToAzStackHciPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } } - public partial class VMwareToAzStackHCIProtectedDiskProperties + public partial class VMwareToAzStackHciProtectedDiskProperties { - internal VMwareToAzStackHCIProtectedDiskProperties() { } + internal VMwareToAzStackHciProtectedDiskProperties() { } public long? CapacityInBytes { get { throw null; } } public string DiskType { get { throw null; } } public bool? IsDynamic { get { throw null; } } @@ -1244,18 +1270,18 @@ internal VMwareToAzStackHCIProtectedDiskProperties() { } public string SeedDiskName { get { throw null; } } public string SourceDiskId { get { throw null; } } public string SourceDiskName { get { throw null; } } - public string StorageContainerId { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } } public string StorageContainerLocalPath { get { throw null; } } public string TestMigrateDiskName { get { throw null; } } } - public partial class VMwareToAzStackHCIProtectedItemModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties + public partial class VMwareToAzStackHciProtectedItemModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemModelCustomProperties { - public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string storageContainerId, string targetResourceGroupId, string customLocationRegion, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, string hyperVGeneration, string fabricDiscoveryMachineId, string runAsAccountId, string sourceDraName, string targetDraName) { } + public VMwareToAzStackHciProtectedItemModelCustomProperties(Azure.Core.ResourceIdentifier targetHciClusterId, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId, Azure.Core.ResourceIdentifier storageContainerId, Azure.Core.ResourceIdentifier targetResourceGroupId, string customLocationRegion, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, string hyperVGeneration, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId, string runAsAccountId, string sourceDraName, string targetDraName) { } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } public string CustomLocationRegion { get { throw null; } set { } } - public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } - public string FabricDiscoveryMachineId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricDiscoveryMachineId { get { throw null; } set { } } public string FailoverRecoveryPointId { get { throw null; } } public string FirmwareType { get { throw null; } } public string HyperVGeneration { get { throw null; } set { } } @@ -1265,12 +1291,12 @@ public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus public System.DateTimeOffset? LastRecoveryPointReceived { get { throw null; } } public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } public int? MigrationProgressPercentage { get { throw null; } } - public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } public string OSName { get { throw null; } } public string OSType { get { throw null; } } public bool? PerformAutoResync { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } public int? ResumeProgressPercentage { get { throw null; } } public long? ResumeRetryCount { get { throw null; } } public int? ResyncProgressPercentage { get { throw null; } } @@ -1283,24 +1309,24 @@ public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus public string SourceDraName { get { throw null; } set { } } public double? SourceMemoryInMegaBytes { get { throw null; } } public string SourceVmName { get { throw null; } } - public string StorageContainerId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } public string TargetApplianceName { get { throw null; } } - public string TargetArcClusterCustomLocationId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetArcClusterCustomLocationId { get { throw null; } set { } } public string TargetAzStackHciClusterName { get { throw null; } } public int? TargetCpuCores { get { throw null; } set { } } public string TargetDraName { get { throw null; } set { } } - public string TargetHciClusterId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetHciClusterId { get { throw null; } set { } } public string TargetLocation { get { throw null; } } public int? TargetMemoryInMegaBytes { get { throw null; } set { } } public string TargetNetworkId { get { throw null; } set { } } - public string TargetResourceGroupId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetResourceGroupId { get { throw null; } set { } } public string TargetVmBiosId { get { throw null; } } public string TargetVmName { get { throw null; } set { } } public string TestNetworkId { get { throw null; } set { } } } - public partial class VMwareToAzStackHCIProtectedNicProperties + public partial class VMwareToAzStackHciProtectedNicProperties { - internal VMwareToAzStackHCIProtectedNicProperties() { } + internal VMwareToAzStackHciProtectedNicProperties() { } public bool? IsPrimaryNic { get { throw null; } } public string Label { get { throw null; } } public string MacAddress { get { throw null; } } @@ -1310,25 +1336,25 @@ internal VMwareToAzStackHCIProtectedNicProperties() { } public string TargetNetworkId { get { throw null; } } public string TestNetworkId { get { throw null; } } } - public partial class VMwareToAzStackHCIReplicationExtensionModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties + public partial class VMwareToAzStackHciReplicationExtensionModelCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.ReplicationExtensionModelCustomProperties { - public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId, string azStackHciFabricArmId) { } + public VMwareToAzStackHciReplicationExtensionModelCustomProperties(Azure.Core.ResourceIdentifier vmwareFabricArmId, Azure.Core.ResourceIdentifier azStackHciFabricArmId) { } public System.Uri AsrServiceUri { get { throw null; } } - public string AzStackHciFabricArmId { get { throw null; } set { } } - public string AzStackHciSiteId { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } } public System.Uri GatewayServiceUri { get { throw null; } } public System.Uri RcmServiceUri { get { throw null; } } public string ResourceGroup { get { throw null; } } public string ResourceLocation { get { throw null; } } public string SourceGatewayServiceId { get { throw null; } } public string SourceStorageContainerName { get { throw null; } } - public string StorageAccountId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageAccountId { get { throw null; } set { } } public string StorageAccountSasSecretName { get { throw null; } set { } } public string SubscriptionId { get { throw null; } } public string TargetGatewayServiceId { get { throw null; } } public string TargetStorageContainerName { get { throw null; } } - public string VmwareFabricArmId { get { throw null; } set { } } - public string VmwareSiteId { get { throw null; } } + public Azure.Core.ResourceIdentifier VmwareFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VmwareSiteId { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct VMwareToAzureMigrateResyncState : System.IEquatable @@ -1354,27 +1380,6 @@ public abstract partial class WorkflowModelCustomProperties protected WorkflowModelCustomProperties() { } public System.Collections.Generic.IReadOnlyDictionary AffectedObjectDetails { get { throw null; } } } - public partial class WorkflowModelProperties - { - internal WorkflowModelProperties() { } - public string ActivityId { get { throw null; } } - public System.Collections.Generic.IReadOnlyList AllowedActions { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowModelCustomProperties CustomProperties { get { throw null; } } - public string DisplayName { get { throw null; } } - public System.DateTimeOffset? EndOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ObjectId { get { throw null; } } - public string ObjectInternalId { get { throw null; } } - public string ObjectInternalName { get { throw null; } } - public string ObjectName { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType? ObjectType { get { throw null; } } - public string ReplicationProviderId { get { throw null; } } - public string SourceFabricProviderId { get { throw null; } } - public System.DateTimeOffset? StartOn { get { throw null; } } - public Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState? State { get { throw null; } } - public string TargetFabricProviderId { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Tasks { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct WorkflowObjectType : System.IEquatable { @@ -1399,29 +1404,4 @@ internal WorkflowModelProperties() { } public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowObjectType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct WorkflowState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public WorkflowState(string value) { throw null; } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Cancelled { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Cancelling { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState CompletedWithErrors { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState CompletedWithInformation { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState CompletedWithWarnings { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Failed { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Pending { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Started { get { throw null; } } - public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState right) { throw null; } - public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.WorkflowState right) { throw null; } - public override string ToString() { throw null; } - } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraCollection.cs new file mode 100644 index 000000000000..89f55c41adb8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraCollection.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationDraCollection + { + // Dra_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_DraGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Dra_Get.json + // this example is just showing the usage of "Dra_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationDraResource + DataReplicationDraCollection collection = dataReplicationFabric.GetDataReplicationDras(); + + // invoke the operation + string fabricAgentName = "M"; + DataReplicationDraResource result = await collection.GetAsync(fabricAgentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationDraData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Dra_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_DraGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Dra_Get.json + // this example is just showing the usage of "Dra_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationDraResource + DataReplicationDraCollection collection = dataReplicationFabric.GetDataReplicationDras(); + + // invoke the operation + string fabricAgentName = "M"; + bool result = await collection.ExistsAsync(fabricAgentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Dra_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_DraCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Dra_Create.json + // this example is just showing the usage of "Dra_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationDraResource + DataReplicationDraCollection collection = dataReplicationFabric.GetDataReplicationDras(); + + // invoke the operation + string fabricAgentName = "M"; + DataReplicationDraData data = new DataReplicationDraData(new DataReplicationDraProperties("envzcoijbqhtrpncbjbhk", "y", new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), new GeneralDraModelCustomProperties())); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fabricAgentName, data); + DataReplicationDraResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationDraData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Dra_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_DraList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Dra_List.json + // this example is just showing the usage of "Dra_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationDraResource + DataReplicationDraCollection collection = dataReplicationFabric.GetDataReplicationDras(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationDraResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationDraData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraResource.cs new file mode 100644 index 000000000000..3ca6dba8bb8e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationDraResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationDraResource + { + // Dra_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_DraGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Dra_Get.json + // this example is just showing the usage of "Dra_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationDraResource created on azure + // for more information of creating DataReplicationDraResource, please refer to the document of DataReplicationDraResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + string fabricAgentName = "M"; + ResourceIdentifier dataReplicationDraResourceId = DataReplicationDraResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + DataReplicationDraResource dataReplicationDra = client.GetDataReplicationDraResource(dataReplicationDraResourceId); + + // invoke the operation + DataReplicationDraResource result = await dataReplicationDra.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationDraData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Dra_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_DraCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Dra_Create.json + // this example is just showing the usage of "Dra_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationDraResource created on azure + // for more information of creating DataReplicationDraResource, please refer to the document of DataReplicationDraResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + string fabricAgentName = "M"; + ResourceIdentifier dataReplicationDraResourceId = DataReplicationDraResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + DataReplicationDraResource dataReplicationDra = client.GetDataReplicationDraResource(dataReplicationDraResourceId); + + // invoke the operation + DataReplicationDraData data = new DataReplicationDraData(new DataReplicationDraProperties("envzcoijbqhtrpncbjbhk", "y", new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), new GeneralDraModelCustomProperties())); + ArmOperation lro = await dataReplicationDra.UpdateAsync(WaitUntil.Completed, data); + DataReplicationDraResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationDraData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Dra_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DraDelete() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Dra_Delete.json + // this example is just showing the usage of "Dra_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationDraResource created on azure + // for more information of creating DataReplicationDraResource, please refer to the document of DataReplicationDraResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + string fabricAgentName = "M"; + ResourceIdentifier dataReplicationDraResourceId = DataReplicationDraResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + DataReplicationDraResource dataReplicationDra = client.GetDataReplicationDraResource(dataReplicationDraResourceId); + + // invoke the operation + await dataReplicationDra.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs new file mode 100644 index 000000000000..164bda8248af --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEmailConfigurationCollection + { + // EmailConfiguration_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_EmailConfigurationGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/EmailConfiguration_Get.json + // this example is just showing the usage of "EmailConfiguration_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation + string emailConfigurationName = "0"; + DataReplicationEmailConfigurationResource result = await collection.GetAsync(emailConfigurationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // EmailConfiguration_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_EmailConfigurationGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/EmailConfiguration_Get.json + // this example is just showing the usage of "EmailConfiguration_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation + string emailConfigurationName = "0"; + bool result = await collection.ExistsAsync(emailConfigurationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // EmailConfiguration_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_EmailConfigurationCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/EmailConfiguration_Create.json + // this example is just showing the usage of "EmailConfiguration_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation + string emailConfigurationName = "0"; + DataReplicationEmailConfigurationData data = new DataReplicationEmailConfigurationData(new DataReplicationEmailConfigurationProperties(true) + { + CustomEmailAddresses = +{ +"ketvbducyailcny" +}, + Locale = "vpnjxjvdqtebnucyxiyrjiko", + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, emailConfigurationName, data); + DataReplicationEmailConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // EmailConfiguration_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_EmailConfigurationList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/EmailConfiguration_List.json + // this example is just showing the usage of "EmailConfiguration_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationEmailConfigurationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs new file mode 100644 index 000000000000..0bdacff35dc0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEmailConfigurationResource + { + // EmailConfiguration_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_EmailConfigurationGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/EmailConfiguration_Get.json + // this example is just showing the usage of "EmailConfiguration_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationEmailConfigurationResource created on azure + // for more information of creating DataReplicationEmailConfigurationResource, please refer to the document of DataReplicationEmailConfigurationResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string emailConfigurationName = "0"; + ResourceIdentifier dataReplicationEmailConfigurationResourceId = DataReplicationEmailConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + DataReplicationEmailConfigurationResource dataReplicationEmailConfiguration = client.GetDataReplicationEmailConfigurationResource(dataReplicationEmailConfigurationResourceId); + + // invoke the operation + DataReplicationEmailConfigurationResource result = await dataReplicationEmailConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // EmailConfiguration_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_EmailConfigurationCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/EmailConfiguration_Create.json + // this example is just showing the usage of "EmailConfiguration_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationEmailConfigurationResource created on azure + // for more information of creating DataReplicationEmailConfigurationResource, please refer to the document of DataReplicationEmailConfigurationResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string emailConfigurationName = "0"; + ResourceIdentifier dataReplicationEmailConfigurationResourceId = DataReplicationEmailConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + DataReplicationEmailConfigurationResource dataReplicationEmailConfiguration = client.GetDataReplicationEmailConfigurationResource(dataReplicationEmailConfigurationResourceId); + + // invoke the operation + DataReplicationEmailConfigurationData data = new DataReplicationEmailConfigurationData(new DataReplicationEmailConfigurationProperties(true) + { + CustomEmailAddresses = +{ +"ketvbducyailcny" +}, + Locale = "vpnjxjvdqtebnucyxiyrjiko", + }); + ArmOperation lro = await dataReplicationEmailConfiguration.UpdateAsync(WaitUntil.Completed, data); + DataReplicationEmailConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs new file mode 100644 index 000000000000..a42f2008f13b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEventCollection + { + // Event_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_EventGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Event_Get.json + // this example is just showing the usage of "Event_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEventResource + DataReplicationEventCollection collection = dataReplicationVault.GetDataReplicationEvents(); + + // invoke the operation + string eventName = "231CIG"; + DataReplicationEventResource result = await collection.GetAsync(eventName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEventData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Event_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_EventGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Event_Get.json + // this example is just showing the usage of "Event_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEventResource + DataReplicationEventCollection collection = dataReplicationVault.GetDataReplicationEvents(); + + // invoke the operation + string eventName = "231CIG"; + bool result = await collection.ExistsAsync(eventName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Event_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_EventList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Event_List.json + // this example is just showing the usage of "Event_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEventResource + DataReplicationEventCollection collection = dataReplicationVault.GetDataReplicationEvents(); + + // invoke the operation and iterate over the result + string filter = "wbglupjzvkirtgnnyasxom"; + string continuationToken = "cxtufi"; + await foreach (DataReplicationEventResource item in collection.GetAllAsync(filter: filter, continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEventData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs new file mode 100644 index 000000000000..025c55e39321 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEventResource + { + // Event_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_EventGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Event_Get.json + // this example is just showing the usage of "Event_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationEventResource created on azure + // for more information of creating DataReplicationEventResource, please refer to the document of DataReplicationEventResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string eventName = "231CIG"; + ResourceIdentifier dataReplicationEventResourceId = DataReplicationEventResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, eventName); + DataReplicationEventResource dataReplicationEvent = client.GetDataReplicationEventResource(dataReplicationEventResourceId); + + // invoke the operation + DataReplicationEventResource result = await dataReplicationEvent.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEventData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs new file mode 100644 index 000000000000..3718a03ff387 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationFabricCollection + { + // Fabric_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_FabricGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_Get.json + // this example is just showing the usage of "Fabric_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation + string fabricName = "wPR"; + DataReplicationFabricResource result = await collection.GetAsync(fabricName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Fabric_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_FabricGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_Get.json + // this example is just showing the usage of "Fabric_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation + string fabricName = "wPR"; + bool result = await collection.ExistsAsync(fabricName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Fabric_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_FabricCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_Create.json + // this example is just showing the usage of "Fabric_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation + string fabricName = "wPR"; + DataReplicationFabricData data = new DataReplicationFabricData(new AzureLocation("tqygutlpob"), new DataReplicationFabricProperties(new GeneralFabricModelCustomProperties())) + { + Tags = +{ +["key3917"] = "vgralu", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fabricName, data); + DataReplicationFabricResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Fabric_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_FabricList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_List.json + // this example is just showing the usage of "Fabric_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation and iterate over the result + string continuationToken = "mjzsxwwmtvd"; + await foreach (DataReplicationFabricResource item in collection.GetAllAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs new file mode 100644 index 000000000000..aaca95b23b19 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationFabricResource + { + // Fabric_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_FabricGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_Get.json + // this example is just showing the usage of "Fabric_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // invoke the operation + DataReplicationFabricResource result = await dataReplicationFabric.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Fabric_Update + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_FabricUpdate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_Update.json + // this example is just showing the usage of "Fabric_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // invoke the operation + DataReplicationFabricPatch patch = new DataReplicationFabricPatch() + { + Tags = +{ +["key6664"] = "def", +}, + Properties = new DataReplicationFabricProperties(new GeneralFabricModelCustomProperties()), + }; + ArmOperation lro = await dataReplicationFabric.UpdateAsync(WaitUntil.Completed, patch); + DataReplicationFabricResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Fabric_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_FabricDelete() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_Delete.json + // this example is just showing the usage of "Fabric_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // invoke the operation + await dataReplicationFabric.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Fabric_ListBySubscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDataReplicationFabrics_FabricListBySubscription() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Fabric_ListBySubscription.json + // this example is just showing the usage of "Fabric_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string continuationToken = "rmgqrpzucsizbyjscxzockbiyg"; + await foreach (DataReplicationFabricResource item in subscriptionResource.GetDataReplicationFabricsAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs new file mode 100644 index 000000000000..105f687df4ec --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPolicyCollection + { + // Policy_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_PolicyGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Policy_Get.json + // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation + string policyName = "wdqsacasc"; + DataReplicationPolicyResource result = await collection.GetAsync(policyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Policy_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_PolicyGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Policy_Get.json + // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation + string policyName = "wdqsacasc"; + bool result = await collection.ExistsAsync(policyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Policy_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_PolicyCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Policy_Create.json + // this example is just showing the usage of "Policy_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation + string policyName = "fafqwc"; + DataReplicationPolicyData data = new DataReplicationPolicyData(new DataReplicationPolicyProperties(new GeneralPolicyModelCustomProperties())); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, policyName, data); + DataReplicationPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Policy_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_PolicyList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Policy_List.json + // this example is just showing the usage of "Policy_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs new file mode 100644 index 000000000000..a06917e3b028 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPolicyResource + { + // Policy_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_PolicyGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Policy_Get.json + // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPolicyResource created on azure + // for more information of creating DataReplicationPolicyResource, please refer to the document of DataReplicationPolicyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string policyName = "wdqsacasc"; + ResourceIdentifier dataReplicationPolicyResourceId = DataReplicationPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, policyName); + DataReplicationPolicyResource dataReplicationPolicy = client.GetDataReplicationPolicyResource(dataReplicationPolicyResourceId); + + // invoke the operation + DataReplicationPolicyResource result = await dataReplicationPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Policy_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PolicyCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Policy_Create.json + // this example is just showing the usage of "Policy_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPolicyResource created on azure + // for more information of creating DataReplicationPolicyResource, please refer to the document of DataReplicationPolicyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string policyName = "fafqwc"; + ResourceIdentifier dataReplicationPolicyResourceId = DataReplicationPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, policyName); + DataReplicationPolicyResource dataReplicationPolicy = client.GetDataReplicationPolicyResource(dataReplicationPolicyResourceId); + + // invoke the operation + DataReplicationPolicyData data = new DataReplicationPolicyData(new DataReplicationPolicyProperties(new GeneralPolicyModelCustomProperties())); + ArmOperation lro = await dataReplicationPolicy.UpdateAsync(WaitUntil.Completed, data); + DataReplicationPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Policy_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_PolicyDelete() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Policy_Delete.json + // this example is just showing the usage of "Policy_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPolicyResource created on azure + // for more information of creating DataReplicationPolicyResource, please refer to the document of DataReplicationPolicyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string policyName = "wqfscsdv"; + ResourceIdentifier dataReplicationPolicyResourceId = DataReplicationPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, policyName); + DataReplicationPolicyResource dataReplicationPolicy = client.GetDataReplicationPolicyResource(dataReplicationPolicyResourceId); + + // invoke the operation + await dataReplicationPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs new file mode 100644 index 000000000000..c9caa7c1bba2 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationProtectedItemCollection + { + // ProtectedItem_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ProtectedItemGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_Get.json + // this example is just showing the usage of "ProtectedItem_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation + string protectedItemName = "d"; + DataReplicationProtectedItemResource result = await collection.GetAsync(protectedItemName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ProtectedItem_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ProtectedItemGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_Get.json + // this example is just showing the usage of "ProtectedItem_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation + string protectedItemName = "d"; + bool result = await collection.ExistsAsync(protectedItemName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ProtectedItem_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ProtectedItemCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_Create.json + // this example is just showing the usage of "ProtectedItem_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation + string protectedItemName = "d"; + DataReplicationProtectedItemData data = new DataReplicationProtectedItemData(new DataReplicationProtectedItemProperties("tjoeiynplt", "jwxdo", new GeneralProtectedItemModelCustomProperties())); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, protectedItemName, data); + DataReplicationProtectedItemResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ProtectedItem_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ProtectedItemList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_List.json + // this example is just showing the usage of "ProtectedItem_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationProtectedItemResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs new file mode 100644 index 000000000000..38ccd0c55d5a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationProtectedItemResource + { + // ProtectedItem_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ProtectedItemGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_Get.json + // this example is just showing the usage of "ProtectedItem_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + DataReplicationProtectedItemResource result = await dataReplicationProtectedItem.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ProtectedItem_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ProtectedItemCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_Create.json + // this example is just showing the usage of "ProtectedItem_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + DataReplicationProtectedItemData data = new DataReplicationProtectedItemData(new DataReplicationProtectedItemProperties("tjoeiynplt", "jwxdo", new GeneralProtectedItemModelCustomProperties())); + ArmOperation lro = await dataReplicationProtectedItem.UpdateAsync(WaitUntil.Completed, data); + DataReplicationProtectedItemResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ProtectedItem_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ProtectedItemDelete() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_Delete.json + // this example is just showing the usage of "ProtectedItem_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + bool? forceDelete = true; + await dataReplicationProtectedItem.DeleteAsync(WaitUntil.Completed, forceDelete: forceDelete); + + Console.WriteLine($"Succeeded"); + } + + // ProtectedItem_PlannedFailover + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task PlannedFailover_ProtectedItemPlannedFailover() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItem_PlannedFailover.json + // this example is just showing the usage of "ProtectedItem_PlannedFailover" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + PlannedFailoverModel body = new PlannedFailoverModel(new PlannedFailoverModelProperties(new GeneralPlannedFailoverModelCustomProperties())); + ArmOperation lro = await dataReplicationProtectedItem.PlannedFailoverAsync(WaitUntil.Completed, body: body); + PlannedFailoverModel result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs new file mode 100644 index 000000000000..74ca7d8389ac --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationRecoveryPointCollection + { + // RecoveryPoints_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_RecoveryPointsGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/RecoveryPoints_Get.json + // this example is just showing the usage of "RecoveryPoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // get the collection of this DataReplicationRecoveryPointResource + DataReplicationRecoveryPointCollection collection = dataReplicationProtectedItem.GetDataReplicationRecoveryPoints(); + + // invoke the operation + string recoveryPointName = "1X"; + DataReplicationRecoveryPointResource result = await collection.GetAsync(recoveryPointName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationRecoveryPointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // RecoveryPoints_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_RecoveryPointsGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/RecoveryPoints_Get.json + // this example is just showing the usage of "RecoveryPoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // get the collection of this DataReplicationRecoveryPointResource + DataReplicationRecoveryPointCollection collection = dataReplicationProtectedItem.GetDataReplicationRecoveryPoints(); + + // invoke the operation + string recoveryPointName = "1X"; + bool result = await collection.ExistsAsync(recoveryPointName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // RecoveryPoints_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_RecoveryPointsList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/RecoveryPoints_List.json + // this example is just showing the usage of "RecoveryPoints_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // get the collection of this DataReplicationRecoveryPointResource + DataReplicationRecoveryPointCollection collection = dataReplicationProtectedItem.GetDataReplicationRecoveryPoints(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationRecoveryPointResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationRecoveryPointData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs new file mode 100644 index 000000000000..284376d962be --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationRecoveryPointResource + { + // RecoveryPoints_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_RecoveryPointsGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/RecoveryPoints_Get.json + // this example is just showing the usage of "RecoveryPoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationRecoveryPointResource created on azure + // for more information of creating DataReplicationRecoveryPointResource, please refer to the document of DataReplicationRecoveryPointResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + string recoveryPointName = "1X"; + ResourceIdentifier dataReplicationRecoveryPointResourceId = DataReplicationRecoveryPointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName, recoveryPointName); + DataReplicationRecoveryPointResource dataReplicationRecoveryPoint = client.GetDataReplicationRecoveryPointResource(dataReplicationRecoveryPointResourceId); + + // invoke the operation + DataReplicationRecoveryPointResource result = await dataReplicationRecoveryPoint.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationRecoveryPointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionCollection.cs new file mode 100644 index 000000000000..cc97eb6b1c94 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionCollection.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationReplicationExtensionCollection + { + // ReplicationExtension_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ReplicationExtensionGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ReplicationExtension_Get.json + // this example is just showing the usage of "ReplicationExtension_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationReplicationExtensionResource + DataReplicationReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationReplicationExtensions(); + + // invoke the operation + string replicationExtensionName = "g16yjJ"; + DataReplicationReplicationExtensionResource result = await collection.GetAsync(replicationExtensionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ReplicationExtension_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ReplicationExtensionGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ReplicationExtension_Get.json + // this example is just showing the usage of "ReplicationExtension_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationReplicationExtensionResource + DataReplicationReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationReplicationExtensions(); + + // invoke the operation + string replicationExtensionName = "g16yjJ"; + bool result = await collection.ExistsAsync(replicationExtensionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ReplicationExtension_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ReplicationExtensionCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ReplicationExtension_Create.json + // this example is just showing the usage of "ReplicationExtension_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationReplicationExtensionResource + DataReplicationReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationReplicationExtensions(); + + // invoke the operation + string replicationExtensionName = "g16yjJ"; + DataReplicationReplicationExtensionData data = new DataReplicationReplicationExtensionData(new DataReplicationReplicationExtensionProperties(new GeneralReplicationExtensionModelCustomProperties())); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, replicationExtensionName, data); + DataReplicationReplicationExtensionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ReplicationExtension_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ReplicationExtensionList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ReplicationExtension_List.json + // this example is just showing the usage of "ReplicationExtension_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationReplicationExtensionResource + DataReplicationReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationReplicationExtensions(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationReplicationExtensionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationReplicationExtensionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionResource.cs new file mode 100644 index 000000000000..ffcb250b9b20 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationReplicationExtensionResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationReplicationExtensionResource + { + // ReplicationExtension_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ReplicationExtensionGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ReplicationExtension_Get.json + // this example is just showing the usage of "ReplicationExtension_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationReplicationExtensionResource created on azure + // for more information of creating DataReplicationReplicationExtensionResource, please refer to the document of DataReplicationReplicationExtensionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string replicationExtensionName = "g16yjJ"; + ResourceIdentifier dataReplicationReplicationExtensionResourceId = DataReplicationReplicationExtensionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + DataReplicationReplicationExtensionResource dataReplicationReplicationExtension = client.GetDataReplicationReplicationExtensionResource(dataReplicationReplicationExtensionResourceId); + + // invoke the operation + DataReplicationReplicationExtensionResource result = await dataReplicationReplicationExtension.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ReplicationExtension_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ReplicationExtensionCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ReplicationExtension_Create.json + // this example is just showing the usage of "ReplicationExtension_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationReplicationExtensionResource created on azure + // for more information of creating DataReplicationReplicationExtensionResource, please refer to the document of DataReplicationReplicationExtensionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string replicationExtensionName = "g16yjJ"; + ResourceIdentifier dataReplicationReplicationExtensionResourceId = DataReplicationReplicationExtensionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + DataReplicationReplicationExtensionResource dataReplicationReplicationExtension = client.GetDataReplicationReplicationExtensionResource(dataReplicationReplicationExtensionResourceId); + + // invoke the operation + DataReplicationReplicationExtensionData data = new DataReplicationReplicationExtensionData(new DataReplicationReplicationExtensionProperties(new GeneralReplicationExtensionModelCustomProperties())); + ArmOperation lro = await dataReplicationReplicationExtension.UpdateAsync(WaitUntil.Completed, data); + DataReplicationReplicationExtensionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ReplicationExtension_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ReplicationExtensionDelete() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ReplicationExtension_Delete.json + // this example is just showing the usage of "ReplicationExtension_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationReplicationExtensionResource created on azure + // for more information of creating DataReplicationReplicationExtensionResource, please refer to the document of DataReplicationReplicationExtensionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string replicationExtensionName = "g16yjJ"; + ResourceIdentifier dataReplicationReplicationExtensionResourceId = DataReplicationReplicationExtensionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + DataReplicationReplicationExtensionResource dataReplicationReplicationExtension = client.GetDataReplicationReplicationExtensionResource(dataReplicationReplicationExtensionResourceId); + + // invoke the operation + await dataReplicationReplicationExtension.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs new file mode 100644 index 000000000000..5083fcd49f69 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationVaultCollection + { + // Vault_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_VaultGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_Get.json + // this example is just showing the usage of "Vault_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation + string vaultName = "4"; + DataReplicationVaultResource result = await collection.GetAsync(vaultName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Vault_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_VaultGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_Get.json + // this example is just showing the usage of "Vault_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation + string vaultName = "4"; + bool result = await collection.ExistsAsync(vaultName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Vault_Create + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_VaultCreate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_Create.json + // this example is just showing the usage of "Vault_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation + string vaultName = "4"; + DataReplicationVaultData data = new DataReplicationVaultData(new AzureLocation("eck")) + { + Properties = new DataReplicationVaultProperties() + { + VaultType = DataReplicationReplicationVaultType.DisasterRecovery, + }, + Tags = +{ +["key5359"] = "ljfilxolxzuxrauopwtyxghrp", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); + DataReplicationVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Vault_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_VaultList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_List.json + // this example is just showing the usage of "Vault_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation and iterate over the result + string continuationToken = "mwculdaqndp"; + await foreach (DataReplicationVaultResource item in collection.GetAllAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs new file mode 100644 index 000000000000..23a47b81e4d9 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationVaultResource + { + // Vault_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_VaultGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_Get.json + // this example is just showing the usage of "Vault_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // invoke the operation + DataReplicationVaultResource result = await dataReplicationVault.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Vault_Update + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_VaultUpdate() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_Update.json + // this example is just showing the usage of "Vault_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // invoke the operation + DataReplicationVaultPatch patch = new DataReplicationVaultPatch() + { + Tags = +{ +["key8872"] = "pvtc", +}, + Properties = new DataReplicationVaultProperties() + { + VaultType = DataReplicationReplicationVaultType.DisasterRecovery, + }, + }; + ArmOperation lro = await dataReplicationVault.UpdateAsync(WaitUntil.Completed, patch); + DataReplicationVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Vault_Delete + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_VaultDelete() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_Delete.json + // this example is just showing the usage of "Vault_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // invoke the operation + await dataReplicationVault.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Vault_ListBySubscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDataReplicationVaults_VaultListBySubscription() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Vault_ListBySubscription.json + // this example is just showing the usage of "Vault_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string continuationToken = "dqsjhseyugyexxrlrln"; + await foreach (DataReplicationVaultResource item in subscriptionResource.GetDataReplicationVaultsAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowCollection.cs new file mode 100644 index 000000000000..3f94aa048f0b --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowCollection.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationWorkflowCollection + { + // Workflow_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_WorkflowGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Workflow_Get.json + // this example is just showing the usage of "Workflow_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationWorkflowResource + DataReplicationWorkflowCollection collection = dataReplicationVault.GetDataReplicationWorkflows(); + + // invoke the operation + string jobName = "ZGH4y"; + DataReplicationWorkflowResource result = await collection.GetAsync(jobName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationWorkflowData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Workflow_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_WorkflowGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Workflow_Get.json + // this example is just showing the usage of "Workflow_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationWorkflowResource + DataReplicationWorkflowCollection collection = dataReplicationVault.GetDataReplicationWorkflows(); + + // invoke the operation + string jobName = "ZGH4y"; + bool result = await collection.ExistsAsync(jobName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Workflow_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_WorkflowList() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Workflow_List.json + // this example is just showing the usage of "Workflow_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationWorkflowResource + DataReplicationWorkflowCollection collection = dataReplicationVault.GetDataReplicationWorkflows(); + + // invoke the operation and iterate over the result + string filter = "mnebpgmjcitjleipnttx"; + string continuationToken = "rdavrzbethhslmkqgajontnxsue"; + await foreach (DataReplicationWorkflowResource item in collection.GetAllAsync(filter: filter, continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationWorkflowData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowResource.cs new file mode 100644 index 000000000000..8c9fdc6befb1 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationWorkflowResource.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationWorkflowResource + { + // Workflow_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_WorkflowGet() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/Workflow_Get.json + // this example is just showing the usage of "Workflow_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationWorkflowResource created on azure + // for more information of creating DataReplicationWorkflowResource, please refer to the document of DataReplicationWorkflowResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string jobName = "ZGH4y"; + ResourceIdentifier dataReplicationWorkflowResourceId = DataReplicationWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, jobName); + DataReplicationWorkflowResource dataReplicationWorkflow = client.GetDataReplicationWorkflowResource(dataReplicationWorkflowResourceId); + + // invoke the operation + DataReplicationWorkflowResource result = await dataReplicationWorkflow.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationWorkflowData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs new file mode 100644 index 000000000000..804800374bd7 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_ResourceGroupResourceExtensions + { + // DeploymentPreflight + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task DeploymentPreflight_DeploymentPreflight() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/DeploymentPreflight.json + // this example is just showing the usage of "DeploymentPreflight" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // invoke the operation + string deploymentId = "kjoiahxljomjcmvabaobumg"; + DeploymentPreflightModel body = new DeploymentPreflightModel() + { + Resources = +{ +new DeploymentPreflightResource() +{ +Name = "xtgugoflfc", +DeploymentPreflightResourceType = new ResourceType("nsnaptduolqcxsikrewvgjbxqpt"), +Location = new AzureLocation("cbsgtxkjdzwbyp"), +ApiVersion = "otihymhvzblycdoxo", +} +}, + }; + DeploymentPreflightModel result = await resourceGroupResource.DeploymentPreflightAsync(deploymentId, body: body); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..a4f2d4294cc5 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.RecoveryServicesDataReplication; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + // CheckNameAvailability + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CheckDataReplicationNameAvailability_CheckNameAvailability() + { + // Generated from example definition: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/CheckNameAvailability.json + // this example is just showing the usage of "CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("trfqtbtmusswpibw"); + DataReplicationNameAvailabilityContent content = new DataReplicationNameAvailabilityContent() + { + Name = "updkdcixs", + ResourceType = new ResourceType("gngmcancdauwhdixjjvqnfkvqc"), + }; + DataReplicationNameAvailabilityResult result = await subscriptionResource.CheckDataReplicationNameAvailabilityAsync(location, content: content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs index f75f5f260655..73b7598df67a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs @@ -17,43 +17,43 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// Model factory for models. public static partial class ArmRecoveryServicesDataReplicationModelFactory { - /// Initializes a new instance of DraModelData. + /// Initializes a new instance of DataReplicationDraData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Dra model properties. - /// A new instance for mocking. - public static DraModelData DraModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DraModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationDraData DataReplicationDraData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationDraProperties properties = null) { - return new DraModelData(id, name, resourceType, systemData, properties); + return new DataReplicationDraData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of DraModelProperties. + /// Initializes a new instance of DataReplicationDraProperties. /// Gets or sets the Dra correlation Id. /// Gets or sets the machine Id where Dra is running. /// Gets or sets the machine name where Dra is running. /// Identity model. /// Identity model. /// Gets or sets a value indicating whether Dra is responsive. - /// Gets or sets the time when last heartbeat was sent by the Dra. + /// Gets or sets the time when last heartbeat was sent by the Dra. /// Gets or sets the Dra version. /// Gets or sets the provisioning state of the Dra. /// Gets or sets the list of health errors. /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include and . /// - /// A new instance for mocking. - public static DraModelProperties DraModelProperties(string correlationId = null, string machineId = null, string machineName = null, IdentityModel authenticationIdentity = null, IdentityModel resourceAccessIdentity = null, bool? isResponsive = null, DateTimeOffset? lastHeartbeat = null, string versionNumber = null, ProvisioningState? provisioningState = null, IEnumerable healthErrors = null, DraModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationDraProperties DataReplicationDraProperties(string correlationId = null, string machineId = null, string machineName = null, DataReplicationIdentity authenticationIdentity = null, DataReplicationIdentity resourceAccessIdentity = null, bool? isResponsive = null, DateTimeOffset? lastHeartbeatOn = null, string versionNumber = null, DataReplicationProvisioningState? provisioningState = null, IEnumerable healthErrors = null, DraModelCustomProperties customProperties = null) { - healthErrors ??= new List(); + healthErrors ??= new List(); - return new DraModelProperties(correlationId, machineId, machineName, authenticationIdentity, resourceAccessIdentity, isResponsive, lastHeartbeat, versionNumber, provisioningState, healthErrors?.ToList(), customProperties); + return new DataReplicationDraProperties(correlationId, machineId, machineName, authenticationIdentity, resourceAccessIdentity, isResponsive, lastHeartbeatOn, versionNumber, provisioningState, healthErrors?.ToList(), customProperties); } - /// Initializes a new instance of HealthErrorModel. + /// Initializes a new instance of DataReplicationHealthErrorInfo. /// Gets or sets the type of affected resource type. /// /// Gets or sets the list of affected resource correlation Ids. This can be used to @@ -72,16 +72,16 @@ public static DraModelProperties DraModelProperties(string correlationId = null, /// Gets or sets the error message. /// Gets or sets possible causes of the error. /// Gets or sets recommended action to resolve the error. - /// A new instance for mocking. - public static HealthErrorModel HealthErrorModel(string affectedResourceType = null, IEnumerable affectedResourceCorrelationIds = null, IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) + /// A new instance for mocking. + public static DataReplicationHealthErrorInfo DataReplicationHealthErrorInfo(string affectedResourceType = null, IEnumerable affectedResourceCorrelationIds = null, IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) { affectedResourceCorrelationIds ??= new List(); - childErrors ??= new List(); + childErrors ??= new List(); - return new HealthErrorModel(affectedResourceType, affectedResourceCorrelationIds?.ToList(), childErrors?.ToList(), code, healthCategory, category, severity, source, createdOn, isCustomerResolvable, summary, message, causes, recommendation); + return new DataReplicationHealthErrorInfo(affectedResourceType, affectedResourceCorrelationIds?.ToList(), childErrors?.ToList(), code, healthCategory, category, severity, source, createdOn, isCustomerResolvable, summary, message, causes, recommendation); } - /// Initializes a new instance of InnerHealthErrorModel. + /// Initializes a new instance of DataReplicationInnerHealthErrorInfo. /// Gets or sets the error code. /// Gets or sets the health category. /// Gets or sets the error category. @@ -93,57 +93,42 @@ public static HealthErrorModel HealthErrorModel(string affectedResourceType = nu /// Gets or sets the error message. /// Gets or sets possible causes of the error. /// Gets or sets recommended action to resolve the error. - /// A new instance for mocking. - public static InnerHealthErrorModel InnerHealthErrorModel(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) + /// A new instance for mocking. + public static DataReplicationInnerHealthErrorInfo DataReplicationInnerHealthErrorInfo(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) { - return new InnerHealthErrorModel(code, healthCategory, category, severity, source, createdOn, isCustomerResolvable, summary, message, causes, recommendation); + return new DataReplicationInnerHealthErrorInfo(code, healthCategory, category, severity, source, createdOn, isCustomerResolvable, summary, message, causes, recommendation); } - /// Initializes a new instance of OperationStatus. - /// Gets or sets the Id. - /// Gets or sets the operation name. - /// - /// Gets or sets the status of the operation. ARM expects the terminal status to be one of - /// Succeeded/ Failed/ Canceled. All other values imply that the operation is still running. - /// - /// Gets or sets the start time. - /// Gets or sets the end time. - /// A new instance for mocking. - public static OperationStatus OperationStatus(string id = null, string name = null, string status = null, string startTime = null, string endTime = null) - { - return new OperationStatus(id, name, status, startTime, endTime); - } - - /// Initializes a new instance of EmailConfigurationModelData. + /// Initializes a new instance of DataReplicationEmailConfigurationData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Email configuration model properties. - /// A new instance for mocking. - public static EmailConfigurationModelData EmailConfigurationModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EmailConfigurationModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationEmailConfigurationData DataReplicationEmailConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationEmailConfigurationProperties properties = null) { - return new EmailConfigurationModelData(id, name, resourceType, systemData, properties); + return new DataReplicationEmailConfigurationData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of EventModelData. + /// Initializes a new instance of DataReplicationEventData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Event model properties. - /// A new instance for mocking. - public static EventModelData EventModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EventModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationEventData DataReplicationEventData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationEventProperties properties = null) { - return new EventModelData(id, name, resourceType, systemData, properties); + return new DataReplicationEventData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of EventModelProperties. + /// Initializes a new instance of DataReplicationEventProperties. /// Gets or sets the resource type. /// Gets or sets the resource name. /// Gets or sets the event type. /// Gets or sets the event name. - /// Gets or sets the time at which the event occurred at source. + /// Gets or sets the time at which the event occurred at source. /// Gets or sets the event severity. /// Gets or sets the event description. /// Gets or sets the event correlation Id. @@ -151,17 +136,17 @@ public static EventModelData EventModelData(ResourceIdentifier id = null, string /// /// Event model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// - /// A new instance for mocking. - public static EventModelProperties EventModelProperties(string resourceType = null, string resourceName = null, string eventType = null, string eventName = null, DateTimeOffset? timeOfOccurrence = null, string severity = null, string description = null, string correlationId = null, IEnumerable healthErrors = null, EventModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationEventProperties DataReplicationEventProperties(ResourceType? resourceType = null, string resourceName = null, string eventType = null, string eventName = null, DateTimeOffset? occurredOn = null, string severity = null, string description = null, string correlationId = null, IEnumerable healthErrors = null, EventModelCustomProperties customProperties = null) { - healthErrors ??= new List(); + healthErrors ??= new List(); - return new EventModelProperties(resourceType, resourceName, eventType, eventName, timeOfOccurrence, severity, description, correlationId, healthErrors?.ToList(), customProperties); + return new DataReplicationEventProperties(resourceType, resourceName, eventType, eventName, occurredOn, severity, description, correlationId, healthErrors?.ToList(), customProperties); } - /// Initializes a new instance of FabricModelData. + /// Initializes a new instance of DataReplicationFabricData. /// The id. /// The name. /// The resourceType. @@ -169,15 +154,15 @@ public static EventModelProperties EventModelProperties(string resourceType = nu /// The tags. /// The location. /// Fabric model properties. - /// A new instance for mocking. - public static FabricModelData FabricModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, FabricModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationFabricData DataReplicationFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DataReplicationFabricProperties properties = null) { tags ??= new Dictionary(); - return new FabricModelData(id, name, resourceType, systemData, tags, location, properties); + return new DataReplicationFabricData(id, name, resourceType, systemData, tags, location, properties); } - /// Initializes a new instance of FabricModelProperties. + /// Initializes a new instance of DataReplicationFabricProperties. /// Gets or sets the provisioning state of the fabric. /// Gets or sets the service endpoint. /// Gets or sets the service resource Id. @@ -186,54 +171,54 @@ public static FabricModelData FabricModelData(ResourceIdentifier id = null, stri /// /// Fabric model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// - /// A new instance for mocking. - public static FabricModelProperties FabricModelProperties(ProvisioningState? provisioningState = null, string serviceEndpoint = null, string serviceResourceId = null, HealthStatus? health = null, IEnumerable healthErrors = null, FabricModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationFabricProperties DataReplicationFabricProperties(DataReplicationProvisioningState? provisioningState = null, string serviceEndpoint = null, ResourceIdentifier serviceResourceId = null, DataReplicationHealthStatus? health = null, IEnumerable healthErrors = null, FabricModelCustomProperties customProperties = null) { - healthErrors ??= new List(); + healthErrors ??= new List(); - return new FabricModelProperties(provisioningState, serviceEndpoint, serviceResourceId, health, healthErrors?.ToList(), customProperties); + return new DataReplicationFabricProperties(provisioningState, serviceEndpoint, serviceResourceId, health, healthErrors?.ToList(), customProperties); } - /// Initializes a new instance of PolicyModelData. + /// Initializes a new instance of DataReplicationPolicyData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Policy model properties. - /// A new instance for mocking. - public static PolicyModelData PolicyModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PolicyModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationPolicyData DataReplicationPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationPolicyProperties properties = null) { - return new PolicyModelData(id, name, resourceType, systemData, properties); + return new DataReplicationPolicyData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of PolicyModelProperties. + /// Initializes a new instance of DataReplicationPolicyProperties. /// Gets or sets the provisioning state of the policy. /// /// Policy model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// - /// A new instance for mocking. - public static PolicyModelProperties PolicyModelProperties(ProvisioningState? provisioningState = null, PolicyModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationPolicyProperties DataReplicationPolicyProperties(DataReplicationProvisioningState? provisioningState = null, PolicyModelCustomProperties customProperties = null) { - return new PolicyModelProperties(provisioningState, customProperties); + return new DataReplicationPolicyProperties(provisioningState, customProperties); } - /// Initializes a new instance of ProtectedItemModelData. + /// Initializes a new instance of DataReplicationProtectedItemData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Protected item model properties. - /// A new instance for mocking. - public static ProtectedItemModelData ProtectedItemModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProtectedItemModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationProtectedItemData DataReplicationProtectedItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationProtectedItemProperties properties = null) { - return new ProtectedItemModelData(id, name, resourceType, systemData, properties); + return new DataReplicationProtectedItemData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of ProtectedItemModelProperties. + /// Initializes a new instance of DataReplicationProtectedItemProperties. /// Gets or sets the policy name. /// Gets or sets the replication extension name. /// Gets or sets the protected item correlation Id. @@ -251,43 +236,29 @@ public static ProtectedItemModelData ProtectedItemModelData(ResourceIdentifier i /// Gets or sets the target fabric Id. /// Gets or sets the DRA Id. /// Gets or sets the target DRA Id. - /// Gets or sets a value indicating whether resynchronization is required or not. + /// Gets or sets a value indicating whether resynchronization is required or not. /// Gets or sets the Last successful planned failover time. /// Gets or sets the Last successful unplanned failover time. /// Gets or sets the Last successful test failover time. - /// + /// Protected item job properties. /// Gets or sets the allowed scenarios on the protected item. - /// - /// - /// + /// Protected item job properties. + /// Protected item job properties. + /// Protected item job properties. /// Gets or sets protected item replication health. /// Gets or sets the list of health errors. /// /// Protected item model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// - /// A new instance for mocking. - public static ProtectedItemModelProperties ProtectedItemModelProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, ProvisioningState? provisioningState = null, ProtectionState? protectionState = null, string protectionStateDescription = null, TestFailoverState? testFailoverState = null, string testFailoverStateDescription = null, ResynchronizationState? resynchronizationState = null, string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string draId = null, string targetDraId = null, bool? resyncRequired = null, DateTimeOffset? lastSuccessfulPlannedFailoverOn = null, DateTimeOffset? lastSuccessfulUnplannedFailoverOn = null, DateTimeOffset? lastSuccessfulTestFailoverOn = null, ProtectedItemModelPropertiesCurrentJob currentJob = null, IEnumerable allowedJobs = null, ProtectedItemModelPropertiesLastFailedEnableProtectionJob lastFailedEnableProtectionJob = null, ProtectedItemModelPropertiesLastFailedPlannedFailoverJob lastFailedPlannedFailoverJob = null, ProtectedItemModelPropertiesLastTestFailoverJob lastTestFailoverJob = null, HealthStatus? replicationHealth = null, IEnumerable healthErrors = null, ProtectedItemModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationProtectedItemProperties DataReplicationProtectedItemProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, DataReplicationProvisioningState? provisioningState = null, DataReplicationProtectionState? protectionState = null, string protectionStateDescription = null, DataReplicationTestFailoverState? testFailoverState = null, string testFailoverStateDescription = null, DataReplicationResynchronizationState? resynchronizationState = null, string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string draId = null, string targetDraId = null, bool? isResyncRequired = null, DateTimeOffset? lastSuccessfulPlannedFailoverOn = null, DateTimeOffset? lastSuccessfulUnplannedFailoverOn = null, DateTimeOffset? lastSuccessfulTestFailoverOn = null, ProtectedItemJobProperties currentJob = null, IEnumerable allowedJobs = null, ProtectedItemJobProperties lastFailedEnableProtectionJob = null, ProtectedItemJobProperties lastFailedPlannedFailoverJob = null, ProtectedItemJobProperties lastTestFailoverJob = null, DataReplicationHealthStatus? replicationHealth = null, IEnumerable healthErrors = null, ProtectedItemModelCustomProperties customProperties = null) { allowedJobs ??= new List(); - healthErrors ??= new List(); - - return new ProtectedItemModelProperties(policyName, replicationExtensionName, correlationId, provisioningState, protectionState, protectionStateDescription, testFailoverState, testFailoverStateDescription, resynchronizationState, fabricObjectId, fabricObjectName, sourceFabricProviderId, targetFabricProviderId, fabricId, targetFabricId, draId, targetDraId, resyncRequired, lastSuccessfulPlannedFailoverOn, lastSuccessfulUnplannedFailoverOn, lastSuccessfulTestFailoverOn, currentJob, allowedJobs?.ToList(), lastFailedEnableProtectionJob, lastFailedPlannedFailoverJob, lastTestFailoverJob, replicationHealth, healthErrors?.ToList(), customProperties); - } + healthErrors ??= new List(); - /// Initializes a new instance of ProtectedItemModelPropertiesCurrentJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - /// A new instance for mocking. - public static ProtectedItemModelPropertiesCurrentJob ProtectedItemModelPropertiesCurrentJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) - { - return new ProtectedItemModelPropertiesCurrentJob(scenarioName, id, name, displayName, state, startOn, endOn); + return new DataReplicationProtectedItemProperties(policyName, replicationExtensionName, correlationId, provisioningState, protectionState, protectionStateDescription, testFailoverState, testFailoverStateDescription, resynchronizationState, fabricObjectId, fabricObjectName, sourceFabricProviderId, targetFabricProviderId, fabricId, targetFabricId, draId, targetDraId, isResyncRequired, lastSuccessfulPlannedFailoverOn, lastSuccessfulUnplannedFailoverOn, lastSuccessfulTestFailoverOn, currentJob, allowedJobs?.ToList(), lastFailedEnableProtectionJob, lastFailedPlannedFailoverJob, lastTestFailoverJob, replicationHealth, healthErrors?.ToList(), customProperties); } /// Initializes a new instance of ProtectedItemJobProperties. @@ -304,116 +275,74 @@ public static ProtectedItemJobProperties ProtectedItemJobProperties(string scena return new ProtectedItemJobProperties(scenarioName, id, name, displayName, state, startOn, endOn); } - /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedEnableProtectionJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - /// A new instance for mocking. - public static ProtectedItemModelPropertiesLastFailedEnableProtectionJob ProtectedItemModelPropertiesLastFailedEnableProtectionJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) - { - return new ProtectedItemModelPropertiesLastFailedEnableProtectionJob(scenarioName, id, name, displayName, state, startOn, endOn); - } - - /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - /// A new instance for mocking. - public static ProtectedItemModelPropertiesLastFailedPlannedFailoverJob ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) - { - return new ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(scenarioName, id, name, displayName, state, startOn, endOn); - } - - /// Initializes a new instance of ProtectedItemModelPropertiesLastTestFailoverJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - /// A new instance for mocking. - public static ProtectedItemModelPropertiesLastTestFailoverJob ProtectedItemModelPropertiesLastTestFailoverJob(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) - { - return new ProtectedItemModelPropertiesLastTestFailoverJob(scenarioName, id, name, displayName, state, startOn, endOn); - } - - /// Initializes a new instance of RecoveryPointModelData. + /// Initializes a new instance of DataReplicationRecoveryPointData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Recovery point model properties. - /// A new instance for mocking. - public static RecoveryPointModelData RecoveryPointModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RecoveryPointModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationRecoveryPointData DataReplicationRecoveryPointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationRecoveryPointProperties properties = null) { - return new RecoveryPointModelData(id, name, resourceType, systemData, properties); + return new DataReplicationRecoveryPointData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of RecoveryPointModelProperties. + /// Initializes a new instance of DataReplicationRecoveryPointProperties. /// Gets or sets the recovery point time. /// Gets or sets the recovery point type. /// /// Recovery point model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// /// is null. - /// A new instance for mocking. - public static RecoveryPointModelProperties RecoveryPointModelProperties(DateTimeOffset recoveryPointOn = default, RecoveryPointType recoveryPointType = default, RecoveryPointModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationRecoveryPointProperties DataReplicationRecoveryPointProperties(DateTimeOffset recoveryPointOn = default, DataReplicationRecoveryPointType recoveryPointType = default, RecoveryPointModelCustomProperties customProperties = null) { if (customProperties == null) { throw new ArgumentNullException(nameof(customProperties)); } - return new RecoveryPointModelProperties(recoveryPointOn, recoveryPointType, customProperties); + return new DataReplicationRecoveryPointProperties(recoveryPointOn, recoveryPointType, customProperties); } - /// Initializes a new instance of ReplicationExtensionModelData. + /// Initializes a new instance of DataReplicationReplicationExtensionData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Replication extension model properties. - /// A new instance for mocking. - public static ReplicationExtensionModelData ReplicationExtensionModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationExtensionModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationReplicationExtensionData DataReplicationReplicationExtensionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationReplicationExtensionProperties properties = null) { - return new ReplicationExtensionModelData(id, name, resourceType, systemData, properties); + return new DataReplicationReplicationExtensionData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of ReplicationExtensionModelProperties. + /// Initializes a new instance of DataReplicationReplicationExtensionProperties. /// Gets or sets the provisioning state of the replication extension. /// /// Replication extension model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// - /// A new instance for mocking. - public static ReplicationExtensionModelProperties ReplicationExtensionModelProperties(ProvisioningState? provisioningState = null, ReplicationExtensionModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationReplicationExtensionProperties DataReplicationReplicationExtensionProperties(DataReplicationProvisioningState? provisioningState = null, ReplicationExtensionModelCustomProperties customProperties = null) { - return new ReplicationExtensionModelProperties(provisioningState, customProperties); + return new DataReplicationReplicationExtensionProperties(provisioningState, customProperties); } - /// Initializes a new instance of CheckNameAvailabilityResponseModel. - /// Gets or sets a value indicating whether resource name is available or not. + /// Initializes a new instance of DataReplicationNameAvailabilityResult. + /// Gets or sets a value indicating whether resource name is available or not. /// Gets or sets the reason for resource name unavailability. /// Gets or sets the message for resource name unavailability. - /// A new instance for mocking. - public static CheckNameAvailabilityResponseModel CheckNameAvailabilityResponseModel(bool? nameAvailable = null, string reason = null, string message = null) + /// A new instance for mocking. + public static DataReplicationNameAvailabilityResult DataReplicationNameAvailabilityResult(bool? isNameAvailable = null, string reason = null, string message = null) { - return new CheckNameAvailabilityResponseModel(nameAvailable, reason, message); + return new DataReplicationNameAvailabilityResult(isNameAvailable, reason, message); } - /// Initializes a new instance of VaultModelData. + /// Initializes a new instance of DataReplicationVaultData. /// The id. /// The name. /// The resourceType. @@ -421,37 +350,37 @@ public static CheckNameAvailabilityResponseModel CheckNameAvailabilityResponseMo /// The tags. /// The location. /// Vault properties. - /// A new instance for mocking. - public static VaultModelData VaultModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, VaultModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationVaultData DataReplicationVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DataReplicationVaultProperties properties = null) { tags ??= new Dictionary(); - return new VaultModelData(id, name, resourceType, systemData, tags, location, properties); + return new DataReplicationVaultData(id, name, resourceType, systemData, tags, location, properties); } - /// Initializes a new instance of VaultModelProperties. + /// Initializes a new instance of DataReplicationVaultProperties. /// Gets or sets the provisioning state of the vault. /// Gets or sets the service resource Id. /// Gets or sets the type of vault. - /// A new instance for mocking. - public static VaultModelProperties VaultModelProperties(ProvisioningState? provisioningState = null, string serviceResourceId = null, ReplicationVaultType? vaultType = null) + /// A new instance for mocking. + public static DataReplicationVaultProperties DataReplicationVaultProperties(DataReplicationProvisioningState? provisioningState = null, ResourceIdentifier serviceResourceId = null, DataReplicationReplicationVaultType? vaultType = null) { - return new VaultModelProperties(provisioningState, serviceResourceId, vaultType); + return new DataReplicationVaultProperties(provisioningState, serviceResourceId, vaultType); } - /// Initializes a new instance of WorkflowModelData. + /// Initializes a new instance of DataReplicationWorkflowData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Workflow model properties. - /// A new instance for mocking. - public static WorkflowModelData WorkflowModelData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkflowModelProperties properties = null) + /// A new instance for mocking. + public static DataReplicationWorkflowData DataReplicationWorkflowData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationWorkflowProperties properties = null) { - return new WorkflowModelData(id, name, resourceType, systemData, properties); + return new DataReplicationWorkflowData(id, name, resourceType, systemData, properties); } - /// Initializes a new instance of WorkflowModelProperties. + /// Initializes a new instance of DataReplicationWorkflowProperties. /// Gets or sets the friendly display name. /// Gets or sets the workflow state. /// Gets or sets the start time. @@ -473,32 +402,32 @@ public static WorkflowModelData WorkflowModelData(ResourceIdentifier id = null, /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// A new instance for mocking. - public static WorkflowModelProperties WorkflowModelProperties(string displayName = null, WorkflowState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, WorkflowObjectType? objectType = null, string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, IEnumerable allowedActions = null, string activityId = null, IEnumerable tasks = null, IEnumerable errors = null, WorkflowModelCustomProperties customProperties = null) + /// A new instance for mocking. + public static DataReplicationWorkflowProperties DataReplicationWorkflowProperties(string displayName = null, DataReplicationWorkflowState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, WorkflowObjectType? objectType = null, string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, IEnumerable allowedActions = null, string activityId = null, IEnumerable tasks = null, IEnumerable errors = null, WorkflowModelCustomProperties customProperties = null) { allowedActions ??= new List(); - tasks ??= new List(); - errors ??= new List(); + tasks ??= new List(); + errors ??= new List(); - return new WorkflowModelProperties(displayName, state, startOn, endOn, objectId, objectName, objectInternalId, objectInternalName, objectType, replicationProviderId, sourceFabricProviderId, targetFabricProviderId, allowedActions?.ToList(), activityId, tasks?.ToList(), errors?.ToList(), customProperties); + return new DataReplicationWorkflowProperties(displayName, state, startOn, endOn, objectId, objectName, objectInternalId, objectInternalName, objectType, replicationProviderId, sourceFabricProviderId, targetFabricProviderId, allowedActions?.ToList(), activityId, tasks?.ToList(), errors?.ToList(), customProperties); } - /// Initializes a new instance of TaskModel. + /// Initializes a new instance of DataReplicationTask. /// Gets or sets the task name. /// Gets or sets the task state. /// Gets or sets the start time. /// Gets or sets the end time. /// Task model custom properties. /// Gets or sets the list of children workflow models. - /// A new instance for mocking. - public static TaskModel TaskModel(string taskName = null, TaskState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string customInstanceType = null, IEnumerable childrenWorkflows = null) + /// A new instance for mocking. + public static DataReplicationTask DataReplicationTask(string taskName = null, DataReplicationTaskState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string customInstanceType = null, IEnumerable childrenWorkflows = null) { - childrenWorkflows ??= new List(); + childrenWorkflows ??= new List(); - return new TaskModel(taskName, state, startOn, endOn, customInstanceType != null ? new TaskModelCustomProperties(customInstanceType) : null, childrenWorkflows?.ToList()); + return new DataReplicationTask(taskName, state, startOn, endOn, customInstanceType != null ? new TaskModelCustomProperties(customInstanceType) : null, childrenWorkflows?.ToList()); } - /// Initializes a new instance of ErrorModel. + /// Initializes a new instance of DataReplicationErrorInfo. /// Gets or sets the error code. /// Gets or sets the error type. /// Gets or sets the error severity. @@ -506,10 +435,10 @@ public static TaskModel TaskModel(string taskName = null, TaskState? state = nul /// Gets or sets the error message. /// Gets or sets the possible causes of error. /// Gets or sets the recommended action to resolve error. - /// A new instance for mocking. - public static ErrorModel ErrorModel(string code = null, string errorModelType = null, string severity = null, DateTimeOffset? createdOn = null, string message = null, string causes = null, string recommendation = null) + /// A new instance for mocking. + public static DataReplicationErrorInfo DataReplicationErrorInfo(string code = null, string errorModelType = null, string severity = null, DateTimeOffset? createdOn = null, string message = null, string causes = null, string recommendation = null) { - return new ErrorModel(code, errorModelType, severity, createdOn, message, causes, recommendation); + return new DataReplicationErrorInfo(code, errorModelType, severity, createdOn, message, causes, recommendation); } /// Initializes a new instance of WorkflowModelCustomProperties. @@ -523,7 +452,7 @@ public static WorkflowModelCustomProperties WorkflowModelCustomProperties(string return new UnknownWorkflowModelCustomProperties(instanceType, affectedObjectDetails); } - /// Initializes a new instance of AzStackHCIFabricModelCustomProperties. + /// Initializes a new instance of AzStackHciFabricModelCustomProperties. /// Gets or sets the ARM Id of the AzStackHCI site. /// Gets or sets the Appliance name. /// AzStackHCI cluster properties. @@ -531,12 +460,12 @@ public static WorkflowModelCustomProperties WorkflowModelCustomProperties(string /// Gets or sets the fabric container Id. /// Gets or sets the Migration solution ARM Id. /// Gets or sets the migration hub Uri. - /// A new instance for mocking. - public static AzStackHCIFabricModelCustomProperties AzStackHCIFabricModelCustomProperties(string azStackHciSiteId = null, IEnumerable applianceName = null, AzStackHCIClusterProperties cluster = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, Uri migrationHubUri = null) + /// A new instance for mocking. + public static AzStackHciFabricModelCustomProperties AzStackHciFabricModelCustomProperties(ResourceIdentifier azStackHciSiteId = null, IEnumerable applianceName = null, AzStackHciClusterProperties cluster = null, ResourceIdentifier fabricResourceId = null, string fabricContainerId = null, ResourceIdentifier migrationSolutionId = null, Uri migrationHubUri = null) { applianceName ??= new List(); - return new AzStackHCIFabricModelCustomProperties("AzStackHCI", azStackHciSiteId, applianceName?.ToList(), cluster, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); + return new AzStackHciFabricModelCustomProperties("AzStackHCI", azStackHciSiteId, applianceName?.ToList(), cluster, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); } /// Initializes a new instance of FailoverProtectedItemProperties. @@ -572,36 +501,36 @@ public static FailoverWorkflowModelCustomProperties FailoverWorkflowModelCustomP /// Gets or sets the migration solution ARM Id. /// Gets or sets the migration hub Uri. /// A new instance for mocking. - public static HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelCustomProperties(string hyperVSiteId = null, string fabricResourceId = null, string fabricContainerId = null, string migrationSolutionId = null, Uri migrationHubUri = null) + public static HyperVMigrateFabricModelCustomProperties HyperVMigrateFabricModelCustomProperties(ResourceIdentifier hyperVSiteId = null, ResourceIdentifier fabricResourceId = null, string fabricContainerId = null, ResourceIdentifier migrationSolutionId = null, Uri migrationHubUri = null) { return new HyperVMigrateFabricModelCustomProperties("HyperVMigrate", hyperVSiteId, fabricResourceId, fabricContainerId, migrationSolutionId, migrationHubUri); } - /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciEventModelCustomProperties. /// Gets or sets the friendly name of the source which has raised this health event. /// Gets or sets the protected item friendly name. /// Gets or sets the source appliance name. /// Gets or sets the source target name. /// Gets or sets the server type. - /// A new instance for mocking. - public static HyperVToAzStackHCIEventModelCustomProperties HyperVToAzStackHCIEventModelCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) + /// A new instance for mocking. + public static HyperVToAzStackHciEventModelCustomProperties HyperVToAzStackHciEventModelCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { - return new HyperVToAzStackHCIEventModelCustomProperties("HyperVToAzStackHCI", eventSourceFriendlyName, protectedItemFriendlyName, sourceApplianceName, targetApplianceName, serverType); + return new HyperVToAzStackHciEventModelCustomProperties("HyperVToAzStackHCI", eventSourceFriendlyName, protectedItemFriendlyName, sourceApplianceName, targetApplianceName, serverType); } - /// Initializes a new instance of HyperVToAzStackHCINicInput. + /// Initializes a new instance of HyperVToAzStackHciNicInput. /// Gets or sets the NIC Id. /// Gets or sets the network name. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - /// A new instance for mocking. - public static HyperVToAzStackHCINicInput HyperVToAzStackHCINicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default) + /// A new instance for mocking. + public static HyperVToAzStackHciNicInput HyperVToAzStackHciNicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default) { - return new HyperVToAzStackHCINicInput(nicId, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + return new HyperVToAzStackHciNicInput(nicId, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); } - /// Initializes a new instance of HyperVToAzStackHCIProtectedDiskProperties. + /// Initializes a new instance of HyperVToAzStackHciProtectedDiskProperties. /// Gets or sets the ARM Id of the storage container. /// Gets or sets the local path of the storage container. /// Gets or sets the source disk Id. @@ -616,13 +545,13 @@ public static HyperVToAzStackHCINicInput HyperVToAzStackHCINicInput(string nicId /// disk. /// /// Gets or sets the disk type. - /// A new instance for mocking. - public static HyperVToAzStackHCIProtectedDiskProperties HyperVToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null) + /// A new instance for mocking. + public static HyperVToAzStackHciProtectedDiskProperties HyperVToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null) { - return new HyperVToAzStackHCIProtectedDiskProperties(storageContainerId, storageContainerLocalPath, sourceDiskId, sourceDiskName, seedDiskName, testMigrateDiskName, migrateDiskName, isOSDisk, capacityInBytes, isDynamic, diskType); + return new HyperVToAzStackHciProtectedDiskProperties(storageContainerId, storageContainerLocalPath, sourceDiskId, sourceDiskName, seedDiskName, testMigrateDiskName, migrateDiskName, isOSDisk, capacityInBytes, isDynamic, diskType); } - /// Initializes a new instance of HyperVToAzStackHCIProtectedItemModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciProtectedItemModelCustomProperties. /// Gets or sets the location of the protected item. /// Gets or sets the Target HCI Cluster ARM Id. /// Gets or sets the Target Arc Cluster Custom Location ARM Id. @@ -668,41 +597,41 @@ public static HyperVToAzStackHCIProtectedDiskProperties HyperVToAzStackHCIProtec /// Gets or sets the VM NIC details. /// Gets or sets the BIOS Id of the target AzStackHCI VM. /// Gets or sets the latest timestamp that replication status is updated. - /// A new instance for mocking. - public static HyperVToAzStackHCIProtectedItemModelCustomProperties HyperVToAzStackHCIProtectedItemModelCustomProperties(ProtectedItemActiveLocation? activeLocation = null, string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string fabricDiscoveryMachineId = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string targetVmName = null, string targetResourceGroupId = null, string storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceived = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? resyncProgressPercentage = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, DateTimeOffset? lastReplicationUpdateOn = null) + /// A new instance for mocking. + public static HyperVToAzStackHciProtectedItemModelCustomProperties HyperVToAzStackHciProtectedItemModelCustomProperties(ProtectedItemActiveLocation? activeLocation = null, ResourceIdentifier targetHciClusterId = null, ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, ResourceIdentifier fabricDiscoveryMachineId = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string targetVmName = null, ResourceIdentifier targetResourceGroupId = null, ResourceIdentifier storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceived = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? resyncProgressPercentage = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, DateTimeOffset? lastReplicationUpdateOn = null) { - disksToInclude ??= new List(); - nicsToInclude ??= new List(); - protectedDisks ??= new List(); - protectedNics ??= new List(); + disksToInclude ??= new List(); + nicsToInclude ??= new List(); + protectedDisks ??= new List(); + protectedNics ??= new List(); - return new HyperVToAzStackHCIProtectedItemModelCustomProperties("HyperVToAzStackHCI", activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, fabricDiscoveryMachineId, disksToInclude?.ToList(), nicsToInclude?.ToList(), sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, targetVmName, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, osType, osName, firmwareType, targetLocation, customLocationRegion, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, resyncProgressPercentage, protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, lastReplicationUpdateOn); + return new HyperVToAzStackHciProtectedItemModelCustomProperties("HyperVToAzStackHCI", activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, fabricDiscoveryMachineId, disksToInclude?.ToList(), nicsToInclude?.ToList(), sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, targetVmName, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, osType, osName, firmwareType, targetLocation, customLocationRegion, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, resyncProgressPercentage, protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, lastReplicationUpdateOn); } - /// Initializes a new instance of HyperVToAzStackHCIProtectedNicProperties. + /// Initializes a new instance of HyperVToAzStackHciProtectedNicProperties. /// Gets or sets the NIC Id. /// Gets or sets the NIC mac address. /// Gets or sets the network name. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - /// A new instance for mocking. - public static HyperVToAzStackHCIProtectedNicProperties HyperVToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) + /// A new instance for mocking. + public static HyperVToAzStackHciProtectedNicProperties HyperVToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) { - return new HyperVToAzStackHCIProtectedNicProperties(nicId, macAddress, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + return new HyperVToAzStackHciProtectedNicProperties(nicId, macAddress, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); } - /// Initializes a new instance of HyperVToAzStackHCIRecoveryPointModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciRecoveryPointModelCustomProperties. /// Gets or sets the list of the disk Ids. - /// A new instance for mocking. - public static HyperVToAzStackHCIRecoveryPointModelCustomProperties HyperVToAzStackHCIRecoveryPointModelCustomProperties(IEnumerable diskIds = null) + /// A new instance for mocking. + public static HyperVToAzStackHciRecoveryPointModelCustomProperties HyperVToAzStackHciRecoveryPointModelCustomProperties(IEnumerable diskIds = null) { diskIds ??= new List(); - return new HyperVToAzStackHCIRecoveryPointModelCustomProperties("HyperVToAzStackHCI", diskIds?.ToList()); + return new HyperVToAzStackHciRecoveryPointModelCustomProperties("HyperVToAzStackHCI", diskIds?.ToList()); } - /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciReplicationExtensionModelCustomProperties. /// Gets or sets the ARM Id of the source HyperV fabric. /// Gets or sets the ARM Id of the HyperV site. /// Gets or sets the ARM Id of the target AzStackHCI fabric. @@ -719,10 +648,10 @@ public static HyperVToAzStackHCIRecoveryPointModelCustomProperties HyperVToAzSta /// Gets or sets the resource location. /// Gets or sets the subscription. /// Gets or sets the resource group. - /// A new instance for mocking. - public static HyperVToAzStackHCIReplicationExtensionModelCustomProperties HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId = null, string hyperVSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) + /// A new instance for mocking. + public static HyperVToAzStackHciReplicationExtensionModelCustomProperties HyperVToAzStackHciReplicationExtensionModelCustomProperties(ResourceIdentifier hyperVFabricArmId = null, ResourceIdentifier hyperVSiteId = null, ResourceIdentifier azStackHciFabricArmId = null, ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { - return new HyperVToAzStackHCIReplicationExtensionModelCustomProperties("HyperVToAzStackHCI", hyperVFabricArmId, hyperVSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); + return new HyperVToAzStackHciReplicationExtensionModelCustomProperties("HyperVToAzStackHCI", hyperVFabricArmId, hyperVSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); } /// Initializes a new instance of TestFailoverCleanupWorkflowModelCustomProperties. @@ -748,20 +677,20 @@ public static TestFailoverWorkflowModelCustomProperties TestFailoverWorkflowMode return new TestFailoverWorkflowModelCustomProperties("TestFailoverWorkflowDetails", affectedObjectDetails, protectedItemDetails?.ToList()); } - /// Initializes a new instance of VMwareToAzStackHCINicInput. + /// Initializes a new instance of VMwareToAzStackHciNicInput. /// Gets or sets the NIC Id. /// Gets or sets the NIC label. /// Gets or sets the network name. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - /// A new instance for mocking. - public static VMwareToAzStackHCINicInput VMwareToAzStackHCINicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default) + /// A new instance for mocking. + public static VMwareToAzStackHciNicInput VMwareToAzStackHciNicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default) { - return new VMwareToAzStackHCINicInput(nicId, label, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + return new VMwareToAzStackHciNicInput(nicId, label, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); } - /// Initializes a new instance of VMwareToAzStackHCIProtectedDiskProperties. + /// Initializes a new instance of VMwareToAzStackHciProtectedDiskProperties. /// Gets or sets the ARM Id of the storage container. /// Gets or sets the local path of the storage container. /// Gets or sets the source disk Id. @@ -776,13 +705,13 @@ public static VMwareToAzStackHCINicInput VMwareToAzStackHCINicInput(string nicId /// disk. /// /// Gets or sets the disk type. - /// A new instance for mocking. - public static VMwareToAzStackHCIProtectedDiskProperties VMwareToAzStackHCIProtectedDiskProperties(string storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null) + /// A new instance for mocking. + public static VMwareToAzStackHciProtectedDiskProperties VMwareToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null) { - return new VMwareToAzStackHCIProtectedDiskProperties(storageContainerId, storageContainerLocalPath, sourceDiskId, sourceDiskName, seedDiskName, testMigrateDiskName, migrateDiskName, isOSDisk, capacityInBytes, isDynamic, diskType); + return new VMwareToAzStackHciProtectedDiskProperties(storageContainerId, storageContainerLocalPath, sourceDiskId, sourceDiskName, seedDiskName, testMigrateDiskName, migrateDiskName, isOSDisk, capacityInBytes, isDynamic, diskType); } - /// Initializes a new instance of VMwareToAzStackHCIProtectedItemModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciProtectedItemModelCustomProperties. /// Gets or sets the location of the protected item. /// Gets or sets the Target HCI Cluster ARM Id. /// Gets or sets the Target Arc Cluster Custom Location ARM Id. @@ -835,18 +764,18 @@ public static VMwareToAzStackHCIProtectedDiskProperties VMwareToAzStackHCIProtec /// Gets or sets a value indicating whether auto resync is to be done. /// Gets or sets the resume retry count. /// Gets or sets the latest timestamp that replication status is updated. - /// A new instance for mocking. - public static VMwareToAzStackHCIProtectedItemModelCustomProperties VMwareToAzStackHCIProtectedItemModelCustomProperties(ProtectedItemActiveLocation? activeLocation = null, string targetHciClusterId = null, string targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, string storageContainerId = null, string targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string osType = null, string osName = null, string firmwareType = null, string fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceived = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? migrationProgressPercentage = null, int? resumeProgressPercentage = null, int? resyncProgressPercentage = null, long? resyncRetryCount = null, bool? resyncRequired = null, VMwareToAzureMigrateResyncState? resyncState = null, bool? performAutoResync = null, long? resumeRetryCount = null, DateTimeOffset? lastReplicationUpdateOn = null) + /// A new instance for mocking. + public static VMwareToAzStackHciProtectedItemModelCustomProperties VMwareToAzStackHciProtectedItemModelCustomProperties(ProtectedItemActiveLocation? activeLocation = null, ResourceIdentifier targetHciClusterId = null, ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, ResourceIdentifier storageContainerId = null, ResourceIdentifier targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string osType = null, string osName = null, string firmwareType = null, ResourceIdentifier fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string runAsAccountId = null, string sourceDraName = null, string targetDraName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceived = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? migrationProgressPercentage = null, int? resumeProgressPercentage = null, int? resyncProgressPercentage = null, long? resyncRetryCount = null, bool? resyncRequired = null, VMwareToAzureMigrateResyncState? resyncState = null, bool? performAutoResync = null, long? resumeRetryCount = null, DateTimeOffset? lastReplicationUpdateOn = null) { - disksToInclude ??= new List(); - nicsToInclude ??= new List(); - protectedDisks ??= new List(); - protectedNics ??= new List(); + disksToInclude ??= new List(); + nicsToInclude ??= new List(); + protectedDisks ??= new List(); + protectedNics ??= new List(); - return new VMwareToAzStackHCIProtectedItemModelCustomProperties("VMwareToAzStackHCI", activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, storageContainerId, targetResourceGroupId, targetLocation, customLocationRegion, disksToInclude?.ToList(), nicsToInclude?.ToList(), protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, targetVmName, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, osType, osName, firmwareType, fabricDiscoveryMachineId, sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, migrationProgressPercentage, resumeProgressPercentage, resyncProgressPercentage, resyncRetryCount, resyncRequired, resyncState, performAutoResync, resumeRetryCount, lastReplicationUpdateOn); + return new VMwareToAzStackHciProtectedItemModelCustomProperties("VMwareToAzStackHCI", activeLocation, targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName, storageContainerId, targetResourceGroupId, targetLocation, customLocationRegion, disksToInclude?.ToList(), nicsToInclude?.ToList(), protectedDisks?.ToList(), protectedNics?.ToList(), targetVmBiosId, targetVmName, hyperVGeneration, targetNetworkId, testNetworkId, targetCpuCores, isDynamicRam, dynamicMemoryConfig, targetMemoryInMegaBytes, osType, osName, firmwareType, fabricDiscoveryMachineId, sourceVmName, sourceCpuCores, sourceMemoryInMegaBytes, runAsAccountId, sourceDraName, targetDraName, sourceApplianceName, targetApplianceName, failoverRecoveryPointId, lastRecoveryPointReceived, lastRecoveryPointId, initialReplicationProgressPercentage, migrationProgressPercentage, resumeProgressPercentage, resyncProgressPercentage, resyncRetryCount, resyncRequired, resyncState, performAutoResync, resumeRetryCount, lastReplicationUpdateOn); } - /// Initializes a new instance of VMwareToAzStackHCIProtectedNicProperties. + /// Initializes a new instance of VMwareToAzStackHciProtectedNicProperties. /// Gets or sets the NIC Id. /// Gets or sets the NIC mac address. /// Gets or sets the NIC label. @@ -855,13 +784,13 @@ public static VMwareToAzStackHCIProtectedItemModelCustomProperties VMwareToAzSta /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - /// A new instance for mocking. - public static VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) + /// A new instance for mocking. + public static VMwareToAzStackHciProtectedNicProperties VMwareToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) { - return new VMwareToAzStackHCIProtectedNicProperties(nicId, macAddress, label, isPrimaryNic, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); + return new VMwareToAzStackHciProtectedNicProperties(nicId, macAddress, label, isPrimaryNic, networkName, targetNetworkId, testNetworkId, selectionTypeForFailover); } - /// Initializes a new instance of VMwareToAzStackHCIReplicationExtensionModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciReplicationExtensionModelCustomProperties. /// Gets or sets the ARM Id of the source VMware fabric. /// Gets or sets the ARM Id of the VMware site. /// Gets or sets the ARM Id of the target AzStackHCI fabric. @@ -878,10 +807,10 @@ public static VMwareToAzStackHCIProtectedNicProperties VMwareToAzStackHCIProtect /// Gets or sets the resource location. /// Gets or sets the subscription. /// Gets or sets the resource group. - /// A new instance for mocking. - public static VMwareToAzStackHCIReplicationExtensionModelCustomProperties VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId = null, string vmwareSiteId = null, string azStackHciFabricArmId = null, string azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) + /// A new instance for mocking. + public static VMwareToAzStackHciReplicationExtensionModelCustomProperties VMwareToAzStackHciReplicationExtensionModelCustomProperties(ResourceIdentifier vmwareFabricArmId = null, ResourceIdentifier vmwareSiteId = null, ResourceIdentifier azStackHciFabricArmId = null, ResourceIdentifier azStackHciSiteId = null, ResourceIdentifier storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { - return new VMwareToAzStackHCIReplicationExtensionModelCustomProperties("VMwareToAzStackHCI", vmwareFabricArmId, vmwareSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); + return new VMwareToAzStackHciReplicationExtensionModelCustomProperties("VMwareToAzStackHCI", vmwareFabricArmId, vmwareSiteId, azStackHciFabricArmId, azStackHciSiteId, storageAccountId, storageAccountSasSecretName, asrServiceUri, rcmServiceUri, gatewayServiceUri, sourceGatewayServiceId, targetGatewayServiceId, sourceStorageContainerName, targetStorageContainerName, resourceLocation, subscriptionId, resourceGroup); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraCollection.cs similarity index 65% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraCollection.cs index 1321b08ea388..d621f8e7b62f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDraModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationDras method from an instance of . /// - public partial class DraModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationDraCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _draModelDraClientDiagnostics; - private readonly DraRestOperations _draModelDraRestClient; + private readonly ClientDiagnostics _dataReplicationDraDraClientDiagnostics; + private readonly DraRestOperations _dataReplicationDraDraRestClient; - /// Initializes a new instance of the class for mocking. - protected DraModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationDraCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DraModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationDraCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _draModelDraClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DraModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DraModelResource.ResourceType, out string draModelDraApiVersion); - _draModelDraRestClient = new DraRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, draModelDraApiVersion); + _dataReplicationDraDraClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationDraResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationDraResource.ResourceType, out string dataReplicationDraDraApiVersion); + _dataReplicationDraDraRestClient = new DraRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationDraDraApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal DraModelCollection(ArmClient client, ResourceIdentifier id) : base(clie internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != FabricModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FabricModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationFabricResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationFabricResource.ResourceType), nameof(id)); } /// @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricAgentName, DataReplicationDraData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationDraDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationDraOperationSource(Client), _dataReplicationDraDraClientDiagnostics, Pipeline, _dataReplicationDraDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricAgentName, DataReplicationDraData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraCollection.CreateOrUpdate"); scope.Start(); try { - var response = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationDraDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationDraOperationSource(Client), _dataReplicationDraDraClientDiagnostics, Pipeline, _dataReplicationDraDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string fabricAgentName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Get"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraCollection.Get"); scope.Start(); try { - var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationDraDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationDraResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string fabricAgen /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string fabricAgentName, CancellationToken cancellationToken = default) + public virtual Response Get(string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Get"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraCollection.Get"); scope.Start(); try { - var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken); + var response = _dataReplicationDraDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationDraResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string fabricAgentName, Cancellati /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationDraDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationDraDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationDraResource(Client, DataReplicationDraData.DeserializeDataReplicationDraData(e)), _dataReplicationDraDraClientDiagnostics, Pipeline, "DataReplicationDraCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationDraDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationDraDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationDraResource(Client, DataReplicationDraData.DeserializeDataReplicationDraData(e)), _dataReplicationDraDraClientDiagnostics, Pipeline, "DataReplicationDraCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string fabricAgentName, Ca { Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Exists"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraCollection.Exists"); scope.Start(); try { - var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationDraDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string fabricAgentName, CancellationToken c { Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelCollection.Exists"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraCollection.Exists"); scope.Start(); try { - var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken); + var response = _dataReplicationDraDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string fabricAgentName, CancellationToken c } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraData.cs similarity index 62% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraData.cs index 17929878fe0a..ab8854bc1a9b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the DraModel data model. + /// A class representing the DataReplicationDra data model. /// Dra model. /// - public partial class DraModelData : ResourceData + public partial class DataReplicationDraData : ResourceData { - /// Initializes a new instance of DraModelData. + /// Initializes a new instance of DataReplicationDraData. /// Dra model properties. /// is null. - public DraModelData(DraModelProperties properties) + public DataReplicationDraData(DataReplicationDraProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of DraModelData. + /// Initializes a new instance of DataReplicationDraData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Dra model properties. - internal DraModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DraModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationDraData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationDraProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Dra model properties. - public DraModelProperties Properties { get; set; } + public DataReplicationDraProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraResource.cs similarity index 57% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraResource.cs index 714c92a47794..cdffaa9b5db9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DraModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationDraResource.cs @@ -13,55 +13,50 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing a DraModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetDraModelResource method. - /// Otherwise you can get one from its parent resource using the GetDraModel method. + /// A Class representing a DataReplicationDra along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationDraResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationDra method. /// - public partial class DraModelResource : ArmResource + public partial class DataReplicationDraResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _draModelDraClientDiagnostics; - private readonly DraRestOperations _draModelDraRestClient; - private readonly ClientDiagnostics _draOperationStatusClientDiagnostics; - private readonly DraOperationStatusRestOperations _draOperationStatusRestClient; - private readonly DraModelData _data; + private readonly ClientDiagnostics _dataReplicationDraDraClientDiagnostics; + private readonly DraRestOperations _dataReplicationDraDraRestClient; + private readonly DataReplicationDraData _data; - /// Initializes a new instance of the class for mocking. - protected DraModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationDraResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DraModelResource(ArmClient client, DraModelData data) : this(client, data.Id) + internal DataReplicationDraResource(ArmClient client, DataReplicationDraData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal DraModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationDraResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _draModelDraClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string draModelDraApiVersion); - _draModelDraRestClient = new DraRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, draModelDraApiVersion); - _draOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _draOperationStatusRestClient = new DraOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _dataReplicationDraDraClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationDraDraApiVersion); + _dataReplicationDraDraRestClient = new DraRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationDraDraApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -75,7 +70,7 @@ internal DraModelResource(ArmClient client, ResourceIdentifier id) : base(client /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DraModelData Data + public virtual DataReplicationDraData Data { get { @@ -105,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Get"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraResource.Get"); scope.Start(); try { - var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationDraDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationDraResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -137,16 +132,16 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Get"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraResource.Get"); scope.Start(); try { - var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataReplicationDraDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationDraResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -172,12 +167,12 @@ public virtual Response Get(CancellationToken cancellationToke /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Delete"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraResource.Delete"); scope.Start(); try { - var response = await _draModelDraRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(_draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationDraDraRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationDraDraClientDiagnostics, Pipeline, _dataReplicationDraDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,12 +201,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Delete"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraResource.Delete"); scope.Start(); try { - var response = _draModelDraRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(_draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationDraDraRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationDraDraClientDiagnostics, Pipeline, _dataReplicationDraDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -240,16 +235,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Dra model. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DraModelData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationDraData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Update"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraResource.Update"); scope.Start(); try { - var response = await _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationDraDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationDraOperationSource(Client), _dataReplicationDraDraClientDiagnostics, Pipeline, _dataReplicationDraDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -278,16 +273,16 @@ public virtual async Task> UpdateAsync(WaitUntil /// Dra model. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DraModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationDraData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _draModelDraClientDiagnostics.CreateScope("DraModelResource.Update"); + using var scope = _dataReplicationDraDraClientDiagnostics.CreateScope("DataReplicationDraResource.Update"); scope.Start(); try { - var response = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationDraDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationDraOperationSource(Client), _dataReplicationDraDraClientDiagnostics, Pipeline, _dataReplicationDraDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -298,75 +293,5 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DraMod throw; } } - - /// - /// Tracks the results of an asynchronous operation on the fabric agent. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}/operations/{operationId} - /// - /// - /// Operation Id - /// DraOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetDraOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _draOperationStatusClientDiagnostics.CreateScope("DraModelResource.GetDraOperationStatu"); - scope.Start(); - try - { - var response = await _draOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the fabric agent. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}/operations/{operationId} - /// - /// - /// Operation Id - /// DraOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetDraOperationStatu(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _draOperationStatusClientDiagnostics.CreateScope("DraModelResource.GetDraOperationStatu"); - scope.Start(); - try - { - var response = _draOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationCollection.cs similarity index 63% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationCollection.cs index 7125005f717d..1d046413f34d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetEmailConfigurationModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationEmailConfigurations method from an instance of . /// - public partial class EmailConfigurationModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationEmailConfigurationCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _emailConfigurationModelEmailConfigurationClientDiagnostics; - private readonly EmailConfigurationRestOperations _emailConfigurationModelEmailConfigurationRestClient; + private readonly ClientDiagnostics _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics; + private readonly EmailConfigurationRestOperations _dataReplicationEmailConfigurationEmailConfigurationRestClient; - /// Initializes a new instance of the class for mocking. - protected EmailConfigurationModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationEmailConfigurationCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal EmailConfigurationModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationEmailConfigurationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _emailConfigurationModelEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", EmailConfigurationModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EmailConfigurationModelResource.ResourceType, out string emailConfigurationModelEmailConfigurationApiVersion); - _emailConfigurationModelEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, emailConfigurationModelEmailConfigurationApiVersion); + _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationEmailConfigurationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationEmailConfigurationResource.ResourceType, out string dataReplicationEmailConfigurationEmailConfigurationApiVersion); + _dataReplicationEmailConfigurationEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEmailConfigurationEmailConfigurationApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal EmailConfigurationModelCollection(ArmClient client, ResourceIdentifier internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != VaultModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); } /// @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _emailConfigurationModelEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateO /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.CreateOrUpdate"); scope.Start(); try { - var response = _emailConfigurationModelEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(Wait /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string emailConfigurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Get"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Get"); scope.Start(); try { - var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(st /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string emailConfigurationName, CancellationToken cancellationToken = default) + public virtual Response Get(string emailConfigurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Get"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Get"); scope.Start(); try { - var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken); + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string emailConfigu /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEmailConfigurationResource(Client, DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(e)), _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics, Pipeline, "DataReplicationEmailConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEmailConfigurationResource(Client, DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(e)), _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics, Pipeline, "DataReplicationEmailConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string emailConfigurationN { Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Exists"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Exists"); scope.Start(); try { - var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string emailConfigurationName, Cancellation { Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelCollection.Exists"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Exists"); scope.Start(); try { - var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken); + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string emailConfigurationName, Cancellation } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.cs index cb7c8aab934f..3cbc9044cff8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the EmailConfigurationModel data model. + /// A class representing the DataReplicationEmailConfiguration data model. /// Email configuration model. /// - public partial class EmailConfigurationModelData : ResourceData + public partial class DataReplicationEmailConfigurationData : ResourceData { - /// Initializes a new instance of EmailConfigurationModelData. + /// Initializes a new instance of DataReplicationEmailConfigurationData. /// Email configuration model properties. /// is null. - public EmailConfigurationModelData(EmailConfigurationModelProperties properties) + public DataReplicationEmailConfigurationData(DataReplicationEmailConfigurationProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of EmailConfigurationModelData. + /// Initializes a new instance of DataReplicationEmailConfigurationData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Email configuration model properties. - internal EmailConfigurationModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EmailConfigurationModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationEmailConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationEmailConfigurationProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Email configuration model properties. - public EmailConfigurationModelProperties Properties { get; set; } + public DataReplicationEmailConfigurationProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.cs similarity index 64% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.cs index fc1c3c73570f..b5915579adf3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing an EmailConfigurationModel along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetEmailConfigurationModelResource method. - /// Otherwise you can get one from its parent resource using the GetEmailConfigurationModel method. + /// A Class representing a DataReplicationEmailConfiguration along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationEmailConfigurationResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationEmailConfiguration method. /// - public partial class EmailConfigurationModelResource : ArmResource + public partial class DataReplicationEmailConfigurationResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _emailConfigurationModelEmailConfigurationClientDiagnostics; - private readonly EmailConfigurationRestOperations _emailConfigurationModelEmailConfigurationRestClient; - private readonly EmailConfigurationModelData _data; + private readonly ClientDiagnostics _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics; + private readonly EmailConfigurationRestOperations _dataReplicationEmailConfigurationEmailConfigurationRestClient; + private readonly DataReplicationEmailConfigurationData _data; - /// Initializes a new instance of the class for mocking. - protected EmailConfigurationModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationEmailConfigurationResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal EmailConfigurationModelResource(ArmClient client, EmailConfigurationModelData data) : this(client, data.Id) + internal DataReplicationEmailConfigurationResource(ArmClient client, DataReplicationEmailConfigurationData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal EmailConfigurationModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationEmailConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _emailConfigurationModelEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string emailConfigurationModelEmailConfigurationApiVersion); - _emailConfigurationModelEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, emailConfigurationModelEmailConfigurationApiVersion); + _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationEmailConfigurationEmailConfigurationApiVersion); + _dataReplicationEmailConfigurationEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEmailConfigurationEmailConfigurationApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal EmailConfigurationModelResource(ArmClient client, ResourceIdentifier id /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual EmailConfigurationModelData Data + public virtual DataReplicationEmailConfigurationData Data { get { @@ -100,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Get"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Get"); scope.Start(); try { - var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -132,16 +132,16 @@ public virtual async Task> GetAsync(Ca /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Get"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Get"); scope.Start(); try { - var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -167,16 +167,16 @@ public virtual Response Get(CancellationToken c /// EmailConfiguration model. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Update"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Update"); scope.Start(); try { - var response = await _emailConfigurationModelEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -205,16 +205,16 @@ public virtual async Task> UpdateA /// EmailConfiguration model. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _emailConfigurationModelEmailConfigurationClientDiagnostics.CreateScope("EmailConfigurationModelResource.Update"); + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Update"); scope.Start(); try { - var response = _emailConfigurationModelEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventCollection.cs similarity index 62% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventCollection.cs index 25a2564f3ee4..28b0d71a2e92 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetEventModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationEvents method from an instance of . /// - public partial class EventModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationEventCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _eventModelEventClientDiagnostics; - private readonly EventRestOperations _eventModelEventRestClient; + private readonly ClientDiagnostics _dataReplicationEventEventClientDiagnostics; + private readonly EventRestOperations _dataReplicationEventEventRestClient; - /// Initializes a new instance of the class for mocking. - protected EventModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationEventCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal EventModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationEventCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _eventModelEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", EventModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EventModelResource.ResourceType, out string eventModelEventApiVersion); - _eventModelEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, eventModelEventApiVersion); + _dataReplicationEventEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationEventResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationEventResource.ResourceType, out string dataReplicationEventEventApiVersion); + _dataReplicationEventEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEventEventApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal EventModelCollection(ArmClient client, ResourceIdentifier id) : base(cl internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != VaultModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); } /// @@ -70,18 +70,18 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string eventName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string eventName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); - using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Get"); + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Get"); scope.Start(); try { - var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationEventEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -107,18 +107,18 @@ public virtual async Task> GetAsync(string eventNam /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string eventName, CancellationToken cancellationToken = default) + public virtual Response Get(string eventName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); - using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Get"); + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Get"); scope.Start(); try { - var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken); + var response = _dataReplicationEventEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -143,12 +143,12 @@ public virtual Response Get(string eventName, CancellationTo /// Filter string. /// Continuation token. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEventEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEventEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEventResource(Client, DataReplicationEventData.DeserializeDataReplicationEventData(e)), _dataReplicationEventEventClientDiagnostics, Pipeline, "DataReplicationEventCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -167,12 +167,12 @@ public virtual AsyncPageable GetAllAsync(string filter = nul /// Filter string. /// Continuation token. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEventEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEventEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEventResource(Client, DataReplicationEventData.DeserializeDataReplicationEventData(e)), _dataReplicationEventEventClientDiagnostics, Pipeline, "DataReplicationEventCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -196,11 +196,11 @@ public virtual async Task> ExistsAsync(string eventName, Cancella { Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); - using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Exists"); + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Exists"); scope.Start(); try { - var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationEventEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -231,11 +231,11 @@ public virtual Response Exists(string eventName, CancellationToken cancell { Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); - using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelCollection.Exists"); + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Exists"); scope.Start(); try { - var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken); + var response = _dataReplicationEventEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -245,7 +245,7 @@ public virtual Response Exists(string eventName, CancellationToken cancell } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -255,7 +255,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.cs similarity index 62% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.cs index f223067faa93..b7de19456f27 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the EventModel data model. + /// A class representing the DataReplicationEvent data model. /// Event model. /// - public partial class EventModelData : ResourceData + public partial class DataReplicationEventData : ResourceData { - /// Initializes a new instance of EventModelData. + /// Initializes a new instance of DataReplicationEventData. /// Event model properties. /// is null. - internal EventModelData(EventModelProperties properties) + internal DataReplicationEventData(DataReplicationEventProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of EventModelData. + /// Initializes a new instance of DataReplicationEventData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Event model properties. - internal EventModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EventModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationEventData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationEventProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Event model properties. - public EventModelProperties Properties { get; } + public DataReplicationEventProperties Properties { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.cs similarity index 64% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.cs index 9920ed88e4c2..6f3b7533dd10 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing an EventModel along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetEventModelResource method. - /// Otherwise you can get one from its parent resource using the GetEventModel method. + /// A Class representing a DataReplicationEvent along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationEventResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationEvent method. /// - public partial class EventModelResource : ArmResource + public partial class DataReplicationEventResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string eventName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _eventModelEventClientDiagnostics; - private readonly EventRestOperations _eventModelEventRestClient; - private readonly EventModelData _data; + private readonly ClientDiagnostics _dataReplicationEventEventClientDiagnostics; + private readonly EventRestOperations _dataReplicationEventEventRestClient; + private readonly DataReplicationEventData _data; - /// Initializes a new instance of the class for mocking. - protected EventModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationEventResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal EventModelResource(ArmClient client, EventModelData data) : this(client, data.Id) + internal DataReplicationEventResource(ArmClient client, DataReplicationEventData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal EventModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationEventResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _eventModelEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string eventModelEventApiVersion); - _eventModelEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, eventModelEventApiVersion); + _dataReplicationEventEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationEventEventApiVersion); + _dataReplicationEventEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEventEventApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal EventModelResource(ArmClient client, ResourceIdentifier id) : base(clie /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual EventModelData Data + public virtual DataReplicationEventData Data { get { @@ -100,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelResource.Get"); + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventResource.Get"); scope.Start(); try { - var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationEventEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -132,16 +132,16 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _eventModelEventClientDiagnostics.CreateScope("EventModelResource.Get"); + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventResource.Get"); scope.Start(); try { - var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataReplicationEventEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricCollection.cs similarity index 65% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricCollection.cs index 3798222dc0ca..99082bcff10e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricCollection.cs @@ -21,28 +21,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetFabricModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationFabrics method from an instance of . /// - public partial class FabricModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationFabricCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _fabricModelFabricClientDiagnostics; - private readonly FabricRestOperations _fabricModelFabricRestClient; + private readonly ClientDiagnostics _dataReplicationFabricFabricClientDiagnostics; + private readonly FabricRestOperations _dataReplicationFabricFabricRestClient; - /// Initializes a new instance of the class for mocking. - protected FabricModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationFabricCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal FabricModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationFabricCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fabricModelFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", FabricModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(FabricModelResource.ResourceType, out string fabricModelFabricApiVersion); - _fabricModelFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fabricModelFabricApiVersion); + _dataReplicationFabricFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationFabricResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationFabricResource.ResourceType, out string dataReplicationFabricFabricApiVersion); + _dataReplicationFabricFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationFabricFabricApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,17 +73,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _fabricModelFabricRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationFabricFabricRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,17 +114,17 @@ public virtual async Task> CreateOrUpdateAsync /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.CreateOrUpdate"); scope.Start(); try { - var response = _fabricModelFabricRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationFabricFabricRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -153,18 +153,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string fabricName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Get"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Get"); scope.Start(); try { - var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -190,18 +190,18 @@ public virtual async Task> GetAsync(string fabricN /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string fabricName, CancellationToken cancellationToken = default) + public virtual Response Get(string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Get"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Get"); scope.Start(); try { - var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken); + var response = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -225,12 +225,12 @@ public virtual Response Get(string fabricName, Cancellation /// /// Continuation token from the previous call. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _fabricModelFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fabricModelFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationFabricFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationFabricFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), _dataReplicationFabricFabricClientDiagnostics, Pipeline, "DataReplicationFabricCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -248,12 +248,12 @@ public virtual AsyncPageable GetAllAsync(string continuatio /// /// Continuation token from the previous call. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _fabricModelFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fabricModelFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), _fabricModelFabricClientDiagnostics, Pipeline, "FabricModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationFabricFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationFabricFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), _dataReplicationFabricFabricClientDiagnostics, Pipeline, "DataReplicationFabricCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -277,11 +277,11 @@ public virtual async Task> ExistsAsync(string fabricName, Cancell { Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Exists"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Exists"); scope.Start(); try { - var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -312,11 +312,11 @@ public virtual Response Exists(string fabricName, CancellationToken cancel { Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelCollection.Exists"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Exists"); scope.Start(); try { - var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken); + var response = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -326,7 +326,7 @@ public virtual Response Exists(string fabricName, CancellationToken cancel } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -336,7 +336,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.cs similarity index 62% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.cs index 6a34ff8b16c9..c158a7170f5a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.cs @@ -14,23 +14,23 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the FabricModel data model. + /// A class representing the DataReplicationFabric data model. /// Fabric model. /// - public partial class FabricModelData : TrackedResourceData + public partial class DataReplicationFabricData : TrackedResourceData { - /// Initializes a new instance of FabricModelData. + /// Initializes a new instance of DataReplicationFabricData. /// The location. /// Fabric model properties. /// is null. - public FabricModelData(AzureLocation location, FabricModelProperties properties) : base(location) + public DataReplicationFabricData(AzureLocation location, DataReplicationFabricProperties properties) : base(location) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of FabricModelData. + /// Initializes a new instance of DataReplicationFabricData. /// The id. /// The name. /// The resourceType. @@ -38,12 +38,12 @@ public FabricModelData(AzureLocation location, FabricModelProperties properties) /// The tags. /// The location. /// Fabric model properties. - internal FabricModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, FabricModelProperties properties) : base(id, name, resourceType, systemData, tags, location) + internal DataReplicationFabricData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataReplicationFabricProperties properties) : base(id, name, resourceType, systemData, tags, location) { Properties = properties; } /// Fabric model properties. - public FabricModelProperties Properties { get; set; } + public DataReplicationFabricProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.cs similarity index 66% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.cs index 3dd3162bc2a2..0115d392e7d5 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.cs @@ -20,50 +20,46 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing a FabricModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetFabricModelResource method. - /// Otherwise you can get one from its parent resource using the GetFabricModel method. + /// A Class representing a DataReplicationFabric along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationFabricResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationFabric method. /// - public partial class FabricModelResource : ArmResource + public partial class DataReplicationFabricResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _fabricModelFabricClientDiagnostics; - private readonly FabricRestOperations _fabricModelFabricRestClient; - private readonly ClientDiagnostics _fabricOperationsStatusClientDiagnostics; - private readonly FabricOperationsStatusRestOperations _fabricOperationsStatusRestClient; - private readonly FabricModelData _data; + private readonly ClientDiagnostics _dataReplicationFabricFabricClientDiagnostics; + private readonly FabricRestOperations _dataReplicationFabricFabricRestClient; + private readonly DataReplicationFabricData _data; - /// Initializes a new instance of the class for mocking. - protected FabricModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationFabricResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal FabricModelResource(ArmClient client, FabricModelData data) : this(client, data.Id) + internal DataReplicationFabricResource(ArmClient client, DataReplicationFabricData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal FabricModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationFabricResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _fabricModelFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string fabricModelFabricApiVersion); - _fabricModelFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fabricModelFabricApiVersion); - _fabricOperationsStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _fabricOperationsStatusRestClient = new FabricOperationsStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _dataReplicationFabricFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationFabricFabricApiVersion); + _dataReplicationFabricFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationFabricFabricApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -77,7 +73,7 @@ internal FabricModelResource(ArmClient client, ResourceIdentifier id) : base(cli /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual FabricModelData Data + public virtual DataReplicationFabricData Data { get { @@ -93,11 +89,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of DraModelResources in the FabricModel. - /// An object representing collection of DraModelResources and their operations over a DraModelResource. - public virtual DraModelCollection GetDraModels() + /// Gets a collection of DataReplicationDraResources in the DataReplicationFabric. + /// An object representing collection of DataReplicationDraResources and their operations over a DataReplicationDraResource. + public virtual DataReplicationDraCollection GetDataReplicationDras() { - return GetCachedClient(Client => new DraModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationDraCollection(Client, Id)); } /// @@ -118,9 +114,9 @@ public virtual DraModelCollection GetDraModels() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetDraModelAsync(string fabricAgentName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationDraAsync(string fabricAgentName, CancellationToken cancellationToken = default) { - return await GetDraModels().GetAsync(fabricAgentName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationDras().GetAsync(fabricAgentName, cancellationToken).ConfigureAwait(false); } /// @@ -141,9 +137,9 @@ public virtual async Task> GetDraModelAsync(string fa /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetDraModel(string fabricAgentName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationDra(string fabricAgentName, CancellationToken cancellationToken = default) { - return GetDraModels().Get(fabricAgentName, cancellationToken); + return GetDataReplicationDras().Get(fabricAgentName, cancellationToken); } /// @@ -160,16 +156,16 @@ public virtual Response GetDraModel(string fabricAgentName, Ca /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Get"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Get"); scope.Start(); try { - var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -192,16 +188,16 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Get"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Get"); scope.Start(); try { - var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -227,12 +223,12 @@ public virtual Response Get(CancellationToken cancellationT /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Delete"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Delete"); scope.Start(); try { - var response = await _fabricModelFabricRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(_fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationFabricFabricRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -261,12 +257,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Delete"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Delete"); scope.Start(); try { - var response = _fabricModelFabricRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(_fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationFabricFabricRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -295,16 +291,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Fabric properties. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, FabricModelPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Update"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Update"); scope.Start(); try { - var response = await _fabricModelFabricRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationFabricFabricRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -333,16 +329,16 @@ public virtual async Task> UpdateAsync(WaitUnt /// Fabric properties. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, FabricModelPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.Update"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Update"); scope.Start(); try { - var response = _fabricModelFabricRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationFabricFabricRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -354,76 +350,6 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Fab } } - /// - /// Tracks the results of an asynchronous operation on the fabric. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/operations/{operationId} - /// - /// - /// Operation Id - /// FabricOperationsStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetFabricOperationsStatuAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _fabricOperationsStatusClientDiagnostics.CreateScope("FabricModelResource.GetFabricOperationsStatu"); - scope.Start(); - try - { - var response = await _fabricOperationsStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the fabric. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/operations/{operationId} - /// - /// - /// Operation Id - /// FabricOperationsStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetFabricOperationsStatu(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _fabricOperationsStatusClientDiagnostics.CreateScope("FabricModelResource.GetFabricOperationsStatu"); - scope.Start(); - try - { - var response = _fabricOperationsStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// @@ -441,12 +367,12 @@ public virtual Response GetFabricOperationsStatu(string operati /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.AddTag"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.AddTag"); scope.Start(); try { @@ -455,13 +381,13 @@ public virtual async Task> AddTagAsync(string key, var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new FabricModelPatch(); + var patch = new DataReplicationFabricPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -495,12 +421,12 @@ public virtual async Task> AddTagAsync(string key, /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.AddTag"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.AddTag"); scope.Start(); try { @@ -509,13 +435,13 @@ public virtual Response AddTag(string key, string value, Ca var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FabricModelPatch(); + var patch = new DataReplicationFabricPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -548,11 +474,11 @@ public virtual Response AddTag(string key, string value, Ca /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.SetTags"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.SetTags"); scope.Start(); try { @@ -562,13 +488,13 @@ public virtual async Task> SetTagsAsync(IDictionar var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new FabricModelPatch(); + var patch = new DataReplicationFabricPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -597,11 +523,11 @@ public virtual async Task> SetTagsAsync(IDictionar /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.SetTags"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.SetTags"); scope.Start(); try { @@ -611,13 +537,13 @@ public virtual Response SetTags(IDictionary var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FabricModelPatch(); + var patch = new DataReplicationFabricPatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -646,11 +572,11 @@ public virtual Response SetTags(IDictionary /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.RemoveTag"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.RemoveTag"); scope.Start(); try { @@ -659,13 +585,13 @@ public virtual async Task> RemoveTagAsync(string k var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new FabricModelPatch(); + var patch = new DataReplicationFabricPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -698,11 +624,11 @@ public virtual async Task> RemoveTagAsync(string k /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _fabricModelFabricClientDiagnostics.CreateScope("FabricModelResource.RemoveTag"); + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.RemoveTag"); scope.Start(); try { @@ -711,13 +637,13 @@ public virtual Response RemoveTag(string key, CancellationT var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new FabricModelPatch(); + var patch = new DataReplicationFabricPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyCollection.cs similarity index 64% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyCollection.cs index f54b350e673e..5e47fc007025 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetPolicyModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationPolicies method from an instance of . /// - public partial class PolicyModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _policyModelPolicyClientDiagnostics; - private readonly PolicyRestOperations _policyModelPolicyRestClient; + private readonly ClientDiagnostics _dataReplicationPolicyPolicyClientDiagnostics; + private readonly PolicyRestOperations _dataReplicationPolicyPolicyRestClient; - /// Initializes a new instance of the class for mocking. - protected PolicyModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationPolicyCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal PolicyModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _policyModelPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", PolicyModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(PolicyModelResource.ResourceType, out string policyModelPolicyApiVersion); - _policyModelPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyModelPolicyApiVersion); + _dataReplicationPolicyPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationPolicyResource.ResourceType, out string dataReplicationPolicyPolicyApiVersion); + _dataReplicationPolicyPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPolicyPolicyApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal PolicyModelCollection(ArmClient client, ResourceIdentifier id) : base(c internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != VaultModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); } /// @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _policyModelPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationPolicyPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdateAsync /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.CreateOrUpdate"); scope.Start(); try { - var response = _policyModelPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationPolicyPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string policyName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string policyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Get"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Get"); scope.Start(); try { - var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationPolicyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string policyN /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string policyName, CancellationToken cancellationToken = default) + public virtual Response Get(string policyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Get"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Get"); scope.Start(); try { - var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken); + var response = _dataReplicationPolicyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string policyName, Cancellation /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPolicyPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPolicyPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPolicyResource(Client, DataReplicationPolicyData.DeserializeDataReplicationPolicyData(e)), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, "DataReplicationPolicyCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPolicyPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPolicyPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPolicyResource(Client, DataReplicationPolicyData.DeserializeDataReplicationPolicyData(e)), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, "DataReplicationPolicyCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string policyName, Cancell { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Exists"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Exists"); scope.Start(); try { - var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationPolicyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string policyName, CancellationToken cancel { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelCollection.Exists"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Exists"); scope.Start(); try { - var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken); + var response = _dataReplicationPolicyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string policyName, CancellationToken cancel } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.cs similarity index 62% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.cs index 2459a4e14a6a..3922136d4cfc 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the PolicyModel data model. + /// A class representing the DataReplicationPolicy data model. /// Policy model. /// - public partial class PolicyModelData : ResourceData + public partial class DataReplicationPolicyData : ResourceData { - /// Initializes a new instance of PolicyModelData. + /// Initializes a new instance of DataReplicationPolicyData. /// Policy model properties. /// is null. - public PolicyModelData(PolicyModelProperties properties) + public DataReplicationPolicyData(DataReplicationPolicyProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of PolicyModelData. + /// Initializes a new instance of DataReplicationPolicyData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Policy model properties. - internal PolicyModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PolicyModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationPolicyProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Policy model properties. - public PolicyModelProperties Properties { get; set; } + public DataReplicationPolicyProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.cs similarity index 56% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.cs index d4c11e7b221c..07f748aa3935 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.cs @@ -13,55 +13,50 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing a PolicyModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetPolicyModelResource method. - /// Otherwise you can get one from its parent resource using the GetPolicyModel method. + /// A Class representing a DataReplicationPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationPolicy method. /// - public partial class PolicyModelResource : ArmResource + public partial class DataReplicationPolicyResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _policyModelPolicyClientDiagnostics; - private readonly PolicyRestOperations _policyModelPolicyRestClient; - private readonly ClientDiagnostics _policyOperationStatusClientDiagnostics; - private readonly PolicyOperationStatusRestOperations _policyOperationStatusRestClient; - private readonly PolicyModelData _data; + private readonly ClientDiagnostics _dataReplicationPolicyPolicyClientDiagnostics; + private readonly PolicyRestOperations _dataReplicationPolicyPolicyRestClient; + private readonly DataReplicationPolicyData _data; - /// Initializes a new instance of the class for mocking. - protected PolicyModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationPolicyResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal PolicyModelResource(ArmClient client, PolicyModelData data) : this(client, data.Id) + internal DataReplicationPolicyResource(ArmClient client, DataReplicationPolicyData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal PolicyModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _policyModelPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string policyModelPolicyApiVersion); - _policyModelPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyModelPolicyApiVersion); - _policyOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _policyOperationStatusRestClient = new PolicyOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _dataReplicationPolicyPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationPolicyPolicyApiVersion); + _dataReplicationPolicyPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPolicyPolicyApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -75,7 +70,7 @@ internal PolicyModelResource(ArmClient client, ResourceIdentifier id) : base(cli /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual PolicyModelData Data + public virtual DataReplicationPolicyData Data { get { @@ -105,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Get"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Get"); scope.Start(); try { - var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationPolicyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -137,16 +132,16 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Get"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Get"); scope.Start(); try { - var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataReplicationPolicyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -172,12 +167,12 @@ public virtual Response Get(CancellationToken cancellationT /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Delete"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Delete"); scope.Start(); try { - var response = await _policyModelPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(_policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationPolicyPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,12 +201,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Delete"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Delete"); scope.Start(); try { - var response = _policyModelPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(_policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationPolicyPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -240,16 +235,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Policy model. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyModelData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Update"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Update"); scope.Start(); try { - var response = await _policyModelPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationPolicyPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -278,16 +273,16 @@ public virtual async Task> UpdateAsync(WaitUnt /// Policy model. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PolicyModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _policyModelPolicyClientDiagnostics.CreateScope("PolicyModelResource.Update"); + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Update"); scope.Start(); try { - var response = _policyModelPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationPolicyPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -298,75 +293,5 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Pol throw; } } - - /// - /// Tracks the results of an asynchronous operation on the policy. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}/operations/{operationId} - /// - /// - /// Operation Id - /// PolicyOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetPolicyOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _policyOperationStatusClientDiagnostics.CreateScope("PolicyModelResource.GetPolicyOperationStatu"); - scope.Start(); - try - { - var response = await _policyOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the policy. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}/operations/{operationId} - /// - /// - /// Operation Id - /// PolicyOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetPolicyOperationStatu(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _policyOperationStatusClientDiagnostics.CreateScope("PolicyModelResource.GetPolicyOperationStatu"); - scope.Start(); - try - { - var response = _policyOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemCollection.cs similarity index 62% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemCollection.cs index 29b51ddbc799..01e4cc73d544 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetProtectedItemModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationProtectedItems method from an instance of . /// - public partial class ProtectedItemModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationProtectedItemCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _protectedItemModelProtectedItemClientDiagnostics; - private readonly ProtectedItemRestOperations _protectedItemModelProtectedItemRestClient; + private readonly ClientDiagnostics _dataReplicationProtectedItemProtectedItemClientDiagnostics; + private readonly ProtectedItemRestOperations _dataReplicationProtectedItemProtectedItemRestClient; - /// Initializes a new instance of the class for mocking. - protected ProtectedItemModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationProtectedItemCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal ProtectedItemModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationProtectedItemCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _protectedItemModelProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProtectedItemModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ProtectedItemModelResource.ResourceType, out string protectedItemModelProtectedItemApiVersion); - _protectedItemModelProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, protectedItemModelProtectedItemApiVersion); + _dataReplicationProtectedItemProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationProtectedItemResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationProtectedItemResource.ResourceType, out string dataReplicationProtectedItemProtectedItemApiVersion); + _dataReplicationProtectedItemProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationProtectedItemProtectedItemApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal ProtectedItemModelCollection(ArmClient client, ResourceIdentifier id) : internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != VaultModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); } /// @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationProtectedItemProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpda /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.CreateOrUpdate"); scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationProtectedItemProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string protectedItemName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Get"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Get"); scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationProtectedItemProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string protectedItemName, CancellationToken cancellationToken = default) + public virtual Response Get(string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Get"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Get"); scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken); + var response = _dataReplicationProtectedItemProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string protectedItemName /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationProtectedItemResource(Client, DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(e)), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, "DataReplicationProtectedItemCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationProtectedItemResource(Client, DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(e)), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, "DataReplicationProtectedItemCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string protectedItemName, { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Exists"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Exists"); scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationProtectedItemProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string protectedItemName, CancellationToken { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelCollection.Exists"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Exists"); scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken); + var response = _dataReplicationProtectedItemProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string protectedItemName, CancellationToken } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.cs similarity index 60% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.cs index 7bf747be9845..bd318092861a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the ProtectedItemModel data model. + /// A class representing the DataReplicationProtectedItem data model. /// Protected item model. /// - public partial class ProtectedItemModelData : ResourceData + public partial class DataReplicationProtectedItemData : ResourceData { - /// Initializes a new instance of ProtectedItemModelData. + /// Initializes a new instance of DataReplicationProtectedItemData. /// Protected item model properties. /// is null. - public ProtectedItemModelData(ProtectedItemModelProperties properties) + public DataReplicationProtectedItemData(DataReplicationProtectedItemProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of ProtectedItemModelData. + /// Initializes a new instance of DataReplicationProtectedItemData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Protected item model properties. - internal ProtectedItemModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProtectedItemModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationProtectedItemData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationProtectedItemProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Protected item model properties. - public ProtectedItemModelProperties Properties { get; set; } + public DataReplicationProtectedItemProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.cs similarity index 60% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.cs index 3d6c176b477a..29efc9f05ed8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.cs @@ -18,50 +18,46 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing a ProtectedItemModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetProtectedItemModelResource method. - /// Otherwise you can get one from its parent resource using the GetProtectedItemModel method. + /// A Class representing a DataReplicationProtectedItem along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationProtectedItemResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationProtectedItem method. /// - public partial class ProtectedItemModelResource : ArmResource + public partial class DataReplicationProtectedItemResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _protectedItemModelProtectedItemClientDiagnostics; - private readonly ProtectedItemRestOperations _protectedItemModelProtectedItemRestClient; - private readonly ClientDiagnostics _protectedItemOperationStatusClientDiagnostics; - private readonly ProtectedItemOperationStatusRestOperations _protectedItemOperationStatusRestClient; - private readonly ProtectedItemModelData _data; + private readonly ClientDiagnostics _dataReplicationProtectedItemProtectedItemClientDiagnostics; + private readonly ProtectedItemRestOperations _dataReplicationProtectedItemProtectedItemRestClient; + private readonly DataReplicationProtectedItemData _data; - /// Initializes a new instance of the class for mocking. - protected ProtectedItemModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationProtectedItemResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal ProtectedItemModelResource(ArmClient client, ProtectedItemModelData data) : this(client, data.Id) + internal DataReplicationProtectedItemResource(ArmClient client, DataReplicationProtectedItemData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal ProtectedItemModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationProtectedItemResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _protectedItemModelProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string protectedItemModelProtectedItemApiVersion); - _protectedItemModelProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, protectedItemModelProtectedItemApiVersion); - _protectedItemOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _protectedItemOperationStatusRestClient = new ProtectedItemOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _dataReplicationProtectedItemProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationProtectedItemProtectedItemApiVersion); + _dataReplicationProtectedItemProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationProtectedItemProtectedItemApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -75,7 +71,7 @@ internal ProtectedItemModelResource(ArmClient client, ResourceIdentifier id) : b /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual ProtectedItemModelData Data + public virtual DataReplicationProtectedItemData Data { get { @@ -91,11 +87,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of RecoveryPointModelResources in the ProtectedItemModel. - /// An object representing collection of RecoveryPointModelResources and their operations over a RecoveryPointModelResource. - public virtual RecoveryPointModelCollection GetRecoveryPointModels() + /// Gets a collection of DataReplicationRecoveryPointResources in the DataReplicationProtectedItem. + /// An object representing collection of DataReplicationRecoveryPointResources and their operations over a DataReplicationRecoveryPointResource. + public virtual DataReplicationRecoveryPointCollection GetDataReplicationRecoveryPoints() { - return GetCachedClient(Client => new RecoveryPointModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationRecoveryPointCollection(Client, Id)); } /// @@ -116,9 +112,9 @@ public virtual RecoveryPointModelCollection GetRecoveryPointModels() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetRecoveryPointModelAsync(string recoveryPointName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationRecoveryPointAsync(string recoveryPointName, CancellationToken cancellationToken = default) { - return await GetRecoveryPointModels().GetAsync(recoveryPointName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationRecoveryPoints().GetAsync(recoveryPointName, cancellationToken).ConfigureAwait(false); } /// @@ -139,9 +135,9 @@ public virtual async Task> GetRecoveryPoint /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetRecoveryPointModel(string recoveryPointName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationRecoveryPoint(string recoveryPointName, CancellationToken cancellationToken = default) { - return GetRecoveryPointModels().Get(recoveryPointName, cancellationToken); + return GetDataReplicationRecoveryPoints().Get(recoveryPointName, cancellationToken); } /// @@ -158,16 +154,16 @@ public virtual Response GetRecoveryPointModel(string /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Get"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Get"); scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationProtectedItemProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -190,16 +186,16 @@ public virtual async Task> GetAsync(Cancell /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Get"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Get"); scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataReplicationProtectedItemProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -226,12 +222,12 @@ public virtual Response Get(CancellationToken cancel /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) { - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Delete"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Delete"); scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(_protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationProtectedItemProtectedItemRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -261,12 +257,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) { - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Delete"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Delete"); scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(_protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationProtectedItemProtectedItemRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -295,16 +291,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null /// Protected item model. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ProtectedItemModelData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Update"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Update"); scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationProtectedItemProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -333,16 +329,16 @@ public virtual async Task> UpdateAsync( /// Protected item model. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ProtectedItemModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.Update"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Update"); scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationProtectedItemProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -372,12 +368,12 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// The cancellation token to use. public virtual async Task> PlannedFailoverAsync(WaitUntil waitUntil, PlannedFailoverModel body = null, CancellationToken cancellationToken = default) { - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.PlannedFailover"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.PlannedFailover"); scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.PlannedFailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationProtectedItemProtectedItemRestClient.PlannedFailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -407,12 +403,12 @@ public virtual async Task> PlannedFailoverAsy /// The cancellation token to use. public virtual ArmOperation PlannedFailover(WaitUntil waitUntil, PlannedFailoverModel body = null, CancellationToken cancellationToken = default) { - using var scope = _protectedItemModelProtectedItemClientDiagnostics.CreateScope("ProtectedItemModelResource.PlannedFailover"); + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.PlannedFailover"); scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.PlannedFailover(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationProtectedItemProtectedItemRestClient.PlannedFailover(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -423,75 +419,5 @@ public virtual ArmOperation PlannedFailover(WaitUntil wait throw; } } - - /// - /// Tracks the results of an asynchronous operation on the protected item. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/operations/{operationId} - /// - /// - /// Operation Id - /// ProtectedItemOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetProtectedItemOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _protectedItemOperationStatusClientDiagnostics.CreateScope("ProtectedItemModelResource.GetProtectedItemOperationStatu"); - scope.Start(); - try - { - var response = await _protectedItemOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the protected item. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/operations/{operationId} - /// - /// - /// Operation Id - /// ProtectedItemOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetProtectedItemOperationStatu(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _protectedItemOperationStatusClientDiagnostics.CreateScope("ProtectedItemModelResource.GetProtectedItemOperationStatu"); - scope.Start(); - try - { - var response = _protectedItemOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointCollection.cs similarity index 60% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointCollection.cs index 9a3386aa1909..701a6d5daae2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetRecoveryPointModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationRecoveryPoints method from an instance of . /// - public partial class RecoveryPointModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationRecoveryPointCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _recoveryPointModelRecoveryPointsClientDiagnostics; - private readonly RecoveryPointsRestOperations _recoveryPointModelRecoveryPointsRestClient; + private readonly ClientDiagnostics _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics; + private readonly RecoveryPointsRestOperations _dataReplicationRecoveryPointRecoveryPointsRestClient; - /// Initializes a new instance of the class for mocking. - protected RecoveryPointModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationRecoveryPointCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal RecoveryPointModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationRecoveryPointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _recoveryPointModelRecoveryPointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", RecoveryPointModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RecoveryPointModelResource.ResourceType, out string recoveryPointModelRecoveryPointsApiVersion); - _recoveryPointModelRecoveryPointsRestClient = new RecoveryPointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, recoveryPointModelRecoveryPointsApiVersion); + _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationRecoveryPointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationRecoveryPointResource.ResourceType, out string dataReplicationRecoveryPointRecoveryPointsApiVersion); + _dataReplicationRecoveryPointRecoveryPointsRestClient = new RecoveryPointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationRecoveryPointRecoveryPointsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal RecoveryPointModelCollection(ArmClient client, ResourceIdentifier id) : internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != ProtectedItemModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ProtectedItemModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationProtectedItemResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationProtectedItemResource.ResourceType), nameof(id)); } /// @@ -70,18 +70,18 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string recoveryPointName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string recoveryPointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); - using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Get"); + using var scope = _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Get"); scope.Start(); try { - var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationRecoveryPointRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -107,18 +107,18 @@ public virtual async Task> GetAsync(string /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string recoveryPointName, CancellationToken cancellationToken = default) + public virtual Response Get(string recoveryPointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); - using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Get"); + using var scope = _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Get"); scope.Start(); try { - var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken); + var response = _dataReplicationRecoveryPointRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -141,12 +141,12 @@ public virtual Response Get(string recoveryPointName /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationRecoveryPointRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationRecoveryPointRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationRecoveryPointResource(Client, DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(e)), _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics, Pipeline, "DataReplicationRecoveryPointCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -163,12 +163,12 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationRecoveryPointRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationRecoveryPointRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationRecoveryPointResource(Client, DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(e)), _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics, Pipeline, "DataReplicationRecoveryPointCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -192,11 +192,11 @@ public virtual async Task> ExistsAsync(string recoveryPointName, { Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); - using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Exists"); + using var scope = _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Exists"); scope.Start(); try { - var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationRecoveryPointRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -227,11 +227,11 @@ public virtual Response Exists(string recoveryPointName, CancellationToken { Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); - using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelCollection.Exists"); + using var scope = _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Exists"); scope.Start(); try { - var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken); + var response = _dataReplicationRecoveryPointRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -241,7 +241,7 @@ public virtual Response Exists(string recoveryPointName, CancellationToken } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -251,7 +251,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.cs similarity index 60% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.cs index 64963ba1916d..059d35bb057e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the RecoveryPointModel data model. + /// A class representing the DataReplicationRecoveryPoint data model. /// Recovery point model. /// - public partial class RecoveryPointModelData : ResourceData + public partial class DataReplicationRecoveryPointData : ResourceData { - /// Initializes a new instance of RecoveryPointModelData. + /// Initializes a new instance of DataReplicationRecoveryPointData. /// Recovery point model properties. /// is null. - internal RecoveryPointModelData(RecoveryPointModelProperties properties) + internal DataReplicationRecoveryPointData(DataReplicationRecoveryPointProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of RecoveryPointModelData. + /// Initializes a new instance of DataReplicationRecoveryPointData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Recovery point model properties. - internal RecoveryPointModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RecoveryPointModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationRecoveryPointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationRecoveryPointProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Recovery point model properties. - public RecoveryPointModelProperties Properties { get; } + public DataReplicationRecoveryPointProperties Properties { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.cs similarity index 62% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.cs index ec4514b5c090..610d80e69fcb 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.cs @@ -17,46 +17,46 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing a RecoveryPointModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetRecoveryPointModelResource method. - /// Otherwise you can get one from its parent resource using the GetRecoveryPointModel method. + /// A Class representing a DataReplicationRecoveryPoint along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationRecoveryPointResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationRecoveryPoint method. /// - public partial class RecoveryPointModelResource : ArmResource + public partial class DataReplicationRecoveryPointResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _recoveryPointModelRecoveryPointsClientDiagnostics; - private readonly RecoveryPointsRestOperations _recoveryPointModelRecoveryPointsRestClient; - private readonly RecoveryPointModelData _data; + private readonly ClientDiagnostics _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics; + private readonly RecoveryPointsRestOperations _dataReplicationRecoveryPointRecoveryPointsRestClient; + private readonly DataReplicationRecoveryPointData _data; - /// Initializes a new instance of the class for mocking. - protected RecoveryPointModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationRecoveryPointResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal RecoveryPointModelResource(ArmClient client, RecoveryPointModelData data) : this(client, data.Id) + internal DataReplicationRecoveryPointResource(ArmClient client, DataReplicationRecoveryPointData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal RecoveryPointModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationRecoveryPointResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _recoveryPointModelRecoveryPointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string recoveryPointModelRecoveryPointsApiVersion); - _recoveryPointModelRecoveryPointsRestClient = new RecoveryPointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, recoveryPointModelRecoveryPointsApiVersion); + _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationRecoveryPointRecoveryPointsApiVersion); + _dataReplicationRecoveryPointRecoveryPointsRestClient = new RecoveryPointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationRecoveryPointRecoveryPointsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -70,7 +70,7 @@ internal RecoveryPointModelResource(ArmClient client, ResourceIdentifier id) : b /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual RecoveryPointModelData Data + public virtual DataReplicationRecoveryPointData Data { get { @@ -100,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelResource.Get"); + using var scope = _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("DataReplicationRecoveryPointResource.Get"); scope.Start(); try { - var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationRecoveryPointRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -132,16 +132,16 @@ public virtual async Task> GetAsync(Cancell /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _recoveryPointModelRecoveryPointsClientDiagnostics.CreateScope("RecoveryPointModelResource.Get"); + using var scope = _dataReplicationRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("DataReplicationRecoveryPointResource.Get"); scope.Start(); try { - var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataReplicationRecoveryPointRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionCollection.cs similarity index 61% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionCollection.cs index 98ee077086dd..5f7eda7fb26f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetReplicationExtensionModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationReplicationExtensions method from an instance of . /// - public partial class ReplicationExtensionModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationReplicationExtensionCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _replicationExtensionModelReplicationExtensionClientDiagnostics; - private readonly ReplicationExtensionRestOperations _replicationExtensionModelReplicationExtensionRestClient; + private readonly ClientDiagnostics _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics; + private readonly ReplicationExtensionRestOperations _dataReplicationReplicationExtensionReplicationExtensionRestClient; - /// Initializes a new instance of the class for mocking. - protected ReplicationExtensionModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationReplicationExtensionCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal ReplicationExtensionModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationReplicationExtensionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _replicationExtensionModelReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ReplicationExtensionModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ReplicationExtensionModelResource.ResourceType, out string replicationExtensionModelReplicationExtensionApiVersion); - _replicationExtensionModelReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, replicationExtensionModelReplicationExtensionApiVersion); + _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationReplicationExtensionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationReplicationExtensionResource.ResourceType, out string dataReplicationReplicationExtensionReplicationExtensionApiVersion); + _dataReplicationReplicationExtensionReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationReplicationExtensionReplicationExtensionApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal ReplicationExtensionModelCollection(ArmClient client, ResourceIdentifie internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != VaultModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); } /// @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string replicationExtensionName, DataReplicationReplicationExtensionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _replicationExtensionModelReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationReplicationExtensionOperationSource(Client), _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> Creat /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string replicationExtensionName, DataReplicationReplicationExtensionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _replicationExtensionModelReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationReplicationExtensionReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationReplicationExtensionOperationSource(Client), _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(Wa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string replicationExtensionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Get"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionCollection.Get"); scope.Start(); try { - var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationReplicationExtensionReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync( /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string replicationExtensionName, CancellationToken cancellationToken = default) + public virtual Response Get(string replicationExtensionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Get"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionCollection.Get"); scope.Start(); try { - var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken); + var response = _dataReplicationReplicationExtensionReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string replicatio /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationReplicationExtensionResource(Client, DataReplicationReplicationExtensionData.DeserializeDataReplicationReplicationExtensionData(e)), _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, "DataReplicationReplicationExtensionCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationReplicationExtensionResource(Client, DataReplicationReplicationExtensionData.DeserializeDataReplicationReplicationExtensionData(e)), _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, "DataReplicationReplicationExtensionCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string replicationExtensio { Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Exists"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionCollection.Exists"); scope.Start(); try { - var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationReplicationExtensionReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string replicationExtensionName, Cancellati { Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelCollection.Exists"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionCollection.Exists"); scope.Start(); try { - var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken); + var response = _dataReplicationReplicationExtensionReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string replicationExtensionName, Cancellati } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionData.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionData.cs index 597355c79e05..dfae54465361 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the ReplicationExtensionModel data model. + /// A class representing the DataReplicationReplicationExtension data model. /// Replication extension model. /// - public partial class ReplicationExtensionModelData : ResourceData + public partial class DataReplicationReplicationExtensionData : ResourceData { - /// Initializes a new instance of ReplicationExtensionModelData. + /// Initializes a new instance of DataReplicationReplicationExtensionData. /// Replication extension model properties. /// is null. - public ReplicationExtensionModelData(ReplicationExtensionModelProperties properties) + public DataReplicationReplicationExtensionData(DataReplicationReplicationExtensionProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of ReplicationExtensionModelData. + /// Initializes a new instance of DataReplicationReplicationExtensionData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Replication extension model properties. - internal ReplicationExtensionModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ReplicationExtensionModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationReplicationExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationReplicationExtensionProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Replication extension model properties. - public ReplicationExtensionModelProperties Properties { get; set; } + public DataReplicationReplicationExtensionProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionResource.cs similarity index 53% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionResource.cs index 668503252c2f..8263c6ea2c78 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationReplicationExtensionResource.cs @@ -13,55 +13,50 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing a ReplicationExtensionModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetReplicationExtensionModelResource method. - /// Otherwise you can get one from its parent resource using the GetReplicationExtensionModel method. + /// A Class representing a DataReplicationReplicationExtension along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationReplicationExtensionResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationReplicationExtension method. /// - public partial class ReplicationExtensionModelResource : ArmResource + public partial class DataReplicationReplicationExtensionResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _replicationExtensionModelReplicationExtensionClientDiagnostics; - private readonly ReplicationExtensionRestOperations _replicationExtensionModelReplicationExtensionRestClient; - private readonly ClientDiagnostics _replicationExtensionOperationStatusClientDiagnostics; - private readonly ReplicationExtensionOperationStatusRestOperations _replicationExtensionOperationStatusRestClient; - private readonly ReplicationExtensionModelData _data; + private readonly ClientDiagnostics _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics; + private readonly ReplicationExtensionRestOperations _dataReplicationReplicationExtensionReplicationExtensionRestClient; + private readonly DataReplicationReplicationExtensionData _data; - /// Initializes a new instance of the class for mocking. - protected ReplicationExtensionModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationReplicationExtensionResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal ReplicationExtensionModelResource(ArmClient client, ReplicationExtensionModelData data) : this(client, data.Id) + internal DataReplicationReplicationExtensionResource(ArmClient client, DataReplicationReplicationExtensionData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal ReplicationExtensionModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationReplicationExtensionResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _replicationExtensionModelReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string replicationExtensionModelReplicationExtensionApiVersion); - _replicationExtensionModelReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, replicationExtensionModelReplicationExtensionApiVersion); - _replicationExtensionOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _replicationExtensionOperationStatusRestClient = new ReplicationExtensionOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationReplicationExtensionReplicationExtensionApiVersion); + _dataReplicationReplicationExtensionReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationReplicationExtensionReplicationExtensionApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -75,7 +70,7 @@ internal ReplicationExtensionModelResource(ArmClient client, ResourceIdentifier /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual ReplicationExtensionModelData Data + public virtual DataReplicationReplicationExtensionData Data { get { @@ -105,16 +100,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Get"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionResource.Get"); scope.Start(); try { - var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationReplicationExtensionReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -137,16 +132,16 @@ public virtual async Task> GetAsync( /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Get"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionResource.Get"); scope.Start(); try { - var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataReplicationReplicationExtensionReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -172,12 +167,12 @@ public virtual Response Get(CancellationToken /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Delete"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionResource.Delete"); scope.Start(); try { - var response = await _replicationExtensionModelReplicationExtensionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(_replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationReplicationExtensionReplicationExtensionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,12 +201,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Delete"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionResource.Delete"); scope.Start(); try { - var response = _replicationExtensionModelReplicationExtensionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(_replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationReplicationExtensionReplicationExtensionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -240,16 +235,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Replication extension model. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationReplicationExtensionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Update"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionResource.Update"); scope.Start(); try { - var response = await _replicationExtensionModelReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationReplicationExtensionOperationSource(Client), _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -278,16 +273,16 @@ public virtual async Task> Updat /// Replication extension model. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationReplicationExtensionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _replicationExtensionModelReplicationExtensionClientDiagnostics.CreateScope("ReplicationExtensionModelResource.Update"); + using var scope = _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationReplicationExtensionResource.Update"); scope.Start(); try { - var response = _replicationExtensionModelReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationReplicationExtensionReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationReplicationExtensionOperationSource(Client), _dataReplicationReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -298,75 +293,5 @@ public virtual ArmOperation Update(WaitUntil throw; } } - - /// - /// Tracks the results of an asynchronous operation on the replication extension. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}/operations/{operationId} - /// - /// - /// Operation Id - /// ReplicationExtensionOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetReplicationExtensionOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _replicationExtensionOperationStatusClientDiagnostics.CreateScope("ReplicationExtensionModelResource.GetReplicationExtensionOperationStatu"); - scope.Start(); - try - { - var response = await _replicationExtensionOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the replication extension. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}/operations/{operationId} - /// - /// - /// Operation Id - /// ReplicationExtensionOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetReplicationExtensionOperationStatu(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _replicationExtensionOperationStatusClientDiagnostics.CreateScope("ReplicationExtensionModelResource.GetReplicationExtensionOperationStatu"); - scope.Start(); - try - { - var response = _replicationExtensionOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultCollection.cs similarity index 65% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultCollection.cs index dfc4f8a205d8..dd5c283abca5 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultCollection.cs @@ -21,28 +21,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetVaultModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationVaults method from an instance of . /// - public partial class VaultModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationVaultCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _vaultModelVaultClientDiagnostics; - private readonly VaultRestOperations _vaultModelVaultRestClient; + private readonly ClientDiagnostics _dataReplicationVaultVaultClientDiagnostics; + private readonly VaultRestOperations _dataReplicationVaultVaultRestClient; - /// Initializes a new instance of the class for mocking. - protected VaultModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationVaultCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal VaultModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationVaultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _vaultModelVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", VaultModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(VaultModelResource.ResourceType, out string vaultModelVaultApiVersion); - _vaultModelVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, vaultModelVaultApiVersion); + _dataReplicationVaultVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationVaultResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationVaultResource.ResourceType, out string dataReplicationVaultVaultApiVersion); + _dataReplicationVaultVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationVaultVaultApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,17 +73,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _vaultModelVaultRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationVaultVaultRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,17 +114,17 @@ public virtual async Task> CreateOrUpdateAsync( /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.CreateOrUpdate"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.CreateOrUpdate"); scope.Start(); try { - var response = _vaultModelVaultRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationVaultVaultRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -153,18 +153,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string vaultName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Get"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Get"); scope.Start(); try { - var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -190,18 +190,18 @@ public virtual async Task> GetAsync(string vaultNam /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string vaultName, CancellationToken cancellationToken = default) + public virtual Response Get(string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Get"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Get"); scope.Start(); try { - var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken); + var response = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -225,12 +225,12 @@ public virtual Response Get(string vaultName, CancellationTo /// /// Continuation token from the previous call. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _vaultModelVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _vaultModelVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationVaultVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationVaultVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), _dataReplicationVaultVaultClientDiagnostics, Pipeline, "DataReplicationVaultCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -248,12 +248,12 @@ public virtual AsyncPageable GetAllAsync(string continuation /// /// Continuation token from the previous call. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _vaultModelVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _vaultModelVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), _vaultModelVaultClientDiagnostics, Pipeline, "VaultModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationVaultVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationVaultVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), _dataReplicationVaultVaultClientDiagnostics, Pipeline, "DataReplicationVaultCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -277,11 +277,11 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Exists"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Exists"); scope.Start(); try { - var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -312,11 +312,11 @@ public virtual Response Exists(string vaultName, CancellationToken cancell { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelCollection.Exists"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Exists"); scope.Start(); try { - var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken); + var response = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -326,7 +326,7 @@ public virtual Response Exists(string vaultName, CancellationToken cancell } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -336,7 +336,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.cs similarity index 57% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.cs index 86481a2ad28c..81d16c83bc3b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.cs @@ -13,18 +13,18 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the VaultModel data model. + /// A class representing the DataReplicationVault data model. /// Vault model. /// - public partial class VaultModelData : TrackedResourceData + public partial class DataReplicationVaultData : TrackedResourceData { - /// Initializes a new instance of VaultModelData. + /// Initializes a new instance of DataReplicationVaultData. /// The location. - public VaultModelData(AzureLocation location) : base(location) + public DataReplicationVaultData(AzureLocation location) : base(location) { } - /// Initializes a new instance of VaultModelData. + /// Initializes a new instance of DataReplicationVaultData. /// The id. /// The name. /// The resourceType. @@ -32,12 +32,12 @@ public VaultModelData(AzureLocation location) : base(location) /// The tags. /// The location. /// Vault properties. - internal VaultModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, VaultModelProperties properties) : base(id, name, resourceType, systemData, tags, location) + internal DataReplicationVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataReplicationVaultProperties properties) : base(id, name, resourceType, systemData, tags, location) { Properties = properties; } /// Vault properties. - public VaultModelProperties Properties { get; set; } + public DataReplicationVaultProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.cs similarity index 67% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.cs index d1eb8e1ce789..2c48bd5d8a6f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.cs @@ -20,50 +20,46 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A Class representing a VaultModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetVaultModelResource method. - /// Otherwise you can get one from its parent resource using the GetVaultModel method. + /// A Class representing a DataReplicationVault along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationVaultResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationVault method. /// - public partial class VaultModelResource : ArmResource + public partial class DataReplicationVaultResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _vaultModelVaultClientDiagnostics; - private readonly VaultRestOperations _vaultModelVaultRestClient; - private readonly ClientDiagnostics _vaultOperationStatusClientDiagnostics; - private readonly VaultOperationStatusRestOperations _vaultOperationStatusRestClient; - private readonly VaultModelData _data; + private readonly ClientDiagnostics _dataReplicationVaultVaultClientDiagnostics; + private readonly VaultRestOperations _dataReplicationVaultVaultRestClient; + private readonly DataReplicationVaultData _data; - /// Initializes a new instance of the class for mocking. - protected VaultModelResource() + /// Initializes a new instance of the class for mocking. + protected DataReplicationVaultResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal VaultModelResource(ArmClient client, VaultModelData data) : this(client, data.Id) + internal DataReplicationVaultResource(ArmClient client, DataReplicationVaultData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal VaultModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationVaultResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _vaultModelVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string vaultModelVaultApiVersion); - _vaultModelVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, vaultModelVaultApiVersion); - _vaultOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _vaultOperationStatusRestClient = new VaultOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _dataReplicationVaultVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationVaultVaultApiVersion); + _dataReplicationVaultVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationVaultVaultApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -77,7 +73,7 @@ internal VaultModelResource(ArmClient client, ResourceIdentifier id) : base(clie /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual VaultModelData Data + public virtual DataReplicationVaultData Data { get { @@ -93,11 +89,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of EmailConfigurationModelResources in the VaultModel. - /// An object representing collection of EmailConfigurationModelResources and their operations over a EmailConfigurationModelResource. - public virtual EmailConfigurationModelCollection GetEmailConfigurationModels() + /// Gets a collection of DataReplicationEmailConfigurationResources in the DataReplicationVault. + /// An object representing collection of DataReplicationEmailConfigurationResources and their operations over a DataReplicationEmailConfigurationResource. + public virtual DataReplicationEmailConfigurationCollection GetDataReplicationEmailConfigurations() { - return GetCachedClient(Client => new EmailConfigurationModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationEmailConfigurationCollection(Client, Id)); } /// @@ -118,9 +114,9 @@ public virtual EmailConfigurationModelCollection GetEmailConfigurationModels() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetEmailConfigurationModelAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationEmailConfigurationAsync(string emailConfigurationName, CancellationToken cancellationToken = default) { - return await GetEmailConfigurationModels().GetAsync(emailConfigurationName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationEmailConfigurations().GetAsync(emailConfigurationName, cancellationToken).ConfigureAwait(false); } /// @@ -141,16 +137,16 @@ public virtual async Task> GetEmailCon /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetEmailConfigurationModel(string emailConfigurationName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationEmailConfiguration(string emailConfigurationName, CancellationToken cancellationToken = default) { - return GetEmailConfigurationModels().Get(emailConfigurationName, cancellationToken); + return GetDataReplicationEmailConfigurations().Get(emailConfigurationName, cancellationToken); } - /// Gets a collection of EventModelResources in the VaultModel. - /// An object representing collection of EventModelResources and their operations over a EventModelResource. - public virtual EventModelCollection GetEventModels() + /// Gets a collection of DataReplicationEventResources in the DataReplicationVault. + /// An object representing collection of DataReplicationEventResources and their operations over a DataReplicationEventResource. + public virtual DataReplicationEventCollection GetDataReplicationEvents() { - return GetCachedClient(Client => new EventModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationEventCollection(Client, Id)); } /// @@ -171,9 +167,9 @@ public virtual EventModelCollection GetEventModels() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetEventModelAsync(string eventName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationEventAsync(string eventName, CancellationToken cancellationToken = default) { - return await GetEventModels().GetAsync(eventName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationEvents().GetAsync(eventName, cancellationToken).ConfigureAwait(false); } /// @@ -194,16 +190,16 @@ public virtual async Task> GetEventModelAsync(strin /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetEventModel(string eventName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationEvent(string eventName, CancellationToken cancellationToken = default) { - return GetEventModels().Get(eventName, cancellationToken); + return GetDataReplicationEvents().Get(eventName, cancellationToken); } - /// Gets a collection of PolicyModelResources in the VaultModel. - /// An object representing collection of PolicyModelResources and their operations over a PolicyModelResource. - public virtual PolicyModelCollection GetPolicyModels() + /// Gets a collection of DataReplicationPolicyResources in the DataReplicationVault. + /// An object representing collection of DataReplicationPolicyResources and their operations over a DataReplicationPolicyResource. + public virtual DataReplicationPolicyCollection GetDataReplicationPolicies() { - return GetCachedClient(Client => new PolicyModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationPolicyCollection(Client, Id)); } /// @@ -224,9 +220,9 @@ public virtual PolicyModelCollection GetPolicyModels() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetPolicyModelAsync(string policyName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationPolicyAsync(string policyName, CancellationToken cancellationToken = default) { - return await GetPolicyModels().GetAsync(policyName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationPolicies().GetAsync(policyName, cancellationToken).ConfigureAwait(false); } /// @@ -247,16 +243,16 @@ public virtual async Task> GetPolicyModelAsync(str /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetPolicyModel(string policyName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationPolicy(string policyName, CancellationToken cancellationToken = default) { - return GetPolicyModels().Get(policyName, cancellationToken); + return GetDataReplicationPolicies().Get(policyName, cancellationToken); } - /// Gets a collection of ProtectedItemModelResources in the VaultModel. - /// An object representing collection of ProtectedItemModelResources and their operations over a ProtectedItemModelResource. - public virtual ProtectedItemModelCollection GetProtectedItemModels() + /// Gets a collection of DataReplicationProtectedItemResources in the DataReplicationVault. + /// An object representing collection of DataReplicationProtectedItemResources and their operations over a DataReplicationProtectedItemResource. + public virtual DataReplicationProtectedItemCollection GetDataReplicationProtectedItems() { - return GetCachedClient(Client => new ProtectedItemModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationProtectedItemCollection(Client, Id)); } /// @@ -277,9 +273,9 @@ public virtual ProtectedItemModelCollection GetProtectedItemModels() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetProtectedItemModelAsync(string protectedItemName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationProtectedItemAsync(string protectedItemName, CancellationToken cancellationToken = default) { - return await GetProtectedItemModels().GetAsync(protectedItemName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationProtectedItems().GetAsync(protectedItemName, cancellationToken).ConfigureAwait(false); } /// @@ -300,16 +296,16 @@ public virtual async Task> GetProtectedItem /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetProtectedItemModel(string protectedItemName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationProtectedItem(string protectedItemName, CancellationToken cancellationToken = default) { - return GetProtectedItemModels().Get(protectedItemName, cancellationToken); + return GetDataReplicationProtectedItems().Get(protectedItemName, cancellationToken); } - /// Gets a collection of ReplicationExtensionModelResources in the VaultModel. - /// An object representing collection of ReplicationExtensionModelResources and their operations over a ReplicationExtensionModelResource. - public virtual ReplicationExtensionModelCollection GetReplicationExtensionModels() + /// Gets a collection of DataReplicationReplicationExtensionResources in the DataReplicationVault. + /// An object representing collection of DataReplicationReplicationExtensionResources and their operations over a DataReplicationReplicationExtensionResource. + public virtual DataReplicationReplicationExtensionCollection GetDataReplicationReplicationExtensions() { - return GetCachedClient(Client => new ReplicationExtensionModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationReplicationExtensionCollection(Client, Id)); } /// @@ -330,9 +326,9 @@ public virtual ReplicationExtensionModelCollection GetReplicationExtensionModels /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetReplicationExtensionModelAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationReplicationExtensionAsync(string replicationExtensionName, CancellationToken cancellationToken = default) { - return await GetReplicationExtensionModels().GetAsync(replicationExtensionName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationReplicationExtensions().GetAsync(replicationExtensionName, cancellationToken).ConfigureAwait(false); } /// @@ -353,16 +349,16 @@ public virtual async Task> GetReplic /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetReplicationExtensionModel(string replicationExtensionName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationReplicationExtension(string replicationExtensionName, CancellationToken cancellationToken = default) { - return GetReplicationExtensionModels().Get(replicationExtensionName, cancellationToken); + return GetDataReplicationReplicationExtensions().Get(replicationExtensionName, cancellationToken); } - /// Gets a collection of WorkflowModelResources in the VaultModel. - /// An object representing collection of WorkflowModelResources and their operations over a WorkflowModelResource. - public virtual WorkflowModelCollection GetWorkflowModels() + /// Gets a collection of DataReplicationWorkflowResources in the DataReplicationVault. + /// An object representing collection of DataReplicationWorkflowResources and their operations over a DataReplicationWorkflowResource. + public virtual DataReplicationWorkflowCollection GetDataReplicationWorkflows() { - return GetCachedClient(Client => new WorkflowModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationWorkflowCollection(Client, Id)); } /// @@ -383,9 +379,9 @@ public virtual WorkflowModelCollection GetWorkflowModels() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetWorkflowModelAsync(string jobName, CancellationToken cancellationToken = default) + public virtual async Task> GetDataReplicationWorkflowAsync(string jobName, CancellationToken cancellationToken = default) { - return await GetWorkflowModels().GetAsync(jobName, cancellationToken).ConfigureAwait(false); + return await GetDataReplicationWorkflows().GetAsync(jobName, cancellationToken).ConfigureAwait(false); } /// @@ -406,9 +402,9 @@ public virtual async Task> GetWorkflowModelAsync /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetWorkflowModel(string jobName, CancellationToken cancellationToken = default) + public virtual Response GetDataReplicationWorkflow(string jobName, CancellationToken cancellationToken = default) { - return GetWorkflowModels().Get(jobName, cancellationToken); + return GetDataReplicationWorkflows().Get(jobName, cancellationToken); } /// @@ -425,16 +421,16 @@ public virtual Response GetWorkflowModel(string jobName, /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Get"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Get"); scope.Start(); try { - var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -457,16 +453,16 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Get"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Get"); scope.Start(); try { - var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -492,12 +488,12 @@ public virtual Response Get(CancellationToken cancellationTo /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Delete"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Delete"); scope.Start(); try { - var response = await _vaultModelVaultRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(_vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationVaultVaultRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -526,12 +522,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Delete"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Delete"); scope.Start(); try { - var response = _vaultModelVaultRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(_vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationVaultVaultRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -560,16 +556,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Vault properties. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, VaultModelPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Update"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Update"); scope.Start(); try { - var response = await _vaultModelVaultRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _dataReplicationVaultVaultRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -598,16 +594,16 @@ public virtual async Task> UpdateAsync(WaitUnti /// Vault properties. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, VaultModelPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.Update"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Update"); scope.Start(); try { - var response = _vaultModelVaultRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _dataReplicationVaultVaultRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -619,76 +615,6 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Vaul } } - /// - /// Tracks the results of an asynchronous operation on the vault. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/operations/{operationId} - /// - /// - /// Operation Id - /// VaultOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetVaultOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _vaultOperationStatusClientDiagnostics.CreateScope("VaultModelResource.GetVaultOperationStatu"); - scope.Start(); - try - { - var response = await _vaultOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the vault. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/operations/{operationId} - /// - /// - /// Operation Id - /// VaultOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetVaultOperationStatu(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _vaultOperationStatusClientDiagnostics.CreateScope("VaultModelResource.GetVaultOperationStatu"); - scope.Start(); - try - { - var response = _vaultOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// @@ -706,12 +632,12 @@ public virtual Response GetVaultOperationStatu(string operation /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.AddTag"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.AddTag"); scope.Start(); try { @@ -720,13 +646,13 @@ public virtual async Task> AddTagAsync(string key, var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new VaultModelPatch(); + var patch = new DataReplicationVaultPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -760,12 +686,12 @@ public virtual async Task> AddTagAsync(string key, /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.AddTag"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.AddTag"); scope.Start(); try { @@ -774,13 +700,13 @@ public virtual Response AddTag(string key, string value, Can var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new VaultModelPatch(); + var patch = new DataReplicationVaultPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -813,11 +739,11 @@ public virtual Response AddTag(string key, string value, Can /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.SetTags"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.SetTags"); scope.Start(); try { @@ -827,13 +753,13 @@ public virtual async Task> SetTagsAsync(IDictionary var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new VaultModelPatch(); + var patch = new DataReplicationVaultPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -862,11 +788,11 @@ public virtual async Task> SetTagsAsync(IDictionary /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.SetTags"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.SetTags"); scope.Start(); try { @@ -876,13 +802,13 @@ public virtual Response SetTags(IDictionary var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new VaultModelPatch(); + var patch = new DataReplicationVaultPatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -911,11 +837,11 @@ public virtual Response SetTags(IDictionary /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.RemoveTag"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.RemoveTag"); scope.Start(); try { @@ -924,13 +850,13 @@ public virtual async Task> RemoveTagAsync(string ke var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new VaultModelPatch(); + var patch = new DataReplicationVaultPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -963,11 +889,11 @@ public virtual async Task> RemoveTagAsync(string ke /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _vaultModelVaultClientDiagnostics.CreateScope("VaultModelResource.RemoveTag"); + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.RemoveTag"); scope.Start(); try { @@ -976,13 +902,13 @@ public virtual Response RemoveTag(string key, CancellationTo var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new VaultModelPatch(); + var patch = new DataReplicationVaultPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowCollection.cs similarity index 61% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowCollection.cs index 34d1eb82205f..dd9d8e9d4b4f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowCollection.cs @@ -20,28 +20,28 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkflowModels method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationWorkflows method from an instance of . /// - public partial class WorkflowModelCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataReplicationWorkflowCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _workflowModelWorkflowClientDiagnostics; - private readonly WorkflowRestOperations _workflowModelWorkflowRestClient; + private readonly ClientDiagnostics _dataReplicationWorkflowWorkflowClientDiagnostics; + private readonly WorkflowRestOperations _dataReplicationWorkflowWorkflowRestClient; - /// Initializes a new instance of the class for mocking. - protected WorkflowModelCollection() + /// Initializes a new instance of the class for mocking. + protected DataReplicationWorkflowCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal WorkflowModelCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataReplicationWorkflowCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _workflowModelWorkflowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", WorkflowModelResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkflowModelResource.ResourceType, out string workflowModelWorkflowApiVersion); - _workflowModelWorkflowRestClient = new WorkflowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowModelWorkflowApiVersion); + _dataReplicationWorkflowWorkflowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationWorkflowResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationWorkflowResource.ResourceType, out string dataReplicationWorkflowWorkflowApiVersion); + _dataReplicationWorkflowWorkflowRestClient = new WorkflowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationWorkflowWorkflowApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -49,8 +49,8 @@ internal WorkflowModelCollection(ArmClient client, ResourceIdentifier id) : base internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != VaultModelResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, VaultModelResource.ResourceType), nameof(id)); + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); } /// @@ -70,18 +70,18 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string jobName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string jobName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Get"); + using var scope = _dataReplicationWorkflowWorkflowClientDiagnostics.CreateScope("DataReplicationWorkflowCollection.Get"); scope.Start(); try { - var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationWorkflowWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationWorkflowResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -107,18 +107,18 @@ public virtual async Task> GetAsync(string jobNa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string jobName, CancellationToken cancellationToken = default) + public virtual Response Get(string jobName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Get"); + using var scope = _dataReplicationWorkflowWorkflowClientDiagnostics.CreateScope("DataReplicationWorkflowCollection.Get"); scope.Start(); try { - var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken); + var response = _dataReplicationWorkflowWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataReplicationWorkflowResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -143,12 +143,12 @@ public virtual Response Get(string jobName, CancellationT /// Filter string. /// Continuation token. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationWorkflowWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationWorkflowWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationWorkflowResource(Client, DataReplicationWorkflowData.DeserializeDataReplicationWorkflowData(e)), _dataReplicationWorkflowWorkflowClientDiagnostics, Pipeline, "DataReplicationWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -167,12 +167,12 @@ public virtual AsyncPageable GetAllAsync(string filter = /// Filter string. /// Continuation token. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationWorkflowWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationWorkflowWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationWorkflowResource(Client, DataReplicationWorkflowData.DeserializeDataReplicationWorkflowData(e)), _dataReplicationWorkflowWorkflowClientDiagnostics, Pipeline, "DataReplicationWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -196,11 +196,11 @@ public virtual async Task> ExistsAsync(string jobName, Cancellati { Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Exists"); + using var scope = _dataReplicationWorkflowWorkflowClientDiagnostics.CreateScope("DataReplicationWorkflowCollection.Exists"); scope.Start(); try { - var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataReplicationWorkflowWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -231,11 +231,11 @@ public virtual Response Exists(string jobName, CancellationToken cancellat { Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelCollection.Exists"); + using var scope = _dataReplicationWorkflowWorkflowClientDiagnostics.CreateScope("DataReplicationWorkflowCollection.Exists"); scope.Start(); try { - var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken); + var response = _dataReplicationWorkflowWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -245,7 +245,7 @@ public virtual Response Exists(string jobName, CancellationToken cancellat } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -255,7 +255,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowData.cs similarity index 61% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowData.cs index a459287e69aa..1657be7706e6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelData.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowData.cs @@ -13,33 +13,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { /// - /// A class representing the WorkflowModel data model. + /// A class representing the DataReplicationWorkflow data model. /// Workflow model. /// - public partial class WorkflowModelData : ResourceData + public partial class DataReplicationWorkflowData : ResourceData { - /// Initializes a new instance of WorkflowModelData. + /// Initializes a new instance of DataReplicationWorkflowData. /// Workflow model properties. /// is null. - internal WorkflowModelData(WorkflowModelProperties properties) + internal DataReplicationWorkflowData(DataReplicationWorkflowProperties properties) { Argument.AssertNotNull(properties, nameof(properties)); Properties = properties; } - /// Initializes a new instance of WorkflowModelData. + /// Initializes a new instance of DataReplicationWorkflowData. /// The id. /// The name. /// The resourceType. /// The systemData. /// Workflow model properties. - internal WorkflowModelData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkflowModelProperties properties) : base(id, name, resourceType, systemData) + internal DataReplicationWorkflowData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationWorkflowProperties properties) : base(id, name, resourceType, systemData) { Properties = properties; } /// Workflow model properties. - public WorkflowModelProperties Properties { get; } + public DataReplicationWorkflowProperties Properties { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowResource.cs new file mode 100644 index 000000000000..9b8acc77b690 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationWorkflowResource.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationWorkflow along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationWorkflowResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationWorkflow method. + /// + public partial class DataReplicationWorkflowResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationWorkflowWorkflowClientDiagnostics; + private readonly WorkflowRestOperations _dataReplicationWorkflowWorkflowRestClient; + private readonly DataReplicationWorkflowData _data; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationWorkflowResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationWorkflowResource(ArmClient client, DataReplicationWorkflowData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationWorkflowResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationWorkflowWorkflowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationWorkflowWorkflowApiVersion); + _dataReplicationWorkflowWorkflowRestClient = new WorkflowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationWorkflowWorkflowApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/jobs"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationWorkflowData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationWorkflowWorkflowClientDiagnostics.CreateScope("DataReplicationWorkflowResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationWorkflowWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// Workflow_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationWorkflowWorkflowClientDiagnostics.CreateScope("DataReplicationWorkflowResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationWorkflowWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs index 9313199f6bea..a7f4414a17e6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs @@ -50,202 +50,202 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region DraModelResource + #region DataReplicationDraResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DraModelResource GetDraModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationDraResource GetDataReplicationDraResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DraModelResource.ValidateResourceId(id); - return new DraModelResource(client, id); + DataReplicationDraResource.ValidateResourceId(id); + return new DataReplicationDraResource(client, id); } ); } #endregion - #region EmailConfigurationModelResource + #region DataReplicationEmailConfigurationResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static EmailConfigurationModelResource GetEmailConfigurationModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - EmailConfigurationModelResource.ValidateResourceId(id); - return new EmailConfigurationModelResource(client, id); + DataReplicationEmailConfigurationResource.ValidateResourceId(id); + return new DataReplicationEmailConfigurationResource(client, id); } ); } #endregion - #region EventModelResource + #region DataReplicationEventResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static EventModelResource GetEventModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationEventResource GetDataReplicationEventResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - EventModelResource.ValidateResourceId(id); - return new EventModelResource(client, id); + DataReplicationEventResource.ValidateResourceId(id); + return new DataReplicationEventResource(client, id); } ); } #endregion - #region FabricModelResource + #region DataReplicationFabricResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static FabricModelResource GetFabricModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationFabricResource GetDataReplicationFabricResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - FabricModelResource.ValidateResourceId(id); - return new FabricModelResource(client, id); + DataReplicationFabricResource.ValidateResourceId(id); + return new DataReplicationFabricResource(client, id); } ); } #endregion - #region PolicyModelResource + #region DataReplicationPolicyResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static PolicyModelResource GetPolicyModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationPolicyResource GetDataReplicationPolicyResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - PolicyModelResource.ValidateResourceId(id); - return new PolicyModelResource(client, id); + DataReplicationPolicyResource.ValidateResourceId(id); + return new DataReplicationPolicyResource(client, id); } ); } #endregion - #region ProtectedItemModelResource + #region DataReplicationProtectedItemResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ProtectedItemModelResource GetProtectedItemModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ProtectedItemModelResource.ValidateResourceId(id); - return new ProtectedItemModelResource(client, id); + DataReplicationProtectedItemResource.ValidateResourceId(id); + return new DataReplicationProtectedItemResource(client, id); } ); } #endregion - #region RecoveryPointModelResource + #region DataReplicationRecoveryPointResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static RecoveryPointModelResource GetRecoveryPointModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - RecoveryPointModelResource.ValidateResourceId(id); - return new RecoveryPointModelResource(client, id); + DataReplicationRecoveryPointResource.ValidateResourceId(id); + return new DataReplicationRecoveryPointResource(client, id); } ); } #endregion - #region ReplicationExtensionModelResource + #region DataReplicationReplicationExtensionResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ReplicationExtensionModelResource GetReplicationExtensionModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationReplicationExtensionResource GetDataReplicationReplicationExtensionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ReplicationExtensionModelResource.ValidateResourceId(id); - return new ReplicationExtensionModelResource(client, id); + DataReplicationReplicationExtensionResource.ValidateResourceId(id); + return new DataReplicationReplicationExtensionResource(client, id); } ); } #endregion - #region VaultModelResource + #region DataReplicationVaultResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static VaultModelResource GetVaultModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationVaultResource GetDataReplicationVaultResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - VaultModelResource.ValidateResourceId(id); - return new VaultModelResource(client, id); + DataReplicationVaultResource.ValidateResourceId(id); + return new DataReplicationVaultResource(client, id); } ); } #endregion - #region WorkflowModelResource + #region DataReplicationWorkflowResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static WorkflowModelResource GetWorkflowModelResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DataReplicationWorkflowResource GetDataReplicationWorkflowResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - WorkflowModelResource.ValidateResourceId(id); - return new WorkflowModelResource(client, id); + DataReplicationWorkflowResource.ValidateResourceId(id); + return new DataReplicationWorkflowResource(client, id); } ); } #endregion - /// Gets a collection of FabricModelResources in the ResourceGroupResource. + /// Gets a collection of DataReplicationFabricResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of FabricModelResources and their operations over a FabricModelResource. - public static FabricModelCollection GetFabricModels(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of DataReplicationFabricResources and their operations over a DataReplicationFabricResource. + public static DataReplicationFabricCollection GetDataReplicationFabrics(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetFabricModels(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDataReplicationFabrics(); } /// @@ -267,9 +267,9 @@ public static FabricModelCollection GetFabricModels(this ResourceGroupResource r /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetFabricModelAsync(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) + public static async Task> GetDataReplicationFabricAsync(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetFabricModels().GetAsync(fabricName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetDataReplicationFabrics().GetAsync(fabricName, cancellationToken).ConfigureAwait(false); } /// @@ -291,17 +291,17 @@ public static async Task> GetFabricModelAsync(this /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetFabricModel(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) + public static Response GetDataReplicationFabric(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetFabricModels().Get(fabricName, cancellationToken); + return resourceGroupResource.GetDataReplicationFabrics().Get(fabricName, cancellationToken); } - /// Gets a collection of VaultModelResources in the ResourceGroupResource. + /// Gets a collection of DataReplicationVaultResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of VaultModelResources and their operations over a VaultModelResource. - public static VaultModelCollection GetVaultModels(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of DataReplicationVaultResources and their operations over a DataReplicationVaultResource. + public static DataReplicationVaultCollection GetDataReplicationVaults(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetVaultModels(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDataReplicationVaults(); } /// @@ -323,9 +323,9 @@ public static VaultModelCollection GetVaultModels(this ResourceGroupResource res /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetVaultModelAsync(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) + public static async Task> GetDataReplicationVaultAsync(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetVaultModels().GetAsync(vaultName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetDataReplicationVaults().GetAsync(vaultName, cancellationToken).ConfigureAwait(false); } /// @@ -347,9 +347,9 @@ public static async Task> GetVaultModelAsync(this R /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetVaultModel(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) + public static Response GetDataReplicationVault(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetVaultModels().Get(vaultName, cancellationToken); + return resourceGroupResource.GetDataReplicationVaults().Get(vaultName, cancellationToken); } /// @@ -420,10 +420,10 @@ public static Response DeploymentPreflight(this Resour /// The instance the method will execute against. /// Continuation token from the previous call. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetFabricModelsAsync(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDataReplicationFabricsAsync(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFabricModelsAsync(continuationToken, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDataReplicationFabricsAsync(continuationToken, cancellationToken); } /// @@ -442,10 +442,10 @@ public static AsyncPageable GetFabricModelsAsync(this Subsc /// The instance the method will execute against. /// Continuation token from the previous call. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetFabricModels(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDataReplicationFabrics(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetFabricModels(continuationToken, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDataReplicationFabrics(continuationToken, cancellationToken); } /// @@ -463,11 +463,11 @@ public static Pageable GetFabricModels(this SubscriptionRes /// /// The instance the method will execute against. /// The name of the Azure region. - /// Resource details. + /// Resource details. /// The cancellation token to use. - public static async Task> CheckNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + public static async Task> CheckDataReplicationNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - return await GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailabilityAsync(location, body, cancellationToken).ConfigureAwait(false); + return await GetSubscriptionResourceExtensionClient(subscriptionResource).CheckDataReplicationNameAvailabilityAsync(location, content, cancellationToken).ConfigureAwait(false); } /// @@ -485,11 +485,11 @@ public static async Task> CheckName /// /// The instance the method will execute against. /// The name of the Azure region. - /// Resource details. + /// Resource details. /// The cancellation token to use. - public static Response CheckNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + public static Response CheckDataReplicationNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).CheckNameAvailability(location, body, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).CheckDataReplicationNameAvailability(location, content, cancellationToken); } /// @@ -508,10 +508,10 @@ public static Response CheckNameAvailability /// The instance the method will execute against. /// Continuation token from the previous call. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetVaultModelsAsync(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDataReplicationVaultsAsync(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVaultModelsAsync(continuationToken, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDataReplicationVaultsAsync(continuationToken, cancellationToken); } /// @@ -530,10 +530,10 @@ public static AsyncPageable GetVaultModelsAsync(this Subscri /// The instance the method will execute against. /// Continuation token from the previous call. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetVaultModels(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDataReplicationVaults(this SubscriptionResource subscriptionResource, string continuationToken = null, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetVaultModels(continuationToken, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDataReplicationVaults(continuationToken, cancellationToken); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 4b46614f84c1..28bf48155fcc 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -43,18 +43,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of FabricModelResources in the ResourceGroupResource. - /// An object representing collection of FabricModelResources and their operations over a FabricModelResource. - public virtual FabricModelCollection GetFabricModels() + /// Gets a collection of DataReplicationFabricResources in the ResourceGroupResource. + /// An object representing collection of DataReplicationFabricResources and their operations over a DataReplicationFabricResource. + public virtual DataReplicationFabricCollection GetDataReplicationFabrics() { - return GetCachedClient(Client => new FabricModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationFabricCollection(Client, Id)); } - /// Gets a collection of VaultModelResources in the ResourceGroupResource. - /// An object representing collection of VaultModelResources and their operations over a VaultModelResource. - public virtual VaultModelCollection GetVaultModels() + /// Gets a collection of DataReplicationVaultResources in the ResourceGroupResource. + /// An object representing collection of DataReplicationVaultResources and their operations over a DataReplicationVaultResource. + public virtual DataReplicationVaultCollection GetDataReplicationVaults() { - return GetCachedClient(Client => new VaultModelCollection(Client, Id)); + return GetCachedClient(Client => new DataReplicationVaultCollection(Client, Id)); } /// diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 3f05aad57ba3..3ffb3aaf3ae3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -20,12 +20,12 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _fabricModelFabricClientDiagnostics; - private FabricRestOperations _fabricModelFabricRestClient; + private ClientDiagnostics _dataReplicationFabricFabricClientDiagnostics; + private FabricRestOperations _dataReplicationFabricFabricRestClient; private ClientDiagnostics _defaultClientDiagnostics; private AzureSiteRecoveryManagementServiceAPIRestOperations _defaultRestClient; - private ClientDiagnostics _vaultModelVaultClientDiagnostics; - private VaultRestOperations _vaultModelVaultRestClient; + private ClientDiagnostics _dataReplicationVaultVaultClientDiagnostics; + private VaultRestOperations _dataReplicationVaultVaultRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -39,12 +39,12 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics FabricModelFabricClientDiagnostics => _fabricModelFabricClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", FabricModelResource.ResourceType.Namespace, Diagnostics); - private FabricRestOperations FabricModelFabricRestClient => _fabricModelFabricRestClient ??= new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(FabricModelResource.ResourceType)); + private ClientDiagnostics DataReplicationFabricFabricClientDiagnostics => _dataReplicationFabricFabricClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationFabricResource.ResourceType.Namespace, Diagnostics); + private FabricRestOperations DataReplicationFabricFabricRestClient => _dataReplicationFabricFabricRestClient ??= new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DataReplicationFabricResource.ResourceType)); private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); private AzureSiteRecoveryManagementServiceAPIRestOperations DefaultRestClient => _defaultRestClient ??= new AzureSiteRecoveryManagementServiceAPIRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics VaultModelVaultClientDiagnostics => _vaultModelVaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", VaultModelResource.ResourceType.Namespace, Diagnostics); - private VaultRestOperations VaultModelVaultRestClient => _vaultModelVaultRestClient ??= new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(VaultModelResource.ResourceType)); + private ClientDiagnostics DataReplicationVaultVaultClientDiagnostics => _dataReplicationVaultVaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationVaultResource.ResourceType.Namespace, Diagnostics); + private VaultRestOperations DataReplicationVaultVaultRestClient => _dataReplicationVaultVaultRestClient ??= new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DataReplicationVaultResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -67,12 +67,12 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// Continuation token from the previous call. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetFabricModelsAsync(string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDataReplicationFabricsAsync(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => FabricModelFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricModelFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), DataReplicationFabricFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDataReplicationFabrics", "value", "nextLink", cancellationToken); } /// @@ -90,12 +90,12 @@ public virtual AsyncPageable GetFabricModelsAsync(string co /// /// Continuation token from the previous call. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetFabricModels(string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDataReplicationFabrics(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => FabricModelFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricModelFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FabricModelResource(Client, FabricModelData.DeserializeFabricModelData(e)), FabricModelFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetFabricModels", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), DataReplicationFabricFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDataReplicationFabrics", "value", "nextLink", cancellationToken); } /// @@ -112,15 +112,15 @@ public virtual Pageable GetFabricModels(string continuation /// /// /// The name of the Azure region. - /// Resource details. + /// Resource details. /// The cancellation token to use. - public virtual async Task> CheckNameAvailabilityAsync(AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + public virtual async Task> CheckDataReplicationNameAvailabilityAsync(AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - using var scope = DefaultClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailability"); + using var scope = DefaultClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckDataReplicationNameAvailability"); scope.Start(); try { - var response = await DefaultRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, body, cancellationToken).ConfigureAwait(false); + var response = await DefaultRestClient.CheckNameAvailabilityAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -144,15 +144,15 @@ public virtual async Task> CheckNam /// /// /// The name of the Azure region. - /// Resource details. + /// Resource details. /// The cancellation token to use. - public virtual Response CheckNameAvailability(AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + public virtual Response CheckDataReplicationNameAvailability(AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { - using var scope = DefaultClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckNameAvailability"); + using var scope = DefaultClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.CheckDataReplicationNameAvailability"); scope.Start(); try { - var response = DefaultRestClient.CheckNameAvailability(Id.SubscriptionId, location, body, cancellationToken); + var response = DefaultRestClient.CheckNameAvailability(Id.SubscriptionId, location, content, cancellationToken); return response; } catch (Exception e) @@ -177,12 +177,12 @@ public virtual Response CheckNameAvailabilit /// /// Continuation token from the previous call. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetVaultModelsAsync(string continuationToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDataReplicationVaultsAsync(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => VaultModelVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VaultModelVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), DataReplicationVaultVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDataReplicationVaults", "value", "nextLink", cancellationToken); } /// @@ -200,12 +200,12 @@ public virtual AsyncPageable GetVaultModelsAsync(string cont /// /// Continuation token from the previous call. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetVaultModels(string continuationToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDataReplicationVaults(string continuationToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => VaultModelVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => VaultModelVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VaultModelResource(Client, VaultModelData.DeserializeVaultModelData(e)), VaultModelVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetVaultModels", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), DataReplicationVaultVaultClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDataReplicationVaults", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ProtectedItemModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationDraOperationSource.cs similarity index 50% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ProtectedItemModelOperationSource.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationDraOperationSource.cs index 6a16833006b8..26c5d7b1016f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ProtectedItemModelOperationSource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationDraOperationSource.cs @@ -14,27 +14,27 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - internal class ProtectedItemModelOperationSource : IOperationSource + internal class DataReplicationDraOperationSource : IOperationSource { private readonly ArmClient _client; - internal ProtectedItemModelOperationSource(ArmClient client) + internal DataReplicationDraOperationSource(ArmClient client) { _client = client; } - ProtectedItemModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + DataReplicationDraResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { using var document = JsonDocument.Parse(response.ContentStream); - var data = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); - return new ProtectedItemModelResource(_client, data); + var data = DataReplicationDraData.DeserializeDataReplicationDraData(document.RootElement); + return new DataReplicationDraResource(_client, data); } - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); - return new ProtectedItemModelResource(_client, data); + var data = DataReplicationDraData.DeserializeDataReplicationDraData(document.RootElement); + return new DataReplicationDraResource(_client, data); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricOperationSource.cs new file mode 100644 index 000000000000..f67a4ec936f8 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationFabricOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationFabricOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationFabricResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DataReplicationFabricData.DeserializeDataReplicationFabricData(document.RootElement); + return new DataReplicationFabricResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DataReplicationFabricData.DeserializeDataReplicationFabricData(document.RootElement); + return new DataReplicationFabricResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationPolicyOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationPolicyOperationSource.cs new file mode 100644 index 000000000000..f445ac553318 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationPolicyOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationPolicyOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DataReplicationPolicyData.DeserializeDataReplicationPolicyData(document.RootElement); + return new DataReplicationPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DataReplicationPolicyData.DeserializeDataReplicationPolicyData(document.RootElement); + return new DataReplicationPolicyResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationProtectedItemOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationProtectedItemOperationSource.cs new file mode 100644 index 000000000000..991d8a100e7f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationProtectedItemOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationProtectedItemOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationProtectedItemOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationProtectedItemResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(document.RootElement); + return new DataReplicationProtectedItemResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(document.RootElement); + return new DataReplicationProtectedItemResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationReplicationExtensionOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationReplicationExtensionOperationSource.cs new file mode 100644 index 000000000000..5103e1b3a39e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationReplicationExtensionOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationReplicationExtensionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationReplicationExtensionOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationReplicationExtensionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DataReplicationReplicationExtensionData.DeserializeDataReplicationReplicationExtensionData(document.RootElement); + return new DataReplicationReplicationExtensionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DataReplicationReplicationExtensionData.DeserializeDataReplicationReplicationExtensionData(document.RootElement); + return new DataReplicationReplicationExtensionResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationVaultOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationVaultOperationSource.cs new file mode 100644 index 000000000000..25811ddb989d --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationVaultOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationVaultOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationVaultOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationVaultResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DataReplicationVaultData.DeserializeDataReplicationVaultData(document.RootElement); + return new DataReplicationVaultResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DataReplicationVaultData.DeserializeDataReplicationVaultData(document.RootElement); + return new DataReplicationVaultResource(_client, data); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs deleted file mode 100644 index be5cabf93dc5..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DraModelOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal class DraModelOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal DraModelOperationSource(ArmClient client) - { - _client = client; - } - - DraModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = DraModelData.DeserializeDraModelData(document.RootElement); - return new DraModelResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = DraModelData.DeserializeDraModelData(document.RootElement); - return new DraModelResource(_client, data); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs deleted file mode 100644 index b7a7767db0e4..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/FabricModelOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal class FabricModelOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal FabricModelOperationSource(ArmClient client) - { - _client = client; - } - - FabricModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = FabricModelData.DeserializeFabricModelData(document.RootElement); - return new FabricModelResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = FabricModelData.DeserializeFabricModelData(document.RootElement); - return new FabricModelResource(_client, data); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs deleted file mode 100644 index 0f38ddab0284..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PolicyModelOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal class PolicyModelOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal PolicyModelOperationSource(ArmClient client) - { - _client = client; - } - - PolicyModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = PolicyModelData.DeserializePolicyModelData(document.RootElement); - return new PolicyModelResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = PolicyModelData.DeserializePolicyModelData(document.RootElement); - return new PolicyModelResource(_client, data); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs deleted file mode 100644 index a1ef2b595b19..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/ReplicationExtensionModelOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal class ReplicationExtensionModelOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ReplicationExtensionModelOperationSource(ArmClient client) - { - _client = client; - } - - ReplicationExtensionModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); - return new ReplicationExtensionModelResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); - return new ReplicationExtensionModelResource(_client, data); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs deleted file mode 100644 index 20a236a2758c..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/VaultModelOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal class VaultModelOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal VaultModelOperationSource(ArmClient client) - { - _client = client; - } - - VaultModelResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = VaultModelData.DeserializeVaultModelData(document.RootElement); - return new VaultModelResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = VaultModelData.DeserializeVaultModelData(document.RootElement); - return new VaultModelResource(_client, data); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.Serialization.cs similarity index 91% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.Serialization.cs index 18cd94904067..694c68e0c9b3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class AzStackHCIClusterProperties : IUtf8JsonSerializable + public partial class AzStackHciClusterProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -32,7 +32,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AzStackHCIClusterProperties DeserializeAzStackHCIClusterProperties(JsonElement element) + internal static AzStackHciClusterProperties DeserializeAzStackHciClusterProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -70,7 +70,7 @@ internal static AzStackHCIClusterProperties DeserializeAzStackHCIClusterProperti continue; } } - return new AzStackHCIClusterProperties(clusterName, resourceName, storageAccountName, storageContainers); + return new AzStackHciClusterProperties(clusterName, resourceName, storageAccountName, storageContainers); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.cs similarity index 90% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.cs index e1549824e5ca..1013786f311f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIClusterProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.cs @@ -13,15 +13,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// AzStackHCI cluster properties. - public partial class AzStackHCIClusterProperties + public partial class AzStackHciClusterProperties { - /// Initializes a new instance of AzStackHCIClusterProperties. + /// Initializes a new instance of AzStackHciClusterProperties. /// Gets or sets the AzStackHCICluster FQDN name. /// Gets or sets the AzStackHCICluster resource name. /// Gets or sets the Storage account name. /// Gets or sets the list of AzStackHCICluster Storage Container. /// , , or is null. - public AzStackHCIClusterProperties(string clusterName, string resourceName, string storageAccountName, IEnumerable storageContainers) + public AzStackHciClusterProperties(string clusterName, string resourceName, string storageAccountName, IEnumerable storageContainers) { Argument.AssertNotNull(clusterName, nameof(clusterName)); Argument.AssertNotNull(resourceName, nameof(resourceName)); @@ -34,12 +34,12 @@ public AzStackHCIClusterProperties(string clusterName, string resourceName, stri StorageContainers = storageContainers.ToList(); } - /// Initializes a new instance of AzStackHCIClusterProperties. + /// Initializes a new instance of AzStackHciClusterProperties. /// Gets or sets the AzStackHCICluster FQDN name. /// Gets or sets the AzStackHCICluster resource name. /// Gets or sets the Storage account name. /// Gets or sets the list of AzStackHCICluster Storage Container. - internal AzStackHCIClusterProperties(string clusterName, string resourceName, string storageAccountName, IList storageContainers) + internal AzStackHciClusterProperties(string clusterName, string resourceName, string storageAccountName, IList storageContainers) { ClusterName = clusterName; ResourceName = resourceName; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricModelCustomProperties.Serialization.cs similarity index 76% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricModelCustomProperties.Serialization.cs index 311d04060225..bcb35853b0f3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricModelCustomProperties.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class AzStackHCIFabricModelCustomProperties : IUtf8JsonSerializable + public partial class AzStackHciFabricModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -28,25 +28,25 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AzStackHCIFabricModelCustomProperties DeserializeAzStackHCIFabricModelCustomProperties(JsonElement element) + internal static AzStackHciFabricModelCustomProperties DeserializeAzStackHciFabricModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - string azStackHciSiteId = default; + ResourceIdentifier azStackHciSiteId = default; Optional> applianceName = default; - AzStackHCIClusterProperties cluster = default; - Optional fabricResourceId = default; + AzStackHciClusterProperties cluster = default; + Optional fabricResourceId = default; Optional fabricContainerId = default; - string migrationSolutionId = default; + ResourceIdentifier migrationSolutionId = default; Optional migrationHubUri = default; string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("azStackHciSiteId"u8)) { - azStackHciSiteId = property.Value.GetString(); + azStackHciSiteId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("applianceName"u8)) @@ -65,12 +65,16 @@ internal static AzStackHCIFabricModelCustomProperties DeserializeAzStackHCIFabri } if (property.NameEquals("cluster"u8)) { - cluster = AzStackHCIClusterProperties.DeserializeAzStackHCIClusterProperties(property.Value); + cluster = AzStackHciClusterProperties.DeserializeAzStackHciClusterProperties(property.Value); continue; } if (property.NameEquals("fabricResourceId"u8)) { - fabricResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("fabricContainerId"u8)) @@ -80,7 +84,7 @@ internal static AzStackHCIFabricModelCustomProperties DeserializeAzStackHCIFabri } if (property.NameEquals("migrationSolutionId"u8)) { - migrationSolutionId = property.Value.GetString(); + migrationSolutionId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("migrationHubUri"u8)) @@ -98,7 +102,7 @@ internal static AzStackHCIFabricModelCustomProperties DeserializeAzStackHCIFabri continue; } } - return new AzStackHCIFabricModelCustomProperties(instanceType, azStackHciSiteId, Optional.ToList(applianceName), cluster, fabricResourceId.Value, fabricContainerId.Value, migrationSolutionId, migrationHubUri.Value); + return new AzStackHciFabricModelCustomProperties(instanceType, azStackHciSiteId, Optional.ToList(applianceName), cluster, fabricResourceId.Value, fabricContainerId.Value, migrationSolutionId, migrationHubUri.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricModelCustomProperties.cs similarity index 77% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricModelCustomProperties.cs index edce1833bb82..a6dfbbe62797 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHCIFabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricModelCustomProperties.cs @@ -12,14 +12,14 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// AzStackHCI fabric model custom properties. - public partial class AzStackHCIFabricModelCustomProperties : FabricModelCustomProperties + public partial class AzStackHciFabricModelCustomProperties : FabricModelCustomProperties { - /// Initializes a new instance of AzStackHCIFabricModelCustomProperties. + /// Initializes a new instance of AzStackHciFabricModelCustomProperties. /// Gets or sets the ARM Id of the AzStackHCI site. /// AzStackHCI cluster properties. /// Gets or sets the Migration solution ARM Id. /// , or is null. - public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, AzStackHCIClusterProperties cluster, string migrationSolutionId) + public AzStackHciFabricModelCustomProperties(ResourceIdentifier azStackHciSiteId, AzStackHciClusterProperties cluster, ResourceIdentifier migrationSolutionId) { Argument.AssertNotNull(azStackHciSiteId, nameof(azStackHciSiteId)); Argument.AssertNotNull(cluster, nameof(cluster)); @@ -32,7 +32,7 @@ public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, AzStackHCI InstanceType = "AzStackHCI"; } - /// Initializes a new instance of AzStackHCIFabricModelCustomProperties. + /// Initializes a new instance of AzStackHciFabricModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the ARM Id of the AzStackHCI site. /// Gets or sets the Appliance name. @@ -41,7 +41,7 @@ public AzStackHCIFabricModelCustomProperties(string azStackHciSiteId, AzStackHCI /// Gets or sets the fabric container Id. /// Gets or sets the Migration solution ARM Id. /// Gets or sets the migration hub Uri. - internal AzStackHCIFabricModelCustomProperties(string instanceType, string azStackHciSiteId, IReadOnlyList applianceName, AzStackHCIClusterProperties cluster, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) + internal AzStackHciFabricModelCustomProperties(string instanceType, ResourceIdentifier azStackHciSiteId, IReadOnlyList applianceName, AzStackHciClusterProperties cluster, ResourceIdentifier fabricResourceId, string fabricContainerId, ResourceIdentifier migrationSolutionId, Uri migrationHubUri) : base(instanceType) { AzStackHciSiteId = azStackHciSiteId; ApplianceName = applianceName; @@ -54,17 +54,17 @@ internal AzStackHCIFabricModelCustomProperties(string instanceType, string azSta } /// Gets or sets the ARM Id of the AzStackHCI site. - public string AzStackHciSiteId { get; set; } + public ResourceIdentifier AzStackHciSiteId { get; set; } /// Gets or sets the Appliance name. public IReadOnlyList ApplianceName { get; } /// AzStackHCI cluster properties. - public AzStackHCIClusterProperties Cluster { get; set; } + public AzStackHciClusterProperties Cluster { get; set; } /// Gets or sets the fabric resource Id. - public string FabricResourceId { get; } + public ResourceIdentifier FabricResourceId { get; } /// Gets or sets the fabric container Id. public string FabricContainerId { get; } /// Gets or sets the Migration solution ARM Id. - public string MigrationSolutionId { get; set; } + public ResourceIdentifier MigrationSolutionId { get; set; } /// Gets or sets the migration hub Uri. public Uri MigrationHubUri { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraData.Serialization.cs similarity index 83% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraData.Serialization.cs index f98798f9e439..e8719f1eec74 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class ProtectedItemModelData : IUtf8JsonSerializable + public partial class DataReplicationDraData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,13 +22,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ProtectedItemModelData DeserializeProtectedItemModelData(JsonElement element) + internal static DataReplicationDraData DeserializeDataReplicationDraData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - ProtectedItemModelProperties properties = default; + DataReplicationDraProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -37,7 +37,7 @@ internal static ProtectedItemModelData DeserializeProtectedItemModelData(JsonEle { if (property.NameEquals("properties"u8)) { - properties = ProtectedItemModelProperties.DeserializeProtectedItemModelProperties(property.Value); + properties = DataReplicationDraProperties.DeserializeDataReplicationDraProperties(property.Value); continue; } if (property.NameEquals("id"u8)) @@ -65,7 +65,7 @@ internal static ProtectedItemModelData DeserializeProtectedItemModelData(JsonEle continue; } } - return new ProtectedItemModelData(id, name, type, systemData.Value, properties); + return new DataReplicationDraData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraListResult.Serialization.cs similarity index 72% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraListResult.Serialization.cs index 7219f06939fc..da8f08f38928 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - internal partial class ProtectedItemModelCollection + internal partial class DataReplicationDraListResult { - internal static ProtectedItemModelCollection DeserializeProtectedItemModelCollection(JsonElement element) + internal static DataReplicationDraListResult DeserializeDataReplicationDraListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static ProtectedItemModelCollection DeserializeProtectedItemModelCollec { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ProtectedItemModelData.DeserializeProtectedItemModelData(item)); + array.Add(DataReplicationDraData.DeserializeDataReplicationDraData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static ProtectedItemModelCollection DeserializeProtectedItemModelCollec continue; } } - return new ProtectedItemModelCollection(Optional.ToList(value), nextLink.Value); + return new DataReplicationDraListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraListResult.cs similarity index 60% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraListResult.cs index 71148bdedb5a..db148277e2c2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Dra model collection. - internal partial class DraModelCollection + internal partial class DataReplicationDraListResult { - /// Initializes a new instance of DraModelCollection. - internal DraModelCollection() + /// Initializes a new instance of DataReplicationDraListResult. + internal DataReplicationDraListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of DraModelCollection. + /// Initializes a new instance of DataReplicationDraListResult. /// Gets or sets the list of Dras. /// Gets or sets the value of next link. - internal DraModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationDraListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of Dras. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraProperties.Serialization.cs similarity index 75% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraProperties.Serialization.cs index f01f8742bb38..19114a099bf8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraProperties.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class DraModelProperties : IUtf8JsonSerializable + public partial class DataReplicationDraProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -30,7 +30,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DraModelProperties DeserializeDraModelProperties(JsonElement element) + internal static DataReplicationDraProperties DeserializeDataReplicationDraProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -39,13 +39,13 @@ internal static DraModelProperties DeserializeDraModelProperties(JsonElement ele Optional correlationId = default; string machineId = default; string machineName = default; - IdentityModel authenticationIdentity = default; - IdentityModel resourceAccessIdentity = default; + DataReplicationIdentity authenticationIdentity = default; + DataReplicationIdentity resourceAccessIdentity = default; Optional isResponsive = default; Optional lastHeartbeat = default; Optional versionNumber = default; - Optional provisioningState = default; - Optional> healthErrors = default; + Optional provisioningState = default; + Optional> healthErrors = default; DraModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { @@ -66,12 +66,12 @@ internal static DraModelProperties DeserializeDraModelProperties(JsonElement ele } if (property.NameEquals("authenticationIdentity"u8)) { - authenticationIdentity = IdentityModel.DeserializeIdentityModel(property.Value); + authenticationIdentity = DataReplicationIdentity.DeserializeDataReplicationIdentity(property.Value); continue; } if (property.NameEquals("resourceAccessIdentity"u8)) { - resourceAccessIdentity = IdentityModel.DeserializeIdentityModel(property.Value); + resourceAccessIdentity = DataReplicationIdentity.DeserializeDataReplicationIdentity(property.Value); continue; } if (property.NameEquals("isResponsive"u8)) @@ -103,7 +103,7 @@ internal static DraModelProperties DeserializeDraModelProperties(JsonElement ele { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("healthErrors"u8)) @@ -112,10 +112,10 @@ internal static DraModelProperties DeserializeDraModelProperties(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item)); } healthErrors = array; continue; @@ -126,7 +126,7 @@ internal static DraModelProperties DeserializeDraModelProperties(JsonElement ele continue; } } - return new DraModelProperties(correlationId.Value, machineId, machineName, authenticationIdentity, resourceAccessIdentity, Optional.ToNullable(isResponsive), Optional.ToNullable(lastHeartbeat), versionNumber.Value, Optional.ToNullable(provisioningState), Optional.ToList(healthErrors), customProperties); + return new DataReplicationDraProperties(correlationId.Value, machineId, machineName, authenticationIdentity, resourceAccessIdentity, Optional.ToNullable(isResponsive), Optional.ToNullable(lastHeartbeat), versionNumber.Value, Optional.ToNullable(provisioningState), Optional.ToList(healthErrors), customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraProperties.cs similarity index 72% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraProperties.cs index 40d7af78d3ed..0b9953a696db 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDraProperties.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Dra model properties. - public partial class DraModelProperties + public partial class DataReplicationDraProperties { - /// Initializes a new instance of DraModelProperties. + /// Initializes a new instance of DataReplicationDraProperties. /// Gets or sets the machine Id where Dra is running. /// Gets or sets the machine name where Dra is running. /// Identity model. @@ -22,10 +22,10 @@ public partial class DraModelProperties /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include and . /// /// , , , or is null. - public DraModelProperties(string machineId, string machineName, IdentityModel authenticationIdentity, IdentityModel resourceAccessIdentity, DraModelCustomProperties customProperties) + public DataReplicationDraProperties(string machineId, string machineName, DataReplicationIdentity authenticationIdentity, DataReplicationIdentity resourceAccessIdentity, DraModelCustomProperties customProperties) { Argument.AssertNotNull(machineId, nameof(machineId)); Argument.AssertNotNull(machineName, nameof(machineName)); @@ -37,27 +37,27 @@ public DraModelProperties(string machineId, string machineName, IdentityModel au MachineName = machineName; AuthenticationIdentity = authenticationIdentity; ResourceAccessIdentity = resourceAccessIdentity; - HealthErrors = new ChangeTrackingList(); + HealthErrors = new ChangeTrackingList(); CustomProperties = customProperties; } - /// Initializes a new instance of DraModelProperties. + /// Initializes a new instance of DataReplicationDraProperties. /// Gets or sets the Dra correlation Id. /// Gets or sets the machine Id where Dra is running. /// Gets or sets the machine name where Dra is running. /// Identity model. /// Identity model. /// Gets or sets a value indicating whether Dra is responsive. - /// Gets or sets the time when last heartbeat was sent by the Dra. + /// Gets or sets the time when last heartbeat was sent by the Dra. /// Gets or sets the Dra version. /// Gets or sets the provisioning state of the Dra. /// Gets or sets the list of health errors. /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include and . /// - internal DraModelProperties(string correlationId, string machineId, string machineName, IdentityModel authenticationIdentity, IdentityModel resourceAccessIdentity, bool? isResponsive, DateTimeOffset? lastHeartbeat, string versionNumber, ProvisioningState? provisioningState, IReadOnlyList healthErrors, DraModelCustomProperties customProperties) + internal DataReplicationDraProperties(string correlationId, string machineId, string machineName, DataReplicationIdentity authenticationIdentity, DataReplicationIdentity resourceAccessIdentity, bool? isResponsive, DateTimeOffset? lastHeartbeatOn, string versionNumber, DataReplicationProvisioningState? provisioningState, IReadOnlyList healthErrors, DraModelCustomProperties customProperties) { CorrelationId = correlationId; MachineId = machineId; @@ -65,7 +65,7 @@ internal DraModelProperties(string correlationId, string machineId, string machi AuthenticationIdentity = authenticationIdentity; ResourceAccessIdentity = resourceAccessIdentity; IsResponsive = isResponsive; - LastHeartbeat = lastHeartbeat; + LastHeartbeatOn = lastHeartbeatOn; VersionNumber = versionNumber; ProvisioningState = provisioningState; HealthErrors = healthErrors; @@ -79,23 +79,23 @@ internal DraModelProperties(string correlationId, string machineId, string machi /// Gets or sets the machine name where Dra is running. public string MachineName { get; set; } /// Identity model. - public IdentityModel AuthenticationIdentity { get; set; } + public DataReplicationIdentity AuthenticationIdentity { get; set; } /// Identity model. - public IdentityModel ResourceAccessIdentity { get; set; } + public DataReplicationIdentity ResourceAccessIdentity { get; set; } /// Gets or sets a value indicating whether Dra is responsive. public bool? IsResponsive { get; } /// Gets or sets the time when last heartbeat was sent by the Dra. - public DateTimeOffset? LastHeartbeat { get; } + public DateTimeOffset? LastHeartbeatOn { get; } /// Gets or sets the Dra version. public string VersionNumber { get; } /// Gets or sets the provisioning state of the Dra. - public ProvisioningState? ProvisioningState { get; } + public DataReplicationProvisioningState? ProvisioningState { get; } /// Gets or sets the list of health errors. - public IReadOnlyList HealthErrors { get; } + public IReadOnlyList HealthErrors { get; } /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include and . /// public DraModelCustomProperties CustomProperties { get; set; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationData.Serialization.cs similarity index 78% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationData.Serialization.cs index d72737b00dc5..ad70bd13aa22 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class EmailConfigurationModelData : IUtf8JsonSerializable + public partial class DataReplicationEmailConfigurationData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,13 +22,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static EmailConfigurationModelData DeserializeEmailConfigurationModelData(JsonElement element) + internal static DataReplicationEmailConfigurationData DeserializeDataReplicationEmailConfigurationData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - EmailConfigurationModelProperties properties = default; + DataReplicationEmailConfigurationProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -37,7 +37,7 @@ internal static EmailConfigurationModelData DeserializeEmailConfigurationModelDa { if (property.NameEquals("properties"u8)) { - properties = EmailConfigurationModelProperties.DeserializeEmailConfigurationModelProperties(property.Value); + properties = DataReplicationEmailConfigurationProperties.DeserializeDataReplicationEmailConfigurationProperties(property.Value); continue; } if (property.NameEquals("id"u8)) @@ -65,7 +65,7 @@ internal static EmailConfigurationModelData DeserializeEmailConfigurationModelDa continue; } } - return new EmailConfigurationModelData(id, name, type, systemData.Value, properties); + return new DataReplicationEmailConfigurationData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationListResult.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationListResult.Serialization.cs new file mode 100644 index 000000000000..2b3a68ad1ccf --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class DataReplicationEmailConfigurationListResult + { + internal static DataReplicationEmailConfigurationListResult DeserializeDataReplicationEmailConfigurationListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DataReplicationEmailConfigurationListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationListResult.cs similarity index 56% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationListResult.cs index 6174f7813bec..3db0df701460 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Email configuration model collection. - internal partial class EmailConfigurationModelCollection + internal partial class DataReplicationEmailConfigurationListResult { - /// Initializes a new instance of EmailConfigurationModelCollection. - internal EmailConfigurationModelCollection() + /// Initializes a new instance of DataReplicationEmailConfigurationListResult. + internal DataReplicationEmailConfigurationListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of EmailConfigurationModelCollection. + /// Initializes a new instance of DataReplicationEmailConfigurationListResult. /// Gets or sets the list of email configurations. /// Gets or sets the value of next link. - internal EmailConfigurationModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationEmailConfigurationListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of email configurations. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.Serialization.cs similarity index 86% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.Serialization.cs index 8f21fa08b29e..572a3a13a8b6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class EmailConfigurationModelProperties : IUtf8JsonSerializable + public partial class DataReplicationEmailConfigurationProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -36,7 +36,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static EmailConfigurationModelProperties DeserializeEmailConfigurationModelProperties(JsonElement element) + internal static DataReplicationEmailConfigurationProperties DeserializeDataReplicationEmailConfigurationProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -72,7 +72,7 @@ internal static EmailConfigurationModelProperties DeserializeEmailConfigurationM continue; } } - return new EmailConfigurationModelProperties(sendToOwners, Optional.ToList(customEmailAddresses), locale.Value); + return new DataReplicationEmailConfigurationProperties(sendToOwners, Optional.ToList(customEmailAddresses), locale.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.cs similarity index 75% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.cs index 2c4e856162a9..af20a35802ed 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.cs @@ -11,21 +11,21 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Email configuration model properties. - public partial class EmailConfigurationModelProperties + public partial class DataReplicationEmailConfigurationProperties { - /// Initializes a new instance of EmailConfigurationModelProperties. + /// Initializes a new instance of DataReplicationEmailConfigurationProperties. /// Gets or sets a value indicating whether to send email to subscription administrator. - public EmailConfigurationModelProperties(bool sendToOwners) + public DataReplicationEmailConfigurationProperties(bool sendToOwners) { SendToOwners = sendToOwners; CustomEmailAddresses = new ChangeTrackingList(); } - /// Initializes a new instance of EmailConfigurationModelProperties. + /// Initializes a new instance of DataReplicationEmailConfigurationProperties. /// Gets or sets a value indicating whether to send email to subscription administrator. /// Gets or sets the custom email address for sending emails. /// Gets or sets the locale for the email notification. - internal EmailConfigurationModelProperties(bool sendToOwners, IList customEmailAddresses, string locale) + internal DataReplicationEmailConfigurationProperties(bool sendToOwners, IList customEmailAddresses, string locale) { SendToOwners = sendToOwners; CustomEmailAddresses = customEmailAddresses; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.Serialization.cs similarity index 87% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.Serialization.cs index 1697ece847b8..19fc8d52cb45 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class ErrorModel + public partial class DataReplicationErrorInfo { - internal static ErrorModel DeserializeErrorModel(JsonElement element) + internal static DataReplicationErrorInfo DeserializeDataReplicationErrorInfo(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -68,7 +68,7 @@ internal static ErrorModel DeserializeErrorModel(JsonElement element) continue; } } - return new ErrorModel(code.Value, type.Value, severity.Value, Optional.ToNullable(creationTime), message.Value, causes.Value, recommendation.Value); + return new DataReplicationErrorInfo(code.Value, type.Value, severity.Value, Optional.ToNullable(creationTime), message.Value, causes.Value, recommendation.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.cs similarity index 81% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.cs index 9c5dd798caee..0fb3b99cc071 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ErrorModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.cs @@ -10,14 +10,14 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Error model. - public partial class ErrorModel + public partial class DataReplicationErrorInfo { - /// Initializes a new instance of ErrorModel. - internal ErrorModel() + /// Initializes a new instance of DataReplicationErrorInfo. + internal DataReplicationErrorInfo() { } - /// Initializes a new instance of ErrorModel. + /// Initializes a new instance of DataReplicationErrorInfo. /// Gets or sets the error code. /// Gets or sets the error type. /// Gets or sets the error severity. @@ -25,7 +25,7 @@ internal ErrorModel() /// Gets or sets the error message. /// Gets or sets the possible causes of error. /// Gets or sets the recommended action to resolve error. - internal ErrorModel(string code, string errorModelType, string severity, DateTimeOffset? createdOn, string message, string causes, string recommendation) + internal DataReplicationErrorInfo(string code, string errorModelType, string severity, DateTimeOffset? createdOn, string message, string causes, string recommendation) { Code = code; ErrorModelType = errorModelType; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventData.Serialization.cs similarity index 80% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventData.Serialization.cs index e4882452e6d1..64bf7c75efd8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventData.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class RecoveryPointModelData + public partial class DataReplicationEventData { - internal static RecoveryPointModelData DeserializeRecoveryPointModelData(JsonElement element) + internal static DataReplicationEventData DeserializeDataReplicationEventData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - RecoveryPointModelProperties properties = default; + DataReplicationEventProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -29,7 +29,7 @@ internal static RecoveryPointModelData DeserializeRecoveryPointModelData(JsonEle { if (property.NameEquals("properties"u8)) { - properties = RecoveryPointModelProperties.DeserializeRecoveryPointModelProperties(property.Value); + properties = DataReplicationEventProperties.DeserializeDataReplicationEventProperties(property.Value); continue; } if (property.NameEquals("id"u8)) @@ -57,7 +57,7 @@ internal static RecoveryPointModelData DeserializeRecoveryPointModelData(JsonEle continue; } } - return new RecoveryPointModelData(id, name, type, systemData.Value, properties); + return new DataReplicationEventData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventListResult.Serialization.cs similarity index 69% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventListResult.Serialization.cs index f6dbef021ee8..568ea8fcb8b8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - internal partial class PolicyModelCollection + internal partial class DataReplicationEventListResult { - internal static PolicyModelCollection DeserializePolicyModelCollection(JsonElement element) + internal static DataReplicationEventListResult DeserializeDataReplicationEventListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static PolicyModelCollection DeserializePolicyModelCollection(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(PolicyModelData.DeserializePolicyModelData(item)); + array.Add(DataReplicationEventData.DeserializeDataReplicationEventData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static PolicyModelCollection DeserializePolicyModelCollection(JsonEleme continue; } } - return new PolicyModelCollection(Optional.ToList(value), nextLink.Value); + return new DataReplicationEventListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventListResult.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventListResult.cs index cb1bcb6f4b4f..d91050efb131 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Event model collection. - internal partial class EventModelCollection + internal partial class DataReplicationEventListResult { - /// Initializes a new instance of EventModelCollection. - internal EventModelCollection() + /// Initializes a new instance of DataReplicationEventListResult. + internal DataReplicationEventListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of EventModelCollection. + /// Initializes a new instance of DataReplicationEventListResult. /// Gets or sets the list of events. /// Gets or sets the value of next link. - internal EventModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationEventListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of events. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.Serialization.cs similarity index 75% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.Serialization.cs index e35372ceaae8..fea428828c19 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class EventModelProperties + public partial class DataReplicationEventProperties { - internal static EventModelProperties DeserializeEventModelProperties(JsonElement element) + internal static DataReplicationEventProperties DeserializeDataReplicationEventProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional resourceType = default; + Optional resourceType = default; Optional resourceName = default; Optional eventType = default; Optional eventName = default; @@ -28,13 +28,17 @@ internal static EventModelProperties DeserializeEventModelProperties(JsonElement Optional severity = default; Optional description = default; Optional correlationId = default; - Optional> healthErrors = default; + Optional> healthErrors = default; EventModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("resourceType"u8)) { - resourceType = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("resourceName"u8)) @@ -82,10 +86,10 @@ internal static EventModelProperties DeserializeEventModelProperties(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item)); } healthErrors = array; continue; @@ -96,7 +100,7 @@ internal static EventModelProperties DeserializeEventModelProperties(JsonElement continue; } } - return new EventModelProperties(resourceType.Value, resourceName.Value, eventType.Value, eventName.Value, Optional.ToNullable(timeOfOccurrence), severity.Value, description.Value, correlationId.Value, Optional.ToList(healthErrors), customProperties); + return new DataReplicationEventProperties(Optional.ToNullable(resourceType), resourceName.Value, eventType.Value, eventName.Value, Optional.ToNullable(timeOfOccurrence), severity.Value, description.Value, correlationId.Value, Optional.ToList(healthErrors), customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.cs similarity index 76% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.cs index 7c7789cc8864..485c7347e58b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.cs @@ -12,29 +12,29 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Event model properties. - public partial class EventModelProperties + public partial class DataReplicationEventProperties { - /// Initializes a new instance of EventModelProperties. + /// Initializes a new instance of DataReplicationEventProperties. /// /// Event model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// /// is null. - internal EventModelProperties(EventModelCustomProperties customProperties) + internal DataReplicationEventProperties(EventModelCustomProperties customProperties) { Argument.AssertNotNull(customProperties, nameof(customProperties)); - HealthErrors = new ChangeTrackingList(); + HealthErrors = new ChangeTrackingList(); CustomProperties = customProperties; } - /// Initializes a new instance of EventModelProperties. + /// Initializes a new instance of DataReplicationEventProperties. /// Gets or sets the resource type. /// Gets or sets the resource name. /// Gets or sets the event type. /// Gets or sets the event name. - /// Gets or sets the time at which the event occurred at source. + /// Gets or sets the time at which the event occurred at source. /// Gets or sets the event severity. /// Gets or sets the event description. /// Gets or sets the event correlation Id. @@ -42,15 +42,15 @@ internal EventModelProperties(EventModelCustomProperties customProperties) /// /// Event model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// - internal EventModelProperties(string resourceType, string resourceName, string eventType, string eventName, DateTimeOffset? timeOfOccurrence, string severity, string description, string correlationId, IReadOnlyList healthErrors, EventModelCustomProperties customProperties) + internal DataReplicationEventProperties(ResourceType? resourceType, string resourceName, string eventType, string eventName, DateTimeOffset? occurredOn, string severity, string description, string correlationId, IReadOnlyList healthErrors, EventModelCustomProperties customProperties) { ResourceType = resourceType; ResourceName = resourceName; EventType = eventType; EventName = eventName; - TimeOfOccurrence = timeOfOccurrence; + OccurredOn = occurredOn; Severity = severity; Description = description; CorrelationId = correlationId; @@ -59,7 +59,7 @@ internal EventModelProperties(string resourceType, string resourceName, string e } /// Gets or sets the resource type. - public string ResourceType { get; } + public ResourceType? ResourceType { get; } /// Gets or sets the resource name. public string ResourceName { get; } /// Gets or sets the event type. @@ -67,7 +67,7 @@ internal EventModelProperties(string resourceType, string resourceName, string e /// Gets or sets the event name. public string EventName { get; } /// Gets or sets the time at which the event occurred at source. - public DateTimeOffset? TimeOfOccurrence { get; } + public DateTimeOffset? OccurredOn { get; } /// Gets or sets the event severity. public string Severity { get; } /// Gets or sets the event description. @@ -75,11 +75,11 @@ internal EventModelProperties(string resourceType, string resourceName, string e /// Gets or sets the event correlation Id. public string CorrelationId { get; } /// Gets or sets the errors associated with this event. - public IReadOnlyList HealthErrors { get; } + public IReadOnlyList HealthErrors { get; } /// /// Event model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// public EventModelCustomProperties CustomProperties { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricData.Serialization.cs similarity index 87% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricData.Serialization.cs index bccfd2171e4c..652ace3a42b6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class FabricModelData : IUtf8JsonSerializable + public partial class DataReplicationFabricData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -36,13 +36,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FabricModelData DeserializeFabricModelData(JsonElement element) + internal static DataReplicationFabricData DeserializeDataReplicationFabricData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - FabricModelProperties properties = default; + DataReplicationFabricProperties properties = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -53,7 +53,7 @@ internal static FabricModelData DeserializeFabricModelData(JsonElement element) { if (property.NameEquals("properties"u8)) { - properties = FabricModelProperties.DeserializeFabricModelProperties(property.Value); + properties = DataReplicationFabricProperties.DeserializeDataReplicationFabricProperties(property.Value); continue; } if (property.NameEquals("tags"u8)) @@ -100,7 +100,7 @@ internal static FabricModelData DeserializeFabricModelData(JsonElement element) continue; } } - return new FabricModelData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties); + return new DataReplicationFabricData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricListResult.Serialization.cs similarity index 68% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricListResult.Serialization.cs index 8df70cc77914..e3181820401b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCollection.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - internal partial class EventModelCollection + internal partial class DataReplicationFabricListResult { - internal static EventModelCollection DeserializeEventModelCollection(JsonElement element) + internal static DataReplicationFabricListResult DeserializeDataReplicationFabricListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static EventModelCollection DeserializeEventModelCollection(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(EventModelData.DeserializeEventModelData(item)); + array.Add(DataReplicationFabricData.DeserializeDataReplicationFabricData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static EventModelCollection DeserializeEventModelCollection(JsonElement continue; } } - return new EventModelCollection(Optional.ToList(value), nextLink.Value); + return new DataReplicationFabricListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricListResult.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricListResult.cs index 2562fb649a4b..c33c5ed1ca8d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Fabric model collection. - internal partial class FabricModelCollection + internal partial class DataReplicationFabricListResult { - /// Initializes a new instance of FabricModelCollection. - internal FabricModelCollection() + /// Initializes a new instance of DataReplicationFabricListResult. + internal DataReplicationFabricListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of FabricModelCollection. + /// Initializes a new instance of DataReplicationFabricListResult. /// Gets or sets the list of fabrics. /// Gets or sets the value of next link. - internal FabricModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationFabricListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of fabrics. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.Serialization.cs similarity index 93% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.Serialization.cs index ffc65e03237d..125103b95f01 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class FabricModelPatch : IUtf8JsonSerializable + public partial class DataReplicationFabricPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.cs similarity index 69% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.cs index e6d4ced4e58d..8099d15fcde9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelPatch.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.cs @@ -12,10 +12,10 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Fabric model for update. - public partial class FabricModelPatch : ResourceData + public partial class DataReplicationFabricPatch : ResourceData { - /// Initializes a new instance of FabricModelPatch. - public FabricModelPatch() + /// Initializes a new instance of DataReplicationFabricPatch. + public DataReplicationFabricPatch() { Tags = new ChangeTrackingDictionary(); } @@ -23,6 +23,6 @@ public FabricModelPatch() /// Gets or sets the resource tags. public IDictionary Tags { get; } /// Fabric model properties. - public FabricModelProperties Properties { get; set; } + public DataReplicationFabricProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.Serialization.cs similarity index 64% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.Serialization.cs index 92522e27e10a..c0c83ce243e2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class FabricModelProperties : IUtf8JsonSerializable + public partial class DataReplicationFabricProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -21,17 +21,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static FabricModelProperties DeserializeFabricModelProperties(JsonElement element) + internal static DataReplicationFabricProperties DeserializeDataReplicationFabricProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional provisioningState = default; + Optional provisioningState = default; Optional serviceEndpoint = default; - Optional serviceResourceId = default; - Optional health = default; - Optional> healthErrors = default; + Optional serviceResourceId = default; + Optional health = default; + Optional> healthErrors = default; FabricModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { @@ -41,7 +41,7 @@ internal static FabricModelProperties DeserializeFabricModelProperties(JsonEleme { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("serviceEndpoint"u8)) @@ -51,7 +51,11 @@ internal static FabricModelProperties DeserializeFabricModelProperties(JsonEleme } if (property.NameEquals("serviceResourceId"u8)) { - serviceResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("health"u8)) @@ -60,7 +64,7 @@ internal static FabricModelProperties DeserializeFabricModelProperties(JsonEleme { continue; } - health = new HealthStatus(property.Value.GetString()); + health = new DataReplicationHealthStatus(property.Value.GetString()); continue; } if (property.NameEquals("healthErrors"u8)) @@ -69,10 +73,10 @@ internal static FabricModelProperties DeserializeFabricModelProperties(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item)); } healthErrors = array; continue; @@ -83,7 +87,7 @@ internal static FabricModelProperties DeserializeFabricModelProperties(JsonEleme continue; } } - return new FabricModelProperties(Optional.ToNullable(provisioningState), serviceEndpoint.Value, serviceResourceId.Value, Optional.ToNullable(health), Optional.ToList(healthErrors), customProperties); + return new DataReplicationFabricProperties(Optional.ToNullable(provisioningState), serviceEndpoint.Value, serviceResourceId.Value, Optional.ToNullable(health), Optional.ToList(healthErrors), customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.cs similarity index 65% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.cs index 4b1a91043b1f..16be443cccd4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.cs @@ -12,24 +12,24 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Fabric model properties. - public partial class FabricModelProperties + public partial class DataReplicationFabricProperties { - /// Initializes a new instance of FabricModelProperties. + /// Initializes a new instance of DataReplicationFabricProperties. /// /// Fabric model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// /// is null. - public FabricModelProperties(FabricModelCustomProperties customProperties) + public DataReplicationFabricProperties(FabricModelCustomProperties customProperties) { Argument.AssertNotNull(customProperties, nameof(customProperties)); - HealthErrors = new ChangeTrackingList(); + HealthErrors = new ChangeTrackingList(); CustomProperties = customProperties; } - /// Initializes a new instance of FabricModelProperties. + /// Initializes a new instance of DataReplicationFabricProperties. /// Gets or sets the provisioning state of the fabric. /// Gets or sets the service endpoint. /// Gets or sets the service resource Id. @@ -38,9 +38,9 @@ public FabricModelProperties(FabricModelCustomProperties customProperties) /// /// Fabric model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// - internal FabricModelProperties(ProvisioningState? provisioningState, string serviceEndpoint, string serviceResourceId, HealthStatus? health, IReadOnlyList healthErrors, FabricModelCustomProperties customProperties) + internal DataReplicationFabricProperties(DataReplicationProvisioningState? provisioningState, string serviceEndpoint, ResourceIdentifier serviceResourceId, DataReplicationHealthStatus? health, IReadOnlyList healthErrors, FabricModelCustomProperties customProperties) { ProvisioningState = provisioningState; ServiceEndpoint = serviceEndpoint; @@ -51,19 +51,19 @@ internal FabricModelProperties(ProvisioningState? provisioningState, string serv } /// Gets or sets the provisioning state of the fabric. - public ProvisioningState? ProvisioningState { get; } + public DataReplicationProvisioningState? ProvisioningState { get; } /// Gets or sets the service endpoint. public string ServiceEndpoint { get; } /// Gets or sets the service resource Id. - public string ServiceResourceId { get; } + public ResourceIdentifier ServiceResourceId { get; } /// Gets or sets the fabric health. - public HealthStatus? Health { get; } + public DataReplicationHealthStatus? Health { get; } /// Gets or sets the list of health errors. - public IReadOnlyList HealthErrors { get; } + public IReadOnlyList HealthErrors { get; } /// /// Fabric model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// public FabricModelCustomProperties CustomProperties { get; set; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.Serialization.cs similarity index 84% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.Serialization.cs index 87be337d0408..b5fd235f4999 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.Serialization.cs @@ -12,9 +12,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HealthErrorModel + public partial class DataReplicationHealthErrorInfo { - internal static HealthErrorModel DeserializeHealthErrorModel(JsonElement element) + internal static DataReplicationHealthErrorInfo DeserializeDataReplicationHealthErrorInfo(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -22,7 +22,7 @@ internal static HealthErrorModel DeserializeHealthErrorModel(JsonElement element } Optional affectedResourceType = default; Optional> affectedResourceCorrelationIds = default; - Optional> childErrors = default; + Optional> childErrors = default; Optional code = default; Optional healthCategory = default; Optional category = default; @@ -61,10 +61,10 @@ internal static HealthErrorModel DeserializeHealthErrorModel(JsonElement element { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(InnerHealthErrorModel.DeserializeInnerHealthErrorModel(item)); + array.Add(DataReplicationInnerHealthErrorInfo.DeserializeDataReplicationInnerHealthErrorInfo(item)); } childErrors = array; continue; @@ -133,7 +133,7 @@ internal static HealthErrorModel DeserializeHealthErrorModel(JsonElement element continue; } } - return new HealthErrorModel(affectedResourceType.Value, Optional.ToList(affectedResourceCorrelationIds), Optional.ToList(childErrors), code.Value, healthCategory.Value, category.Value, severity.Value, source.Value, Optional.ToNullable(creationTime), Optional.ToNullable(isCustomerResolvable), summary.Value, message.Value, causes.Value, recommendation.Value); + return new DataReplicationHealthErrorInfo(affectedResourceType.Value, Optional.ToList(affectedResourceCorrelationIds), Optional.ToList(childErrors), code.Value, healthCategory.Value, category.Value, severity.Value, source.Value, Optional.ToNullable(creationTime), Optional.ToNullable(isCustomerResolvable), summary.Value, message.Value, causes.Value, recommendation.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.cs similarity index 83% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.cs index a5e1a25e9a37..e055252c25d0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthErrorModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.cs @@ -12,16 +12,16 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Health error model. - public partial class HealthErrorModel + public partial class DataReplicationHealthErrorInfo { - /// Initializes a new instance of HealthErrorModel. - internal HealthErrorModel() + /// Initializes a new instance of DataReplicationHealthErrorInfo. + internal DataReplicationHealthErrorInfo() { AffectedResourceCorrelationIds = new ChangeTrackingList(); - ChildErrors = new ChangeTrackingList(); + ChildErrors = new ChangeTrackingList(); } - /// Initializes a new instance of HealthErrorModel. + /// Initializes a new instance of DataReplicationHealthErrorInfo. /// Gets or sets the type of affected resource type. /// /// Gets or sets the list of affected resource correlation Ids. This can be used to @@ -40,7 +40,7 @@ internal HealthErrorModel() /// Gets or sets the error message. /// Gets or sets possible causes of the error. /// Gets or sets recommended action to resolve the error. - internal HealthErrorModel(string affectedResourceType, IReadOnlyList affectedResourceCorrelationIds, IReadOnlyList childErrors, string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation) + internal DataReplicationHealthErrorInfo(string affectedResourceType, IReadOnlyList affectedResourceCorrelationIds, IReadOnlyList childErrors, string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation) { AffectedResourceType = affectedResourceType; AffectedResourceCorrelationIds = affectedResourceCorrelationIds; @@ -67,7 +67,7 @@ internal HealthErrorModel(string affectedResourceType, IReadOnlyList aff /// public IReadOnlyList AffectedResourceCorrelationIds { get; } /// Gets or sets a list of child health errors associated with this error. - public IReadOnlyList ChildErrors { get; } + public IReadOnlyList ChildErrors { get; } /// Gets or sets the error code. public string Code { get; } /// Gets or sets the health category. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthStatus.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthStatus.cs new file mode 100644 index 000000000000..2049a1874627 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthStatus.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the fabric health. + public readonly partial struct DataReplicationHealthStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationHealthStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NormalValue = "Normal"; + private const string WarningValue = "Warning"; + private const string CriticalValue = "Critical"; + + /// Normal. + public static DataReplicationHealthStatus Normal { get; } = new DataReplicationHealthStatus(NormalValue); + /// Warning. + public static DataReplicationHealthStatus Warning { get; } = new DataReplicationHealthStatus(WarningValue); + /// Critical. + public static DataReplicationHealthStatus Critical { get; } = new DataReplicationHealthStatus(CriticalValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationHealthStatus left, DataReplicationHealthStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationHealthStatus left, DataReplicationHealthStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationHealthStatus(string value) => new DataReplicationHealthStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationHealthStatus other && Equals(other); + /// + public bool Equals(DataReplicationHealthStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.Serialization.cs similarity index 89% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.Serialization.cs index 33db45029454..34bc34af4cb9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class IdentityModel : IUtf8JsonSerializable + public partial class DataReplicationIdentity : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -29,7 +29,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static IdentityModel DeserializeIdentityModel(JsonElement element) + internal static DataReplicationIdentity DeserializeDataReplicationIdentity(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -68,7 +68,7 @@ internal static IdentityModel DeserializeIdentityModel(JsonElement element) continue; } } - return new IdentityModel(tenantId, applicationId, objectId, audience, aadAuthority); + return new DataReplicationIdentity(tenantId, applicationId, objectId, audience, aadAuthority); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.cs similarity index 90% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.cs index 05238397442e..1b8f1fefd831 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/IdentityModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Identity model. - public partial class IdentityModel + public partial class DataReplicationIdentity { - /// Initializes a new instance of IdentityModel. + /// Initializes a new instance of DataReplicationIdentity. /// Gets or sets the tenant Id of the SPN with which Dra communicates to service. /// /// Gets or sets the client/application Id of the SPN with which Dra communicates to @@ -23,7 +23,7 @@ public partial class IdentityModel /// Gets or sets the audience of the SPN with which Dra communicates to service. /// Gets or sets the authority of the SPN with which Dra communicates to service. /// , , or is null. - public IdentityModel(Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) + public DataReplicationIdentity(Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) { Argument.AssertNotNull(applicationId, nameof(applicationId)); Argument.AssertNotNull(objectId, nameof(objectId)); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.Serialization.cs similarity index 87% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.Serialization.cs index 9137f827ca44..48b8176ff59e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class InnerHealthErrorModel + public partial class DataReplicationInnerHealthErrorInfo { - internal static InnerHealthErrorModel DeserializeInnerHealthErrorModel(JsonElement element) + internal static DataReplicationInnerHealthErrorInfo DeserializeDataReplicationInnerHealthErrorInfo(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -96,7 +96,7 @@ internal static InnerHealthErrorModel DeserializeInnerHealthErrorModel(JsonEleme continue; } } - return new InnerHealthErrorModel(code.Value, healthCategory.Value, category.Value, severity.Value, source.Value, Optional.ToNullable(creationTime), Optional.ToNullable(isCustomerResolvable), summary.Value, message.Value, causes.Value, recommendation.Value); + return new DataReplicationInnerHealthErrorInfo(code.Value, healthCategory.Value, category.Value, severity.Value, source.Value, Optional.ToNullable(creationTime), Optional.ToNullable(isCustomerResolvable), summary.Value, message.Value, causes.Value, recommendation.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.cs similarity index 83% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.cs index 7a844ab3db35..fddaa303b43b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/InnerHealthErrorModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.cs @@ -10,14 +10,14 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Inner health error model. - public partial class InnerHealthErrorModel + public partial class DataReplicationInnerHealthErrorInfo { - /// Initializes a new instance of InnerHealthErrorModel. - internal InnerHealthErrorModel() + /// Initializes a new instance of DataReplicationInnerHealthErrorInfo. + internal DataReplicationInnerHealthErrorInfo() { } - /// Initializes a new instance of InnerHealthErrorModel. + /// Initializes a new instance of DataReplicationInnerHealthErrorInfo. /// Gets or sets the error code. /// Gets or sets the health category. /// Gets or sets the error category. @@ -29,7 +29,7 @@ internal InnerHealthErrorModel() /// Gets or sets the error message. /// Gets or sets possible causes of the error. /// Gets or sets recommended action to resolve the error. - internal InnerHealthErrorModel(string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation) + internal DataReplicationInnerHealthErrorInfo(string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation) { Code = code; HealthCategory = healthCategory; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.Serialization.cs similarity index 82% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.Serialization.cs index 44031190b0a6..be9a3c5ded2e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class CheckNameAvailabilityModel : IUtf8JsonSerializable + public partial class DataReplicationNameAvailabilityContent : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -23,7 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(ResourceType)) { writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); + writer.WriteStringValue(ResourceType.Value); } writer.WriteEndObject(); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.cs similarity index 61% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.cs index bebc2a7431af..37cf181763f4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.cs @@ -5,19 +5,21 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Check name availability model. - public partial class CheckNameAvailabilityModel + public partial class DataReplicationNameAvailabilityContent { - /// Initializes a new instance of CheckNameAvailabilityModel. - public CheckNameAvailabilityModel() + /// Initializes a new instance of DataReplicationNameAvailabilityContent. + public DataReplicationNameAvailabilityContent() { } /// Gets or sets the resource name. public string Name { get; set; } /// Gets or sets the resource type. - public string ResourceType { get; set; } + public ResourceType? ResourceType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.Serialization.cs similarity index 80% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.Serialization.cs index c9f78c87e3a2..b598fa4908a2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class CheckNameAvailabilityResponseModel + public partial class DataReplicationNameAvailabilityResult { - internal static CheckNameAvailabilityResponseModel DeserializeCheckNameAvailabilityResponseModel(JsonElement element) + internal static DataReplicationNameAvailabilityResult DeserializeDataReplicationNameAvailabilityResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -43,7 +43,7 @@ internal static CheckNameAvailabilityResponseModel DeserializeCheckNameAvailabil continue; } } - return new CheckNameAvailabilityResponseModel(Optional.ToNullable(nameAvailable), reason.Value, message.Value); + return new DataReplicationNameAvailabilityResult(Optional.ToNullable(nameAvailable), reason.Value, message.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.cs index 88be6c51b3b3..90f45add4769 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/CheckNameAvailabilityResponseModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.cs @@ -8,26 +8,26 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Check name availability response model. - public partial class CheckNameAvailabilityResponseModel + public partial class DataReplicationNameAvailabilityResult { - /// Initializes a new instance of CheckNameAvailabilityResponseModel. - internal CheckNameAvailabilityResponseModel() + /// Initializes a new instance of DataReplicationNameAvailabilityResult. + internal DataReplicationNameAvailabilityResult() { } - /// Initializes a new instance of CheckNameAvailabilityResponseModel. - /// Gets or sets a value indicating whether resource name is available or not. + /// Initializes a new instance of DataReplicationNameAvailabilityResult. + /// Gets or sets a value indicating whether resource name is available or not. /// Gets or sets the reason for resource name unavailability. /// Gets or sets the message for resource name unavailability. - internal CheckNameAvailabilityResponseModel(bool? nameAvailable, string reason, string message) + internal DataReplicationNameAvailabilityResult(bool? isNameAvailable, string reason, string message) { - NameAvailable = nameAvailable; + IsNameAvailable = isNameAvailable; Reason = reason; Message = message; } /// Gets or sets a value indicating whether resource name is available or not. - public bool? NameAvailable { get; } + public bool? IsNameAvailable { get; } /// Gets or sets the reason for resource name unavailability. public string Reason { get; } /// Gets or sets the message for resource name unavailability. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyData.Serialization.cs similarity index 81% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyData.Serialization.cs index 650cd0072f30..8b3d11ba867a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class PolicyModelData : IUtf8JsonSerializable + public partial class DataReplicationPolicyData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,13 +22,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static PolicyModelData DeserializePolicyModelData(JsonElement element) + internal static DataReplicationPolicyData DeserializeDataReplicationPolicyData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - PolicyModelProperties properties = default; + DataReplicationPolicyProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -37,7 +37,7 @@ internal static PolicyModelData DeserializePolicyModelData(JsonElement element) { if (property.NameEquals("properties"u8)) { - properties = PolicyModelProperties.DeserializePolicyModelProperties(property.Value); + properties = DataReplicationPolicyProperties.DeserializeDataReplicationPolicyProperties(property.Value); continue; } if (property.NameEquals("id"u8)) @@ -65,7 +65,7 @@ internal static PolicyModelData DeserializePolicyModelData(JsonElement element) continue; } } - return new PolicyModelData(id, name, type, systemData.Value, properties); + return new DataReplicationPolicyData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyListResult.Serialization.cs similarity index 68% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyListResult.Serialization.cs index 41ee63b2859e..434e68d8f6db 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCollection.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - internal partial class DraModelCollection + internal partial class DataReplicationPolicyListResult { - internal static DraModelCollection DeserializeDraModelCollection(JsonElement element) + internal static DataReplicationPolicyListResult DeserializeDataReplicationPolicyListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static DraModelCollection DeserializeDraModelCollection(JsonElement ele { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DraModelData.DeserializeDraModelData(item)); + array.Add(DataReplicationPolicyData.DeserializeDataReplicationPolicyData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static DraModelCollection DeserializeDraModelCollection(JsonElement ele continue; } } - return new DraModelCollection(Optional.ToList(value), nextLink.Value); + return new DataReplicationPolicyListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyListResult.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyListResult.cs index f9ef9bf92bfb..26d44f068bcd 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Policy model collection. - internal partial class PolicyModelCollection + internal partial class DataReplicationPolicyListResult { - /// Initializes a new instance of PolicyModelCollection. - internal PolicyModelCollection() + /// Initializes a new instance of DataReplicationPolicyListResult. + internal DataReplicationPolicyListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of PolicyModelCollection. + /// Initializes a new instance of DataReplicationPolicyListResult. /// Gets or sets the list of policies. /// Gets or sets the value of next link. - internal PolicyModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationPolicyListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of policies. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.Serialization.cs similarity index 73% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.Serialization.cs index e75475da4e04..32e9c40c3cd2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class PolicyModelProperties : IUtf8JsonSerializable + public partial class DataReplicationPolicyProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,13 +20,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static PolicyModelProperties DeserializePolicyModelProperties(JsonElement element) + internal static DataReplicationPolicyProperties DeserializeDataReplicationPolicyProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional provisioningState = default; + Optional provisioningState = default; PolicyModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { @@ -36,7 +36,7 @@ internal static PolicyModelProperties DeserializePolicyModelProperties(JsonEleme { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("customProperties"u8)) @@ -45,7 +45,7 @@ internal static PolicyModelProperties DeserializePolicyModelProperties(JsonEleme continue; } } - return new PolicyModelProperties(Optional.ToNullable(provisioningState), customProperties); + return new DataReplicationPolicyProperties(Optional.ToNullable(provisioningState), customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.cs similarity index 67% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.cs index 733acd603037..9fac73a3dcfe 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.cs @@ -11,41 +11,41 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Policy model properties. - public partial class PolicyModelProperties + public partial class DataReplicationPolicyProperties { - /// Initializes a new instance of PolicyModelProperties. + /// Initializes a new instance of DataReplicationPolicyProperties. /// /// Policy model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// is null. - public PolicyModelProperties(PolicyModelCustomProperties customProperties) + public DataReplicationPolicyProperties(PolicyModelCustomProperties customProperties) { Argument.AssertNotNull(customProperties, nameof(customProperties)); CustomProperties = customProperties; } - /// Initializes a new instance of PolicyModelProperties. + /// Initializes a new instance of DataReplicationPolicyProperties. /// Gets or sets the provisioning state of the policy. /// /// Policy model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// - internal PolicyModelProperties(ProvisioningState? provisioningState, PolicyModelCustomProperties customProperties) + internal DataReplicationPolicyProperties(DataReplicationProvisioningState? provisioningState, PolicyModelCustomProperties customProperties) { ProvisioningState = provisioningState; CustomProperties = customProperties; } /// Gets or sets the provisioning state of the policy. - public ProvisioningState? ProvisioningState { get; } + public DataReplicationProvisioningState? ProvisioningState { get; } /// /// Policy model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public PolicyModelCustomProperties CustomProperties { get; set; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemData.Serialization.cs similarity index 80% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemData.Serialization.cs index b63b2479e43b..11efe660aea6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemData.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class DraModelData : IUtf8JsonSerializable + public partial class DataReplicationProtectedItemData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,13 +22,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DraModelData DeserializeDraModelData(JsonElement element) + internal static DataReplicationProtectedItemData DeserializeDataReplicationProtectedItemData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - DraModelProperties properties = default; + DataReplicationProtectedItemProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -37,7 +37,7 @@ internal static DraModelData DeserializeDraModelData(JsonElement element) { if (property.NameEquals("properties"u8)) { - properties = DraModelProperties.DeserializeDraModelProperties(property.Value); + properties = DataReplicationProtectedItemProperties.DeserializeDataReplicationProtectedItemProperties(property.Value); continue; } if (property.NameEquals("id"u8)) @@ -65,7 +65,7 @@ internal static DraModelData DeserializeDraModelData(JsonElement element) continue; } } - return new DraModelData(id, name, type, systemData.Value, properties); + return new DataReplicationProtectedItemData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemListResult.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemListResult.Serialization.cs new file mode 100644 index 000000000000..629048c3229a --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class DataReplicationProtectedItemListResult + { + internal static DataReplicationProtectedItemListResult DeserializeDataReplicationProtectedItemListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DataReplicationProtectedItemListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemListResult.cs similarity index 58% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemListResult.cs index ef78bcd11847..ee9d886acd02 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Protected item model collection. - internal partial class ProtectedItemModelCollection + internal partial class DataReplicationProtectedItemListResult { - /// Initializes a new instance of ProtectedItemModelCollection. - internal ProtectedItemModelCollection() + /// Initializes a new instance of DataReplicationProtectedItemListResult. + internal DataReplicationProtectedItemListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of ProtectedItemModelCollection. + /// Initializes a new instance of DataReplicationProtectedItemListResult. /// Gets or sets the list of protected items. /// Gets or sets the value of next link. - internal ProtectedItemModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationProtectedItemListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of protected items. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.Serialization.cs similarity index 76% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.Serialization.cs index 4eaf35260988..b0a4ecd3e84b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class ProtectedItemModelProperties : IUtf8JsonSerializable + public partial class DataReplicationProtectedItemProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,7 +26,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ProtectedItemModelProperties DeserializeProtectedItemModelProperties(JsonElement element) + internal static DataReplicationProtectedItemProperties DeserializeDataReplicationProtectedItemProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -35,12 +35,12 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper string policyName = default; string replicationExtensionName = default; Optional correlationId = default; - Optional provisioningState = default; - Optional protectionState = default; + Optional provisioningState = default; + Optional protectionState = default; Optional protectionStateDescription = default; - Optional testFailoverState = default; + Optional testFailoverState = default; Optional testFailoverStateDescription = default; - Optional resynchronizationState = default; + Optional resynchronizationState = default; Optional fabricObjectId = default; Optional fabricObjectName = default; Optional sourceFabricProviderId = default; @@ -53,13 +53,13 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper Optional lastSuccessfulPlannedFailoverTime = default; Optional lastSuccessfulUnplannedFailoverTime = default; Optional lastSuccessfulTestFailoverTime = default; - Optional currentJob = default; + Optional currentJob = default; Optional> allowedJobs = default; - Optional lastFailedEnableProtectionJob = default; - Optional lastFailedPlannedFailoverJob = default; - Optional lastTestFailoverJob = default; - Optional replicationHealth = default; - Optional> healthErrors = default; + Optional lastFailedEnableProtectionJob = default; + Optional lastFailedPlannedFailoverJob = default; + Optional lastTestFailoverJob = default; + Optional replicationHealth = default; + Optional> healthErrors = default; ProtectedItemModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { @@ -84,7 +84,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("protectionState"u8)) @@ -93,7 +93,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - protectionState = new ProtectionState(property.Value.GetString()); + protectionState = new DataReplicationProtectionState(property.Value.GetString()); continue; } if (property.NameEquals("protectionStateDescription"u8)) @@ -107,7 +107,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - testFailoverState = new TestFailoverState(property.Value.GetString()); + testFailoverState = new DataReplicationTestFailoverState(property.Value.GetString()); continue; } if (property.NameEquals("testFailoverStateDescription"u8)) @@ -121,7 +121,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - resynchronizationState = new ResynchronizationState(property.Value.GetString()); + resynchronizationState = new DataReplicationResynchronizationState(property.Value.GetString()); continue; } if (property.NameEquals("fabricObjectId"u8)) @@ -206,7 +206,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - currentJob = ProtectedItemModelPropertiesCurrentJob.DeserializeProtectedItemModelPropertiesCurrentJob(property.Value); + currentJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value); continue; } if (property.NameEquals("allowedJobs"u8)) @@ -229,7 +229,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - lastFailedEnableProtectionJob = ProtectedItemModelPropertiesLastFailedEnableProtectionJob.DeserializeProtectedItemModelPropertiesLastFailedEnableProtectionJob(property.Value); + lastFailedEnableProtectionJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value); continue; } if (property.NameEquals("lastFailedPlannedFailoverJob"u8)) @@ -238,7 +238,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - lastFailedPlannedFailoverJob = ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.DeserializeProtectedItemModelPropertiesLastFailedPlannedFailoverJob(property.Value); + lastFailedPlannedFailoverJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value); continue; } if (property.NameEquals("lastTestFailoverJob"u8)) @@ -247,7 +247,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - lastTestFailoverJob = ProtectedItemModelPropertiesLastTestFailoverJob.DeserializeProtectedItemModelPropertiesLastTestFailoverJob(property.Value); + lastTestFailoverJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value); continue; } if (property.NameEquals("replicationHealth"u8)) @@ -256,7 +256,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - replicationHealth = new HealthStatus(property.Value.GetString()); + replicationHealth = new DataReplicationHealthStatus(property.Value.GetString()); continue; } if (property.NameEquals("healthErrors"u8)) @@ -265,10 +265,10 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HealthErrorModel.DeserializeHealthErrorModel(item)); + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item)); } healthErrors = array; continue; @@ -279,7 +279,7 @@ internal static ProtectedItemModelProperties DeserializeProtectedItemModelProper continue; } } - return new ProtectedItemModelProperties(policyName, replicationExtensionName, correlationId.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(protectionState), protectionStateDescription.Value, Optional.ToNullable(testFailoverState), testFailoverStateDescription.Value, Optional.ToNullable(resynchronizationState), fabricObjectId.Value, fabricObjectName.Value, sourceFabricProviderId.Value, targetFabricProviderId.Value, fabricId.Value, targetFabricId.Value, draId.Value, targetDraId.Value, Optional.ToNullable(resyncRequired), Optional.ToNullable(lastSuccessfulPlannedFailoverTime), Optional.ToNullable(lastSuccessfulUnplannedFailoverTime), Optional.ToNullable(lastSuccessfulTestFailoverTime), currentJob.Value, Optional.ToList(allowedJobs), lastFailedEnableProtectionJob.Value, lastFailedPlannedFailoverJob.Value, lastTestFailoverJob.Value, Optional.ToNullable(replicationHealth), Optional.ToList(healthErrors), customProperties); + return new DataReplicationProtectedItemProperties(policyName, replicationExtensionName, correlationId.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(protectionState), protectionStateDescription.Value, Optional.ToNullable(testFailoverState), testFailoverStateDescription.Value, Optional.ToNullable(resynchronizationState), fabricObjectId.Value, fabricObjectName.Value, sourceFabricProviderId.Value, targetFabricProviderId.Value, fabricId.Value, targetFabricId.Value, draId.Value, targetDraId.Value, Optional.ToNullable(resyncRequired), Optional.ToNullable(lastSuccessfulPlannedFailoverTime), Optional.ToNullable(lastSuccessfulUnplannedFailoverTime), Optional.ToNullable(lastSuccessfulTestFailoverTime), currentJob.Value, Optional.ToList(allowedJobs), lastFailedEnableProtectionJob.Value, lastFailedPlannedFailoverJob.Value, lastTestFailoverJob.Value, Optional.ToNullable(replicationHealth), Optional.ToList(healthErrors), customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.cs similarity index 70% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.cs index 4e745042ec09..1aa4b6ca9d33 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.cs @@ -12,18 +12,18 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Protected item model properties. - public partial class ProtectedItemModelProperties + public partial class DataReplicationProtectedItemProperties { - /// Initializes a new instance of ProtectedItemModelProperties. + /// Initializes a new instance of DataReplicationProtectedItemProperties. /// Gets or sets the policy name. /// Gets or sets the replication extension name. /// /// Protected item model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// , or is null. - public ProtectedItemModelProperties(string policyName, string replicationExtensionName, ProtectedItemModelCustomProperties customProperties) + public DataReplicationProtectedItemProperties(string policyName, string replicationExtensionName, ProtectedItemModelCustomProperties customProperties) { Argument.AssertNotNull(policyName, nameof(policyName)); Argument.AssertNotNull(replicationExtensionName, nameof(replicationExtensionName)); @@ -32,11 +32,11 @@ public ProtectedItemModelProperties(string policyName, string replicationExtensi PolicyName = policyName; ReplicationExtensionName = replicationExtensionName; AllowedJobs = new ChangeTrackingList(); - HealthErrors = new ChangeTrackingList(); + HealthErrors = new ChangeTrackingList(); CustomProperties = customProperties; } - /// Initializes a new instance of ProtectedItemModelProperties. + /// Initializes a new instance of DataReplicationProtectedItemProperties. /// Gets or sets the policy name. /// Gets or sets the replication extension name. /// Gets or sets the protected item correlation Id. @@ -54,23 +54,23 @@ public ProtectedItemModelProperties(string policyName, string replicationExtensi /// Gets or sets the target fabric Id. /// Gets or sets the DRA Id. /// Gets or sets the target DRA Id. - /// Gets or sets a value indicating whether resynchronization is required or not. + /// Gets or sets a value indicating whether resynchronization is required or not. /// Gets or sets the Last successful planned failover time. /// Gets or sets the Last successful unplanned failover time. /// Gets or sets the Last successful test failover time. - /// + /// Protected item job properties. /// Gets or sets the allowed scenarios on the protected item. - /// - /// - /// + /// Protected item job properties. + /// Protected item job properties. + /// Protected item job properties. /// Gets or sets protected item replication health. /// Gets or sets the list of health errors. /// /// Protected item model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// - internal ProtectedItemModelProperties(string policyName, string replicationExtensionName, string correlationId, ProvisioningState? provisioningState, ProtectionState? protectionState, string protectionStateDescription, TestFailoverState? testFailoverState, string testFailoverStateDescription, ResynchronizationState? resynchronizationState, string fabricObjectId, string fabricObjectName, string sourceFabricProviderId, string targetFabricProviderId, string fabricId, string targetFabricId, string draId, string targetDraId, bool? resyncRequired, DateTimeOffset? lastSuccessfulPlannedFailoverOn, DateTimeOffset? lastSuccessfulUnplannedFailoverOn, DateTimeOffset? lastSuccessfulTestFailoverOn, ProtectedItemModelPropertiesCurrentJob currentJob, IReadOnlyList allowedJobs, ProtectedItemModelPropertiesLastFailedEnableProtectionJob lastFailedEnableProtectionJob, ProtectedItemModelPropertiesLastFailedPlannedFailoverJob lastFailedPlannedFailoverJob, ProtectedItemModelPropertiesLastTestFailoverJob lastTestFailoverJob, HealthStatus? replicationHealth, IReadOnlyList healthErrors, ProtectedItemModelCustomProperties customProperties) + internal DataReplicationProtectedItemProperties(string policyName, string replicationExtensionName, string correlationId, DataReplicationProvisioningState? provisioningState, DataReplicationProtectionState? protectionState, string protectionStateDescription, DataReplicationTestFailoverState? testFailoverState, string testFailoverStateDescription, DataReplicationResynchronizationState? resynchronizationState, string fabricObjectId, string fabricObjectName, string sourceFabricProviderId, string targetFabricProviderId, string fabricId, string targetFabricId, string draId, string targetDraId, bool? isResyncRequired, DateTimeOffset? lastSuccessfulPlannedFailoverOn, DateTimeOffset? lastSuccessfulUnplannedFailoverOn, DateTimeOffset? lastSuccessfulTestFailoverOn, ProtectedItemJobProperties currentJob, IReadOnlyList allowedJobs, ProtectedItemJobProperties lastFailedEnableProtectionJob, ProtectedItemJobProperties lastFailedPlannedFailoverJob, ProtectedItemJobProperties lastTestFailoverJob, DataReplicationHealthStatus? replicationHealth, IReadOnlyList healthErrors, ProtectedItemModelCustomProperties customProperties) { PolicyName = policyName; ReplicationExtensionName = replicationExtensionName; @@ -89,7 +89,7 @@ internal ProtectedItemModelProperties(string policyName, string replicationExten TargetFabricId = targetFabricId; DraId = draId; TargetDraId = targetDraId; - ResyncRequired = resyncRequired; + IsResyncRequired = isResyncRequired; LastSuccessfulPlannedFailoverOn = lastSuccessfulPlannedFailoverOn; LastSuccessfulUnplannedFailoverOn = lastSuccessfulUnplannedFailoverOn; LastSuccessfulTestFailoverOn = lastSuccessfulTestFailoverOn; @@ -110,17 +110,17 @@ internal ProtectedItemModelProperties(string policyName, string replicationExten /// Gets or sets the protected item correlation Id. public string CorrelationId { get; } /// Gets or sets the provisioning state of the Dra. - public ProvisioningState? ProvisioningState { get; } + public DataReplicationProvisioningState? ProvisioningState { get; } /// Gets or sets the protection state. - public ProtectionState? ProtectionState { get; } + public DataReplicationProtectionState? ProtectionState { get; } /// Gets or sets the protection state description. public string ProtectionStateDescription { get; } /// Gets or sets the test failover state. - public TestFailoverState? TestFailoverState { get; } + public DataReplicationTestFailoverState? TestFailoverState { get; } /// Gets or sets the Test failover state description. public string TestFailoverStateDescription { get; } /// Gets or sets the resynchronization state. - public ResynchronizationState? ResynchronizationState { get; } + public DataReplicationResynchronizationState? ResynchronizationState { get; } /// Gets or sets the fabric object Id. public string FabricObjectId { get; } /// Gets or sets the fabric object name. @@ -138,31 +138,31 @@ internal ProtectedItemModelProperties(string policyName, string replicationExten /// Gets or sets the target DRA Id. public string TargetDraId { get; } /// Gets or sets a value indicating whether resynchronization is required or not. - public bool? ResyncRequired { get; } + public bool? IsResyncRequired { get; } /// Gets or sets the Last successful planned failover time. public DateTimeOffset? LastSuccessfulPlannedFailoverOn { get; } /// Gets or sets the Last successful unplanned failover time. public DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get; } /// Gets or sets the Last successful test failover time. public DateTimeOffset? LastSuccessfulTestFailoverOn { get; } - /// Gets the current job. - public ProtectedItemModelPropertiesCurrentJob CurrentJob { get; } + /// Protected item job properties. + public ProtectedItemJobProperties CurrentJob { get; } /// Gets or sets the allowed scenarios on the protected item. public IReadOnlyList AllowedJobs { get; } - /// Gets the last failed enable protection job. - public ProtectedItemModelPropertiesLastFailedEnableProtectionJob LastFailedEnableProtectionJob { get; } - /// Gets the last failed planned failover job. - public ProtectedItemModelPropertiesLastFailedPlannedFailoverJob LastFailedPlannedFailoverJob { get; } - /// Gets the last test failover job. - public ProtectedItemModelPropertiesLastTestFailoverJob LastTestFailoverJob { get; } + /// Protected item job properties. + public ProtectedItemJobProperties LastFailedEnableProtectionJob { get; } + /// Protected item job properties. + public ProtectedItemJobProperties LastFailedPlannedFailoverJob { get; } + /// Protected item job properties. + public ProtectedItemJobProperties LastTestFailoverJob { get; } /// Gets or sets protected item replication health. - public HealthStatus? ReplicationHealth { get; } + public DataReplicationHealthStatus? ReplicationHealth { get; } /// Gets or sets the list of health errors. - public IReadOnlyList HealthErrors { get; } + public IReadOnlyList HealthErrors { get; } /// /// Protected item model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public ProtectedItemModelCustomProperties CustomProperties { get; set; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectionState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectionState.cs new file mode 100644 index 000000000000..391466c703cf --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectionState.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the protection state. + public readonly partial struct DataReplicationProtectionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationProtectionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnprotectedStatesBeginValue = "UnprotectedStatesBegin"; + private const string EnablingProtectionValue = "EnablingProtection"; + private const string EnablingFailedValue = "EnablingFailed"; + private const string DisablingProtectionValue = "DisablingProtection"; + private const string MarkedForDeletionValue = "MarkedForDeletion"; + private const string DisablingFailedValue = "DisablingFailed"; + private const string UnprotectedStatesEndValue = "UnprotectedStatesEnd"; + private const string InitialReplicationStatesBeginValue = "InitialReplicationStatesBegin"; + private const string InitialReplicationInProgressValue = "InitialReplicationInProgress"; + private const string InitialReplicationCompletedOnPrimaryValue = "InitialReplicationCompletedOnPrimary"; + private const string InitialReplicationCompletedOnRecoveryValue = "InitialReplicationCompletedOnRecovery"; + private const string InitialReplicationFailedValue = "InitialReplicationFailed"; + private const string InitialReplicationStatesEndValue = "InitialReplicationStatesEnd"; + private const string ProtectedStatesBeginValue = "ProtectedStatesBegin"; + private const string ProtectedValue = "Protected"; + private const string ProtectedStatesEndValue = "ProtectedStatesEnd"; + private const string PlannedFailoverTransitionStatesBeginValue = "PlannedFailoverTransitionStatesBegin"; + private const string PlannedFailoverInitiatedValue = "PlannedFailoverInitiated"; + private const string PlannedFailoverCompletingValue = "PlannedFailoverCompleting"; + private const string PlannedFailoverCompletedValue = "PlannedFailoverCompleted"; + private const string PlannedFailoverFailedValue = "PlannedFailoverFailed"; + private const string PlannedFailoverCompletionFailedValue = "PlannedFailoverCompletionFailed"; + private const string PlannedFailoverTransitionStatesEndValue = "PlannedFailoverTransitionStatesEnd"; + private const string UnplannedFailoverTransitionStatesBeginValue = "UnplannedFailoverTransitionStatesBegin"; + private const string UnplannedFailoverInitiatedValue = "UnplannedFailoverInitiated"; + private const string UnplannedFailoverCompletingValue = "UnplannedFailoverCompleting"; + private const string UnplannedFailoverCompletedValue = "UnplannedFailoverCompleted"; + private const string UnplannedFailoverFailedValue = "UnplannedFailoverFailed"; + private const string UnplannedFailoverCompletionFailedValue = "UnplannedFailoverCompletionFailed"; + private const string UnplannedFailoverTransitionStatesEndValue = "UnplannedFailoverTransitionStatesEnd"; + private const string CommitFailoverStatesBeginValue = "CommitFailoverStatesBegin"; + private const string CommitFailoverInProgressOnPrimaryValue = "CommitFailoverInProgressOnPrimary"; + private const string CommitFailoverInProgressOnRecoveryValue = "CommitFailoverInProgressOnRecovery"; + private const string CommitFailoverCompletedValue = "CommitFailoverCompleted"; + private const string CommitFailoverFailedOnPrimaryValue = "CommitFailoverFailedOnPrimary"; + private const string CommitFailoverFailedOnRecoveryValue = "CommitFailoverFailedOnRecovery"; + private const string CommitFailoverStatesEndValue = "CommitFailoverStatesEnd"; + private const string CancelFailoverStatesBeginValue = "CancelFailoverStatesBegin"; + private const string CancelFailoverInProgressOnPrimaryValue = "CancelFailoverInProgressOnPrimary"; + private const string CancelFailoverInProgressOnRecoveryValue = "CancelFailoverInProgressOnRecovery"; + private const string CancelFailoverFailedOnPrimaryValue = "CancelFailoverFailedOnPrimary"; + private const string CancelFailoverFailedOnRecoveryValue = "CancelFailoverFailedOnRecovery"; + private const string CancelFailoverStatesEndValue = "CancelFailoverStatesEnd"; + private const string ChangeRecoveryPointStatesBeginValue = "ChangeRecoveryPointStatesBegin"; + private const string ChangeRecoveryPointInitiatedValue = "ChangeRecoveryPointInitiated"; + private const string ChangeRecoveryPointCompletedValue = "ChangeRecoveryPointCompleted"; + private const string ChangeRecoveryPointFailedValue = "ChangeRecoveryPointFailed"; + private const string ChangeRecoveryPointStatesEndValue = "ChangeRecoveryPointStatesEnd"; + private const string ReprotectStatesBeginValue = "ReprotectStatesBegin"; + private const string ReprotectInitiatedValue = "ReprotectInitiated"; + private const string ReprotectFailedValue = "ReprotectFailed"; + private const string ReprotectStatesEndValue = "ReprotectStatesEnd"; + + /// UnprotectedStatesBegin. + public static DataReplicationProtectionState UnprotectedStatesBegin { get; } = new DataReplicationProtectionState(UnprotectedStatesBeginValue); + /// EnablingProtection. + public static DataReplicationProtectionState EnablingProtection { get; } = new DataReplicationProtectionState(EnablingProtectionValue); + /// EnablingFailed. + public static DataReplicationProtectionState EnablingFailed { get; } = new DataReplicationProtectionState(EnablingFailedValue); + /// DisablingProtection. + public static DataReplicationProtectionState DisablingProtection { get; } = new DataReplicationProtectionState(DisablingProtectionValue); + /// MarkedForDeletion. + public static DataReplicationProtectionState MarkedForDeletion { get; } = new DataReplicationProtectionState(MarkedForDeletionValue); + /// DisablingFailed. + public static DataReplicationProtectionState DisablingFailed { get; } = new DataReplicationProtectionState(DisablingFailedValue); + /// UnprotectedStatesEnd. + public static DataReplicationProtectionState UnprotectedStatesEnd { get; } = new DataReplicationProtectionState(UnprotectedStatesEndValue); + /// InitialReplicationStatesBegin. + public static DataReplicationProtectionState InitialReplicationStatesBegin { get; } = new DataReplicationProtectionState(InitialReplicationStatesBeginValue); + /// InitialReplicationInProgress. + public static DataReplicationProtectionState InitialReplicationInProgress { get; } = new DataReplicationProtectionState(InitialReplicationInProgressValue); + /// InitialReplicationCompletedOnPrimary. + public static DataReplicationProtectionState InitialReplicationCompletedOnPrimary { get; } = new DataReplicationProtectionState(InitialReplicationCompletedOnPrimaryValue); + /// InitialReplicationCompletedOnRecovery. + public static DataReplicationProtectionState InitialReplicationCompletedOnRecovery { get; } = new DataReplicationProtectionState(InitialReplicationCompletedOnRecoveryValue); + /// InitialReplicationFailed. + public static DataReplicationProtectionState InitialReplicationFailed { get; } = new DataReplicationProtectionState(InitialReplicationFailedValue); + /// InitialReplicationStatesEnd. + public static DataReplicationProtectionState InitialReplicationStatesEnd { get; } = new DataReplicationProtectionState(InitialReplicationStatesEndValue); + /// ProtectedStatesBegin. + public static DataReplicationProtectionState ProtectedStatesBegin { get; } = new DataReplicationProtectionState(ProtectedStatesBeginValue); + /// Protected. + public static DataReplicationProtectionState Protected { get; } = new DataReplicationProtectionState(ProtectedValue); + /// ProtectedStatesEnd. + public static DataReplicationProtectionState ProtectedStatesEnd { get; } = new DataReplicationProtectionState(ProtectedStatesEndValue); + /// PlannedFailoverTransitionStatesBegin. + public static DataReplicationProtectionState PlannedFailoverTransitionStatesBegin { get; } = new DataReplicationProtectionState(PlannedFailoverTransitionStatesBeginValue); + /// PlannedFailoverInitiated. + public static DataReplicationProtectionState PlannedFailoverInitiated { get; } = new DataReplicationProtectionState(PlannedFailoverInitiatedValue); + /// PlannedFailoverCompleting. + public static DataReplicationProtectionState PlannedFailoverCompleting { get; } = new DataReplicationProtectionState(PlannedFailoverCompletingValue); + /// PlannedFailoverCompleted. + public static DataReplicationProtectionState PlannedFailoverCompleted { get; } = new DataReplicationProtectionState(PlannedFailoverCompletedValue); + /// PlannedFailoverFailed. + public static DataReplicationProtectionState PlannedFailoverFailed { get; } = new DataReplicationProtectionState(PlannedFailoverFailedValue); + /// PlannedFailoverCompletionFailed. + public static DataReplicationProtectionState PlannedFailoverCompletionFailed { get; } = new DataReplicationProtectionState(PlannedFailoverCompletionFailedValue); + /// PlannedFailoverTransitionStatesEnd. + public static DataReplicationProtectionState PlannedFailoverTransitionStatesEnd { get; } = new DataReplicationProtectionState(PlannedFailoverTransitionStatesEndValue); + /// UnplannedFailoverTransitionStatesBegin. + public static DataReplicationProtectionState UnplannedFailoverTransitionStatesBegin { get; } = new DataReplicationProtectionState(UnplannedFailoverTransitionStatesBeginValue); + /// UnplannedFailoverInitiated. + public static DataReplicationProtectionState UnplannedFailoverInitiated { get; } = new DataReplicationProtectionState(UnplannedFailoverInitiatedValue); + /// UnplannedFailoverCompleting. + public static DataReplicationProtectionState UnplannedFailoverCompleting { get; } = new DataReplicationProtectionState(UnplannedFailoverCompletingValue); + /// UnplannedFailoverCompleted. + public static DataReplicationProtectionState UnplannedFailoverCompleted { get; } = new DataReplicationProtectionState(UnplannedFailoverCompletedValue); + /// UnplannedFailoverFailed. + public static DataReplicationProtectionState UnplannedFailoverFailed { get; } = new DataReplicationProtectionState(UnplannedFailoverFailedValue); + /// UnplannedFailoverCompletionFailed. + public static DataReplicationProtectionState UnplannedFailoverCompletionFailed { get; } = new DataReplicationProtectionState(UnplannedFailoverCompletionFailedValue); + /// UnplannedFailoverTransitionStatesEnd. + public static DataReplicationProtectionState UnplannedFailoverTransitionStatesEnd { get; } = new DataReplicationProtectionState(UnplannedFailoverTransitionStatesEndValue); + /// CommitFailoverStatesBegin. + public static DataReplicationProtectionState CommitFailoverStatesBegin { get; } = new DataReplicationProtectionState(CommitFailoverStatesBeginValue); + /// CommitFailoverInProgressOnPrimary. + public static DataReplicationProtectionState CommitFailoverInProgressOnPrimary { get; } = new DataReplicationProtectionState(CommitFailoverInProgressOnPrimaryValue); + /// CommitFailoverInProgressOnRecovery. + public static DataReplicationProtectionState CommitFailoverInProgressOnRecovery { get; } = new DataReplicationProtectionState(CommitFailoverInProgressOnRecoveryValue); + /// CommitFailoverCompleted. + public static DataReplicationProtectionState CommitFailoverCompleted { get; } = new DataReplicationProtectionState(CommitFailoverCompletedValue); + /// CommitFailoverFailedOnPrimary. + public static DataReplicationProtectionState CommitFailoverFailedOnPrimary { get; } = new DataReplicationProtectionState(CommitFailoverFailedOnPrimaryValue); + /// CommitFailoverFailedOnRecovery. + public static DataReplicationProtectionState CommitFailoverFailedOnRecovery { get; } = new DataReplicationProtectionState(CommitFailoverFailedOnRecoveryValue); + /// CommitFailoverStatesEnd. + public static DataReplicationProtectionState CommitFailoverStatesEnd { get; } = new DataReplicationProtectionState(CommitFailoverStatesEndValue); + /// CancelFailoverStatesBegin. + public static DataReplicationProtectionState CancelFailoverStatesBegin { get; } = new DataReplicationProtectionState(CancelFailoverStatesBeginValue); + /// CancelFailoverInProgressOnPrimary. + public static DataReplicationProtectionState CancelFailoverInProgressOnPrimary { get; } = new DataReplicationProtectionState(CancelFailoverInProgressOnPrimaryValue); + /// CancelFailoverInProgressOnRecovery. + public static DataReplicationProtectionState CancelFailoverInProgressOnRecovery { get; } = new DataReplicationProtectionState(CancelFailoverInProgressOnRecoveryValue); + /// CancelFailoverFailedOnPrimary. + public static DataReplicationProtectionState CancelFailoverFailedOnPrimary { get; } = new DataReplicationProtectionState(CancelFailoverFailedOnPrimaryValue); + /// CancelFailoverFailedOnRecovery. + public static DataReplicationProtectionState CancelFailoverFailedOnRecovery { get; } = new DataReplicationProtectionState(CancelFailoverFailedOnRecoveryValue); + /// CancelFailoverStatesEnd. + public static DataReplicationProtectionState CancelFailoverStatesEnd { get; } = new DataReplicationProtectionState(CancelFailoverStatesEndValue); + /// ChangeRecoveryPointStatesBegin. + public static DataReplicationProtectionState ChangeRecoveryPointStatesBegin { get; } = new DataReplicationProtectionState(ChangeRecoveryPointStatesBeginValue); + /// ChangeRecoveryPointInitiated. + public static DataReplicationProtectionState ChangeRecoveryPointInitiated { get; } = new DataReplicationProtectionState(ChangeRecoveryPointInitiatedValue); + /// ChangeRecoveryPointCompleted. + public static DataReplicationProtectionState ChangeRecoveryPointCompleted { get; } = new DataReplicationProtectionState(ChangeRecoveryPointCompletedValue); + /// ChangeRecoveryPointFailed. + public static DataReplicationProtectionState ChangeRecoveryPointFailed { get; } = new DataReplicationProtectionState(ChangeRecoveryPointFailedValue); + /// ChangeRecoveryPointStatesEnd. + public static DataReplicationProtectionState ChangeRecoveryPointStatesEnd { get; } = new DataReplicationProtectionState(ChangeRecoveryPointStatesEndValue); + /// ReprotectStatesBegin. + public static DataReplicationProtectionState ReprotectStatesBegin { get; } = new DataReplicationProtectionState(ReprotectStatesBeginValue); + /// ReprotectInitiated. + public static DataReplicationProtectionState ReprotectInitiated { get; } = new DataReplicationProtectionState(ReprotectInitiatedValue); + /// ReprotectFailed. + public static DataReplicationProtectionState ReprotectFailed { get; } = new DataReplicationProtectionState(ReprotectFailedValue); + /// ReprotectStatesEnd. + public static DataReplicationProtectionState ReprotectStatesEnd { get; } = new DataReplicationProtectionState(ReprotectStatesEndValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationProtectionState left, DataReplicationProtectionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationProtectionState left, DataReplicationProtectionState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationProtectionState(string value) => new DataReplicationProtectionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationProtectionState other && Equals(other); + /// + public bool Equals(DataReplicationProtectionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProvisioningState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProvisioningState.cs new file mode 100644 index 000000000000..4bc9d31b38d0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the provisioning state of the Dra. + public readonly partial struct DataReplicationProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CanceledValue = "Canceled"; + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + + /// Canceled. + public static DataReplicationProvisioningState Canceled { get; } = new DataReplicationProvisioningState(CanceledValue); + /// Creating. + public static DataReplicationProvisioningState Creating { get; } = new DataReplicationProvisioningState(CreatingValue); + /// Deleting. + public static DataReplicationProvisioningState Deleting { get; } = new DataReplicationProvisioningState(DeletingValue); + /// Deleted. + public static DataReplicationProvisioningState Deleted { get; } = new DataReplicationProvisioningState(DeletedValue); + /// Failed. + public static DataReplicationProvisioningState Failed { get; } = new DataReplicationProvisioningState(FailedValue); + /// Succeeded. + public static DataReplicationProvisioningState Succeeded { get; } = new DataReplicationProvisioningState(SucceededValue); + /// Updating. + public static DataReplicationProvisioningState Updating { get; } = new DataReplicationProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationProvisioningState left, DataReplicationProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationProvisioningState left, DataReplicationProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationProvisioningState(string value) => new DataReplicationProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationProvisioningState other && Equals(other); + /// + public bool Equals(DataReplicationProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointData.Serialization.cs similarity index 78% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointData.Serialization.cs index eeba8caf995b..af756ebbaf8e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointData.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class WorkflowModelData + public partial class DataReplicationRecoveryPointData { - internal static WorkflowModelData DeserializeWorkflowModelData(JsonElement element) + internal static DataReplicationRecoveryPointData DeserializeDataReplicationRecoveryPointData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - WorkflowModelProperties properties = default; + DataReplicationRecoveryPointProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -29,7 +29,7 @@ internal static WorkflowModelData DeserializeWorkflowModelData(JsonElement eleme { if (property.NameEquals("properties"u8)) { - properties = WorkflowModelProperties.DeserializeWorkflowModelProperties(property.Value); + properties = DataReplicationRecoveryPointProperties.DeserializeDataReplicationRecoveryPointProperties(property.Value); continue; } if (property.NameEquals("id"u8)) @@ -57,7 +57,7 @@ internal static WorkflowModelData DeserializeWorkflowModelData(JsonElement eleme continue; } } - return new WorkflowModelData(id, name, type, systemData.Value, properties); + return new DataReplicationRecoveryPointData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointListResult.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointListResult.Serialization.cs new file mode 100644 index 000000000000..6b518cc1ec22 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class DataReplicationRecoveryPointListResult + { + internal static DataReplicationRecoveryPointListResult DeserializeDataReplicationRecoveryPointListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DataReplicationRecoveryPointListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointListResult.cs similarity index 58% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointListResult.cs index fa11c65a3aa3..9b4a6dc52369 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Recovery point model collection. - internal partial class RecoveryPointModelCollection + internal partial class DataReplicationRecoveryPointListResult { - /// Initializes a new instance of RecoveryPointModelCollection. - internal RecoveryPointModelCollection() + /// Initializes a new instance of DataReplicationRecoveryPointListResult. + internal DataReplicationRecoveryPointListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of RecoveryPointModelCollection. + /// Initializes a new instance of DataReplicationRecoveryPointListResult. /// Gets or sets the list of recovery points. /// Gets or sets the value of next link. - internal RecoveryPointModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationRecoveryPointListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of recovery points. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.Serialization.cs similarity index 71% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.Serialization.cs index 89f32a2f7ff7..02917ebccd7f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.Serialization.cs @@ -11,16 +11,16 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class RecoveryPointModelProperties + public partial class DataReplicationRecoveryPointProperties { - internal static RecoveryPointModelProperties DeserializeRecoveryPointModelProperties(JsonElement element) + internal static DataReplicationRecoveryPointProperties DeserializeDataReplicationRecoveryPointProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } DateTimeOffset recoveryPointTime = default; - RecoveryPointType recoveryPointType = default; + DataReplicationRecoveryPointType recoveryPointType = default; RecoveryPointModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { @@ -31,7 +31,7 @@ internal static RecoveryPointModelProperties DeserializeRecoveryPointModelProper } if (property.NameEquals("recoveryPointType"u8)) { - recoveryPointType = new RecoveryPointType(property.Value.GetString()); + recoveryPointType = new DataReplicationRecoveryPointType(property.Value.GetString()); continue; } if (property.NameEquals("customProperties"u8)) @@ -40,7 +40,7 @@ internal static RecoveryPointModelProperties DeserializeRecoveryPointModelProper continue; } } - return new RecoveryPointModelProperties(recoveryPointTime, recoveryPointType, customProperties); + return new DataReplicationRecoveryPointProperties(recoveryPointTime, recoveryPointType, customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.cs similarity index 78% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.cs index 23ab64d9d510..8964b9be74c1 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.cs @@ -11,18 +11,18 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Recovery point model properties. - public partial class RecoveryPointModelProperties + public partial class DataReplicationRecoveryPointProperties { - /// Initializes a new instance of RecoveryPointModelProperties. + /// Initializes a new instance of DataReplicationRecoveryPointProperties. /// Gets or sets the recovery point time. /// Gets or sets the recovery point type. /// /// Recovery point model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// /// is null. - internal RecoveryPointModelProperties(DateTimeOffset recoveryPointOn, RecoveryPointType recoveryPointType, RecoveryPointModelCustomProperties customProperties) + internal DataReplicationRecoveryPointProperties(DateTimeOffset recoveryPointOn, DataReplicationRecoveryPointType recoveryPointType, RecoveryPointModelCustomProperties customProperties) { Argument.AssertNotNull(customProperties, nameof(customProperties)); @@ -34,11 +34,11 @@ internal RecoveryPointModelProperties(DateTimeOffset recoveryPointOn, RecoveryPo /// Gets or sets the recovery point time. public DateTimeOffset RecoveryPointOn { get; } /// Gets or sets the recovery point type. - public RecoveryPointType RecoveryPointType { get; } + public DataReplicationRecoveryPointType RecoveryPointType { get; } /// /// Recovery point model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// public RecoveryPointModelCustomProperties CustomProperties { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointType.cs new file mode 100644 index 000000000000..9dc03d5ec6f1 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the recovery point type. + public readonly partial struct DataReplicationRecoveryPointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationRecoveryPointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApplicationConsistentValue = "ApplicationConsistent"; + private const string CrashConsistentValue = "CrashConsistent"; + + /// ApplicationConsistent. + public static DataReplicationRecoveryPointType ApplicationConsistent { get; } = new DataReplicationRecoveryPointType(ApplicationConsistentValue); + /// CrashConsistent. + public static DataReplicationRecoveryPointType CrashConsistent { get; } = new DataReplicationRecoveryPointType(CrashConsistentValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationRecoveryPointType left, DataReplicationRecoveryPointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationRecoveryPointType left, DataReplicationRecoveryPointType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationRecoveryPointType(string value) => new DataReplicationRecoveryPointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationRecoveryPointType other && Equals(other); + /// + public bool Equals(DataReplicationRecoveryPointType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionData.Serialization.cs new file mode 100644 index 000000000000..6943f57935f6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationReplicationExtensionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static DataReplicationReplicationExtensionData DeserializeDataReplicationReplicationExtensionData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationReplicationExtensionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = DataReplicationReplicationExtensionProperties.DeserializeDataReplicationReplicationExtensionProperties(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new DataReplicationReplicationExtensionData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionListResult.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionListResult.Serialization.cs new file mode 100644 index 000000000000..bc832efa8709 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class DataReplicationReplicationExtensionListResult + { + internal static DataReplicationReplicationExtensionListResult DeserializeDataReplicationReplicationExtensionListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationReplicationExtensionData.DeserializeDataReplicationReplicationExtensionData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DataReplicationReplicationExtensionListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionListResult.cs similarity index 56% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionListResult.cs index acb4b3ecefd7..bbbe20cbdae5 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Replication extension model collection. - internal partial class ReplicationExtensionModelCollection + internal partial class DataReplicationReplicationExtensionListResult { - /// Initializes a new instance of ReplicationExtensionModelCollection. - internal ReplicationExtensionModelCollection() + /// Initializes a new instance of DataReplicationReplicationExtensionListResult. + internal DataReplicationReplicationExtensionListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of ReplicationExtensionModelCollection. + /// Initializes a new instance of DataReplicationReplicationExtensionListResult. /// Gets or sets the list of replication extensions. /// Gets or sets the value of next link. - internal ReplicationExtensionModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationReplicationExtensionListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of replication extensions. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionProperties.Serialization.cs similarity index 71% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionProperties.Serialization.cs index 9491ba7236aa..26d958fe79e7 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class ReplicationExtensionModelProperties : IUtf8JsonSerializable + public partial class DataReplicationReplicationExtensionProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,13 +20,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ReplicationExtensionModelProperties DeserializeReplicationExtensionModelProperties(JsonElement element) + internal static DataReplicationReplicationExtensionProperties DeserializeDataReplicationReplicationExtensionProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional provisioningState = default; + Optional provisioningState = default; ReplicationExtensionModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { @@ -36,7 +36,7 @@ internal static ReplicationExtensionModelProperties DeserializeReplicationExtens { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("customProperties"u8)) @@ -45,7 +45,7 @@ internal static ReplicationExtensionModelProperties DeserializeReplicationExtens continue; } } - return new ReplicationExtensionModelProperties(Optional.ToNullable(provisioningState), customProperties); + return new DataReplicationReplicationExtensionProperties(Optional.ToNullable(provisioningState), customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionProperties.cs similarity index 65% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionProperties.cs index c76ac0fe4732..f59628391072 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationExtensionProperties.cs @@ -11,41 +11,41 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Replication extension model properties. - public partial class ReplicationExtensionModelProperties + public partial class DataReplicationReplicationExtensionProperties { - /// Initializes a new instance of ReplicationExtensionModelProperties. + /// Initializes a new instance of DataReplicationReplicationExtensionProperties. /// /// Replication extension model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// is null. - public ReplicationExtensionModelProperties(ReplicationExtensionModelCustomProperties customProperties) + public DataReplicationReplicationExtensionProperties(ReplicationExtensionModelCustomProperties customProperties) { Argument.AssertNotNull(customProperties, nameof(customProperties)); CustomProperties = customProperties; } - /// Initializes a new instance of ReplicationExtensionModelProperties. + /// Initializes a new instance of DataReplicationReplicationExtensionProperties. /// Gets or sets the provisioning state of the replication extension. /// /// Replication extension model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// - internal ReplicationExtensionModelProperties(ProvisioningState? provisioningState, ReplicationExtensionModelCustomProperties customProperties) + internal DataReplicationReplicationExtensionProperties(DataReplicationProvisioningState? provisioningState, ReplicationExtensionModelCustomProperties customProperties) { ProvisioningState = provisioningState; CustomProperties = customProperties; } /// Gets or sets the provisioning state of the replication extension. - public ProvisioningState? ProvisioningState { get; } + public DataReplicationProvisioningState? ProvisioningState { get; } /// /// Replication extension model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public ReplicationExtensionModelCustomProperties CustomProperties { get; set; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationVaultType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationVaultType.cs new file mode 100644 index 000000000000..77f7214ad5b0 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationReplicationVaultType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the type of vault. + public readonly partial struct DataReplicationReplicationVaultType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationReplicationVaultType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisasterRecoveryValue = "DisasterRecovery"; + private const string MigrateValue = "Migrate"; + + /// DisasterRecovery. + public static DataReplicationReplicationVaultType DisasterRecovery { get; } = new DataReplicationReplicationVaultType(DisasterRecoveryValue); + /// Migrate. + public static DataReplicationReplicationVaultType Migrate { get; } = new DataReplicationReplicationVaultType(MigrateValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationReplicationVaultType left, DataReplicationReplicationVaultType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationReplicationVaultType left, DataReplicationReplicationVaultType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationReplicationVaultType(string value) => new DataReplicationReplicationVaultType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationReplicationVaultType other && Equals(other); + /// + public bool Equals(DataReplicationReplicationVaultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationResynchronizationState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationResynchronizationState.cs new file mode 100644 index 000000000000..f025b50a239c --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationResynchronizationState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the resynchronization state. + public readonly partial struct DataReplicationResynchronizationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationResynchronizationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ResynchronizationInitiatedValue = "ResynchronizationInitiated"; + private const string ResynchronizationCompletedValue = "ResynchronizationCompleted"; + private const string ResynchronizationFailedValue = "ResynchronizationFailed"; + + /// None. + public static DataReplicationResynchronizationState None { get; } = new DataReplicationResynchronizationState(NoneValue); + /// ResynchronizationInitiated. + public static DataReplicationResynchronizationState ResynchronizationInitiated { get; } = new DataReplicationResynchronizationState(ResynchronizationInitiatedValue); + /// ResynchronizationCompleted. + public static DataReplicationResynchronizationState ResynchronizationCompleted { get; } = new DataReplicationResynchronizationState(ResynchronizationCompletedValue); + /// ResynchronizationFailed. + public static DataReplicationResynchronizationState ResynchronizationFailed { get; } = new DataReplicationResynchronizationState(ResynchronizationFailedValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationResynchronizationState left, DataReplicationResynchronizationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationResynchronizationState left, DataReplicationResynchronizationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationResynchronizationState(string value) => new DataReplicationResynchronizationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationResynchronizationState other && Equals(other); + /// + public bool Equals(DataReplicationResynchronizationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.Serialization.cs similarity index 77% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.Serialization.cs index 998a1b20a6e8..afe4f856b3ae 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.Serialization.cs @@ -13,20 +13,20 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class TaskModel + public partial class DataReplicationTask { - internal static TaskModel DeserializeTaskModel(JsonElement element) + internal static DataReplicationTask DeserializeDataReplicationTask(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } Optional taskName = default; - Optional state = default; + Optional state = default; Optional startTime = default; Optional endTime = default; Optional customProperties = default; - Optional> childrenWorkflows = default; + Optional> childrenWorkflows = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("taskName"u8)) @@ -40,7 +40,7 @@ internal static TaskModel DeserializeTaskModel(JsonElement element) { continue; } - state = new TaskState(property.Value.GetString()); + state = new DataReplicationTaskState(property.Value.GetString()); continue; } if (property.NameEquals("startTime"u8)) @@ -76,16 +76,16 @@ internal static TaskModel DeserializeTaskModel(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(WorkflowModelData.DeserializeWorkflowModelData(item)); + array.Add(DataReplicationWorkflowData.DeserializeDataReplicationWorkflowData(item)); } childrenWorkflows = array; continue; } } - return new TaskModel(taskName.Value, Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), customProperties.Value, Optional.ToList(childrenWorkflows)); + return new DataReplicationTask(taskName.Value, Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), customProperties.Value, Optional.ToList(childrenWorkflows)); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.cs similarity index 72% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.cs index 5cb402677419..a824a1bf9f8c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.cs @@ -13,22 +13,22 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Task model. - public partial class TaskModel + public partial class DataReplicationTask { - /// Initializes a new instance of TaskModel. - internal TaskModel() + /// Initializes a new instance of DataReplicationTask. + internal DataReplicationTask() { - ChildrenWorkflows = new ChangeTrackingList(); + ChildrenWorkflows = new ChangeTrackingList(); } - /// Initializes a new instance of TaskModel. + /// Initializes a new instance of DataReplicationTask. /// Gets or sets the task name. /// Gets or sets the task state. /// Gets or sets the start time. /// Gets or sets the end time. /// Task model custom properties. /// Gets or sets the list of children workflow models. - internal TaskModel(string taskName, TaskState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, TaskModelCustomProperties customProperties, IReadOnlyList childrenWorkflows) + internal DataReplicationTask(string taskName, DataReplicationTaskState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, TaskModelCustomProperties customProperties, IReadOnlyList childrenWorkflows) { TaskName = taskName; State = state; @@ -41,7 +41,7 @@ internal TaskModel(string taskName, TaskState? state, DateTimeOffset? startOn, D /// Gets or sets the task name. public string TaskName { get; } /// Gets or sets the task state. - public TaskState? State { get; } + public DataReplicationTaskState? State { get; } /// Gets or sets the start time. public DateTimeOffset? StartOn { get; } /// Gets or sets the end time. @@ -55,6 +55,6 @@ public string CustomInstanceType } /// Gets or sets the list of children workflow models. - public IReadOnlyList ChildrenWorkflows { get; } + public IReadOnlyList ChildrenWorkflows { get; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskState.cs new file mode 100644 index 000000000000..d1f97da0192e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the task state. + public readonly partial struct DataReplicationTaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationTaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string StartedValue = "Started"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string SkippedValue = "Skipped"; + + /// Pending. + public static DataReplicationTaskState Pending { get; } = new DataReplicationTaskState(PendingValue); + /// Started. + public static DataReplicationTaskState Started { get; } = new DataReplicationTaskState(StartedValue); + /// Succeeded. + public static DataReplicationTaskState Succeeded { get; } = new DataReplicationTaskState(SucceededValue); + /// Failed. + public static DataReplicationTaskState Failed { get; } = new DataReplicationTaskState(FailedValue); + /// Cancelled. + public static DataReplicationTaskState Cancelled { get; } = new DataReplicationTaskState(CancelledValue); + /// Skipped. + public static DataReplicationTaskState Skipped { get; } = new DataReplicationTaskState(SkippedValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationTaskState left, DataReplicationTaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationTaskState left, DataReplicationTaskState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationTaskState(string value) => new DataReplicationTaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationTaskState other && Equals(other); + /// + public bool Equals(DataReplicationTaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTestFailoverState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTestFailoverState.cs new file mode 100644 index 000000000000..8391efcb9470 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTestFailoverState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the test failover state. + public readonly partial struct DataReplicationTestFailoverState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationTestFailoverState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string TestFailoverInitiatedValue = "TestFailoverInitiated"; + private const string TestFailoverCompletingValue = "TestFailoverCompleting"; + private const string TestFailoverCompletedValue = "TestFailoverCompleted"; + private const string TestFailoverFailedValue = "TestFailoverFailed"; + private const string TestFailoverCompletionFailedValue = "TestFailoverCompletionFailed"; + private const string TestFailoverCleanupInitiatedValue = "TestFailoverCleanupInitiated"; + private const string TestFailoverCleanupCompletingValue = "TestFailoverCleanupCompleting"; + private const string MarkedForDeletionValue = "MarkedForDeletion"; + + /// None. + public static DataReplicationTestFailoverState None { get; } = new DataReplicationTestFailoverState(NoneValue); + /// TestFailoverInitiated. + public static DataReplicationTestFailoverState TestFailoverInitiated { get; } = new DataReplicationTestFailoverState(TestFailoverInitiatedValue); + /// TestFailoverCompleting. + public static DataReplicationTestFailoverState TestFailoverCompleting { get; } = new DataReplicationTestFailoverState(TestFailoverCompletingValue); + /// TestFailoverCompleted. + public static DataReplicationTestFailoverState TestFailoverCompleted { get; } = new DataReplicationTestFailoverState(TestFailoverCompletedValue); + /// TestFailoverFailed. + public static DataReplicationTestFailoverState TestFailoverFailed { get; } = new DataReplicationTestFailoverState(TestFailoverFailedValue); + /// TestFailoverCompletionFailed. + public static DataReplicationTestFailoverState TestFailoverCompletionFailed { get; } = new DataReplicationTestFailoverState(TestFailoverCompletionFailedValue); + /// TestFailoverCleanupInitiated. + public static DataReplicationTestFailoverState TestFailoverCleanupInitiated { get; } = new DataReplicationTestFailoverState(TestFailoverCleanupInitiatedValue); + /// TestFailoverCleanupCompleting. + public static DataReplicationTestFailoverState TestFailoverCleanupCompleting { get; } = new DataReplicationTestFailoverState(TestFailoverCleanupCompletingValue); + /// MarkedForDeletion. + public static DataReplicationTestFailoverState MarkedForDeletion { get; } = new DataReplicationTestFailoverState(MarkedForDeletionValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationTestFailoverState left, DataReplicationTestFailoverState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationTestFailoverState left, DataReplicationTestFailoverState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationTestFailoverState(string value) => new DataReplicationTestFailoverState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationTestFailoverState other && Equals(other); + /// + public bool Equals(DataReplicationTestFailoverState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultData.Serialization.cs similarity index 87% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultData.Serialization.cs index d720ab1e7bc4..808b24c984eb 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class VaultModelData : IUtf8JsonSerializable + public partial class DataReplicationVaultData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -39,13 +39,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VaultModelData DeserializeVaultModelData(JsonElement element) + internal static DataReplicationVaultData DeserializeDataReplicationVaultData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional properties = default; + Optional properties = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -60,7 +60,7 @@ internal static VaultModelData DeserializeVaultModelData(JsonElement element) { continue; } - properties = VaultModelProperties.DeserializeVaultModelProperties(property.Value); + properties = DataReplicationVaultProperties.DeserializeDataReplicationVaultProperties(property.Value); continue; } if (property.NameEquals("tags"u8)) @@ -107,7 +107,7 @@ internal static VaultModelData DeserializeVaultModelData(JsonElement element) continue; } } - return new VaultModelData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties.Value); + return new DataReplicationVaultData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, properties.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultListResult.Serialization.cs similarity index 69% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultListResult.Serialization.cs index 4a2fe1d6167c..ad83b44df9ab 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCollection.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - internal partial class FabricModelCollection + internal partial class DataReplicationVaultListResult { - internal static FabricModelCollection DeserializeFabricModelCollection(JsonElement element) + internal static DataReplicationVaultListResult DeserializeDataReplicationVaultListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static FabricModelCollection DeserializeFabricModelCollection(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FabricModelData.DeserializeFabricModelData(item)); + array.Add(DataReplicationVaultData.DeserializeDataReplicationVaultData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static FabricModelCollection DeserializeFabricModelCollection(JsonEleme continue; } } - return new FabricModelCollection(Optional.ToList(value), nextLink.Value); + return new DataReplicationVaultListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultListResult.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultListResult.cs index 266166341f1e..ca450dc8629a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Vault model collection. - internal partial class VaultModelCollection + internal partial class DataReplicationVaultListResult { - /// Initializes a new instance of VaultModelCollection. - internal VaultModelCollection() + /// Initializes a new instance of DataReplicationVaultListResult. + internal DataReplicationVaultListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of VaultModelCollection. + /// Initializes a new instance of DataReplicationVaultListResult. /// Gets or sets the list of vaults. /// Gets or sets the value of next link. - internal VaultModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationVaultListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of vaults. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.Serialization.cs similarity index 93% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.Serialization.cs index e8af3fd7f484..7e156ee1fe4c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VaultModelPatch : IUtf8JsonSerializable + public partial class DataReplicationVaultPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.cs similarity index 69% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.cs index 5bb7c6a16499..ccbee59486b9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelPatch.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.cs @@ -12,10 +12,10 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Vault model for update. - public partial class VaultModelPatch : ResourceData + public partial class DataReplicationVaultPatch : ResourceData { - /// Initializes a new instance of VaultModelPatch. - public VaultModelPatch() + /// Initializes a new instance of DataReplicationVaultPatch. + public DataReplicationVaultPatch() { Tags = new ChangeTrackingDictionary(); } @@ -23,6 +23,6 @@ public VaultModelPatch() /// Gets or sets the resource tags. public IDictionary Tags { get; } /// Vault properties. - public VaultModelProperties Properties { get; set; } + public DataReplicationVaultProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.Serialization.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.Serialization.cs index cf3496b3e067..34ce80d2df1a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VaultModelProperties : IUtf8JsonSerializable + public partial class DataReplicationVaultProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -23,15 +23,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VaultModelProperties DeserializeVaultModelProperties(JsonElement element) + internal static DataReplicationVaultProperties DeserializeDataReplicationVaultProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional provisioningState = default; - Optional serviceResourceId = default; - Optional vaultType = default; + Optional provisioningState = default; + Optional serviceResourceId = default; + Optional vaultType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("provisioningState"u8)) @@ -40,12 +40,16 @@ internal static VaultModelProperties DeserializeVaultModelProperties(JsonElement { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("serviceResourceId"u8)) { - serviceResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("vaultType"u8)) @@ -54,11 +58,11 @@ internal static VaultModelProperties DeserializeVaultModelProperties(JsonElement { continue; } - vaultType = new ReplicationVaultType(property.Value.GetString()); + vaultType = new DataReplicationReplicationVaultType(property.Value.GetString()); continue; } } - return new VaultModelProperties(Optional.ToNullable(provisioningState), serviceResourceId.Value, Optional.ToNullable(vaultType)); + return new DataReplicationVaultProperties(Optional.ToNullable(provisioningState), serviceResourceId.Value, Optional.ToNullable(vaultType)); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.cs similarity index 56% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.cs index 298e73498e30..8a4260e6d3e3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.cs @@ -5,21 +5,23 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Vault properties. - public partial class VaultModelProperties + public partial class DataReplicationVaultProperties { - /// Initializes a new instance of VaultModelProperties. - public VaultModelProperties() + /// Initializes a new instance of DataReplicationVaultProperties. + public DataReplicationVaultProperties() { } - /// Initializes a new instance of VaultModelProperties. + /// Initializes a new instance of DataReplicationVaultProperties. /// Gets or sets the provisioning state of the vault. /// Gets or sets the service resource Id. /// Gets or sets the type of vault. - internal VaultModelProperties(ProvisioningState? provisioningState, string serviceResourceId, ReplicationVaultType? vaultType) + internal DataReplicationVaultProperties(DataReplicationProvisioningState? provisioningState, ResourceIdentifier serviceResourceId, DataReplicationReplicationVaultType? vaultType) { ProvisioningState = provisioningState; ServiceResourceId = serviceResourceId; @@ -27,10 +29,10 @@ internal VaultModelProperties(ProvisioningState? provisioningState, string servi } /// Gets or sets the provisioning state of the vault. - public ProvisioningState? ProvisioningState { get; } + public DataReplicationProvisioningState? ProvisioningState { get; } /// Gets or sets the service resource Id. - public string ServiceResourceId { get; } + public ResourceIdentifier ServiceResourceId { get; } /// Gets or sets the type of vault. - public ReplicationVaultType? VaultType { get; set; } + public DataReplicationReplicationVaultType? VaultType { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowData.Serialization.cs similarity index 79% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowData.Serialization.cs index 18841dbb6c31..80a128100a2f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelData.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowData.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { - public partial class EventModelData + public partial class DataReplicationWorkflowData { - internal static EventModelData DeserializeEventModelData(JsonElement element) + internal static DataReplicationWorkflowData DeserializeDataReplicationWorkflowData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - EventModelProperties properties = default; + DataReplicationWorkflowProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -29,7 +29,7 @@ internal static EventModelData DeserializeEventModelData(JsonElement element) { if (property.NameEquals("properties"u8)) { - properties = EventModelProperties.DeserializeEventModelProperties(property.Value); + properties = DataReplicationWorkflowProperties.DeserializeDataReplicationWorkflowProperties(property.Value); continue; } if (property.NameEquals("id"u8)) @@ -57,7 +57,7 @@ internal static EventModelData DeserializeEventModelData(JsonElement element) continue; } } - return new EventModelData(id, name, type, systemData.Value, properties); + return new DataReplicationWorkflowData(id, name, type, systemData.Value, properties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowListResult.Serialization.cs similarity index 71% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowListResult.Serialization.cs index 0842d3d5db92..79a1550174e8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelCollection.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - internal partial class EmailConfigurationModelCollection + internal partial class DataReplicationWorkflowListResult { - internal static EmailConfigurationModelCollection DeserializeEmailConfigurationModelCollection(JsonElement element) + internal static DataReplicationWorkflowListResult DeserializeDataReplicationWorkflowListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static EmailConfigurationModelCollection DeserializeEmailConfigurationM { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(EmailConfigurationModelData.DeserializeEmailConfigurationModelData(item)); + array.Add(DataReplicationWorkflowData.DeserializeDataReplicationWorkflowData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static EmailConfigurationModelCollection DeserializeEmailConfigurationM continue; } } - return new EmailConfigurationModelCollection(Optional.ToList(value), nextLink.Value); + return new DataReplicationWorkflowListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowListResult.cs similarity index 59% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowListResult.cs index cab0102b12cd..fbd47a611486 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Workflow model collection. - internal partial class WorkflowModelCollection + internal partial class DataReplicationWorkflowListResult { - /// Initializes a new instance of WorkflowModelCollection. - internal WorkflowModelCollection() + /// Initializes a new instance of DataReplicationWorkflowListResult. + internal DataReplicationWorkflowListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of WorkflowModelCollection. + /// Initializes a new instance of DataReplicationWorkflowListResult. /// Gets or sets the list of workflows. /// Gets or sets the value of next link. - internal WorkflowModelCollection(IReadOnlyList value, string nextLink) + internal DataReplicationWorkflowListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// Gets or sets the list of workflows. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// Gets or sets the value of next link. public string NextLink { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowProperties.Serialization.cs similarity index 81% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowProperties.Serialization.cs index 4b8a00434548..e2650d6b12b2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowProperties.Serialization.cs @@ -12,16 +12,16 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class WorkflowModelProperties + public partial class DataReplicationWorkflowProperties { - internal static WorkflowModelProperties DeserializeWorkflowModelProperties(JsonElement element) + internal static DataReplicationWorkflowProperties DeserializeDataReplicationWorkflowProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } Optional displayName = default; - Optional state = default; + Optional state = default; Optional startTime = default; Optional endTime = default; Optional objectId = default; @@ -34,8 +34,8 @@ internal static WorkflowModelProperties DeserializeWorkflowModelProperties(JsonE Optional targetFabricProviderId = default; Optional> allowedActions = default; Optional activityId = default; - Optional> tasks = default; - Optional> errors = default; + Optional> tasks = default; + Optional> errors = default; WorkflowModelCustomProperties customProperties = default; foreach (var property in element.EnumerateObject()) { @@ -50,7 +50,7 @@ internal static WorkflowModelProperties DeserializeWorkflowModelProperties(JsonE { continue; } - state = new WorkflowState(property.Value.GetString()); + state = new DataReplicationWorkflowState(property.Value.GetString()); continue; } if (property.NameEquals("startTime"u8)) @@ -140,10 +140,10 @@ internal static WorkflowModelProperties DeserializeWorkflowModelProperties(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(TaskModel.DeserializeTaskModel(item)); + array.Add(DataReplicationTask.DeserializeDataReplicationTask(item)); } tasks = array; continue; @@ -154,10 +154,10 @@ internal static WorkflowModelProperties DeserializeWorkflowModelProperties(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ErrorModel.DeserializeErrorModel(item)); + array.Add(DataReplicationErrorInfo.DeserializeDataReplicationErrorInfo(item)); } errors = array; continue; @@ -168,7 +168,7 @@ internal static WorkflowModelProperties DeserializeWorkflowModelProperties(JsonE continue; } } - return new WorkflowModelProperties(displayName.Value, Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), objectId.Value, objectName.Value, objectInternalId.Value, objectInternalName.Value, Optional.ToNullable(objectType), replicationProviderId.Value, sourceFabricProviderId.Value, targetFabricProviderId.Value, Optional.ToList(allowedActions), activityId.Value, Optional.ToList(tasks), Optional.ToList(errors), customProperties); + return new DataReplicationWorkflowProperties(displayName.Value, Optional.ToNullable(state), Optional.ToNullable(startTime), Optional.ToNullable(endTime), objectId.Value, objectName.Value, objectInternalId.Value, objectInternalName.Value, Optional.ToNullable(objectType), replicationProviderId.Value, sourceFabricProviderId.Value, targetFabricProviderId.Value, Optional.ToList(allowedActions), activityId.Value, Optional.ToList(tasks), Optional.ToList(errors), customProperties); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowProperties.cs similarity index 83% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowProperties.cs index 7acfc8afee72..ef4880804420 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowProperties.cs @@ -12,26 +12,26 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// Workflow model properties. - public partial class WorkflowModelProperties + public partial class DataReplicationWorkflowProperties { - /// Initializes a new instance of WorkflowModelProperties. + /// Initializes a new instance of DataReplicationWorkflowProperties. /// /// Workflow model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// /// is null. - internal WorkflowModelProperties(WorkflowModelCustomProperties customProperties) + internal DataReplicationWorkflowProperties(WorkflowModelCustomProperties customProperties) { Argument.AssertNotNull(customProperties, nameof(customProperties)); AllowedActions = new ChangeTrackingList(); - Tasks = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); + Tasks = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); CustomProperties = customProperties; } - /// Initializes a new instance of WorkflowModelProperties. + /// Initializes a new instance of DataReplicationWorkflowProperties. /// Gets or sets the friendly display name. /// Gets or sets the workflow state. /// Gets or sets the start time. @@ -53,7 +53,7 @@ internal WorkflowModelProperties(WorkflowModelCustomProperties customProperties) /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - internal WorkflowModelProperties(string displayName, WorkflowState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, string objectId, string objectName, string objectInternalId, string objectInternalName, WorkflowObjectType? objectType, string replicationProviderId, string sourceFabricProviderId, string targetFabricProviderId, IReadOnlyList allowedActions, string activityId, IReadOnlyList tasks, IReadOnlyList errors, WorkflowModelCustomProperties customProperties) + internal DataReplicationWorkflowProperties(string displayName, DataReplicationWorkflowState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, string objectId, string objectName, string objectInternalId, string objectInternalName, WorkflowObjectType? objectType, string replicationProviderId, string sourceFabricProviderId, string targetFabricProviderId, IReadOnlyList allowedActions, string activityId, IReadOnlyList tasks, IReadOnlyList errors, WorkflowModelCustomProperties customProperties) { DisplayName = displayName; State = state; @@ -77,7 +77,7 @@ internal WorkflowModelProperties(string displayName, WorkflowState? state, DateT /// Gets or sets the friendly display name. public string DisplayName { get; } /// Gets or sets the workflow state. - public WorkflowState? State { get; } + public DataReplicationWorkflowState? State { get; } /// Gets or sets the start time. public DateTimeOffset? StartOn { get; } /// Gets or sets the end time. @@ -103,9 +103,9 @@ internal WorkflowModelProperties(string displayName, WorkflowState? state, DateT /// Gets or sets the workflow activity id. public string ActivityId { get; } /// Gets or sets the list of tasks. - public IReadOnlyList Tasks { get; } + public IReadOnlyList Tasks { get; } /// Gets or sets the list of errors. - public IReadOnlyList Errors { get; } + public IReadOnlyList Errors { get; } /// /// Workflow model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowState.cs new file mode 100644 index 000000000000..bad418c9c9a5 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationWorkflowState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the workflow state. + public readonly partial struct DataReplicationWorkflowState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationWorkflowState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string StartedValue = "Started"; + private const string CancellingValue = "Cancelling"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string CompletedWithInformationValue = "CompletedWithInformation"; + private const string CompletedWithWarningsValue = "CompletedWithWarnings"; + private const string CompletedWithErrorsValue = "CompletedWithErrors"; + + /// Pending. + public static DataReplicationWorkflowState Pending { get; } = new DataReplicationWorkflowState(PendingValue); + /// Started. + public static DataReplicationWorkflowState Started { get; } = new DataReplicationWorkflowState(StartedValue); + /// Cancelling. + public static DataReplicationWorkflowState Cancelling { get; } = new DataReplicationWorkflowState(CancellingValue); + /// Succeeded. + public static DataReplicationWorkflowState Succeeded { get; } = new DataReplicationWorkflowState(SucceededValue); + /// Failed. + public static DataReplicationWorkflowState Failed { get; } = new DataReplicationWorkflowState(FailedValue); + /// Cancelled. + public static DataReplicationWorkflowState Cancelled { get; } = new DataReplicationWorkflowState(CancelledValue); + /// CompletedWithInformation. + public static DataReplicationWorkflowState CompletedWithInformation { get; } = new DataReplicationWorkflowState(CompletedWithInformationValue); + /// CompletedWithWarnings. + public static DataReplicationWorkflowState CompletedWithWarnings { get; } = new DataReplicationWorkflowState(CompletedWithWarningsValue); + /// CompletedWithErrors. + public static DataReplicationWorkflowState CompletedWithErrors { get; } = new DataReplicationWorkflowState(CompletedWithErrorsValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationWorkflowState left, DataReplicationWorkflowState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationWorkflowState left, DataReplicationWorkflowState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DataReplicationWorkflowState(string value) => new DataReplicationWorkflowState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationWorkflowState other && Equals(other); + /// + public bool Equals(DataReplicationWorkflowState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs index e85e838e008b..bef4433732c4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.Serialization.cs @@ -23,7 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(DeploymentPreflightResourceType)) { writer.WritePropertyName("type"u8); - writer.WriteStringValue(DeploymentPreflightResourceType); + writer.WriteStringValue(DeploymentPreflightResourceType.Value); } if (Optional.IsDefined(Location)) { @@ -45,7 +45,7 @@ internal static DeploymentPreflightResource DeserializeDeploymentPreflightResour return null; } Optional name = default; - Optional type = default; + Optional type = default; Optional location = default; Optional apiVersion = default; foreach (var property in element.EnumerateObject()) @@ -57,7 +57,11 @@ internal static DeploymentPreflightResource DeserializeDeploymentPreflightResour } if (property.NameEquals("type"u8)) { - type = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ResourceType(property.Value.GetString()); continue; } if (property.NameEquals("location"u8)) @@ -75,7 +79,7 @@ internal static DeploymentPreflightResource DeserializeDeploymentPreflightResour continue; } } - return new DeploymentPreflightResource(name.Value, type.Value, Optional.ToNullable(location), apiVersion.Value); + return new DeploymentPreflightResource(name.Value, Optional.ToNullable(type), Optional.ToNullable(location), apiVersion.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs index 22851bccd038..eced01b5f2b9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResource.cs @@ -22,7 +22,7 @@ public DeploymentPreflightResource() /// Gets or sets the resource type. /// Gets or sets the location of the resource. /// Gets or sets the Api version. - internal DeploymentPreflightResource(string name, string deploymentPreflightResourceType, AzureLocation? location, string apiVersion) + internal DeploymentPreflightResource(string name, ResourceType? deploymentPreflightResourceType, AzureLocation? location, string apiVersion) { Name = name; DeploymentPreflightResourceType = deploymentPreflightResourceType; @@ -33,7 +33,7 @@ internal DeploymentPreflightResource(string name, string deploymentPreflightReso /// Gets or sets the resource name. public string Name { get; set; } /// Gets or sets the resource type. - public string DeploymentPreflightResourceType { get; set; } + public ResourceType? DeploymentPreflightResourceType { get; set; } /// Gets or sets the location of the resource. public AzureLocation? Location { get; set; } /// Gets or sets the Api version. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs index 0c03b5e6fb6c..a50c48a55706 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.Serialization.cs @@ -30,6 +30,7 @@ internal static DraModelCustomProperties DeserializeDraModelCustomProperties(Jso { switch (discriminator.GetString()) { + case "DraModelCustomProperties": return GeneralDraModelCustomProperties.DeserializeGeneralDraModelCustomProperties(element); case "VMware": return VMwareDraModelCustomProperties.DeserializeVMwareDraModelCustomProperties(element); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs index faa16a662a63..b13e5ad3d3a6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DraModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Dra model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include and . /// public abstract partial class DraModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs index ae8680e79743..96b5f19544c6 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.Serialization.cs @@ -21,7 +21,7 @@ internal static EventModelCustomProperties DeserializeEventModelCustomProperties { switch (discriminator.GetString()) { - case "HyperVToAzStackHCI": return HyperVToAzStackHCIEventModelCustomProperties.DeserializeHyperVToAzStackHCIEventModelCustomProperties(element); + case "HyperVToAzStackHCI": return HyperVToAzStackHciEventModelCustomProperties.DeserializeHyperVToAzStackHciEventModelCustomProperties(element); } } return UnknownEventModelCustomProperties.DeserializeUnknownEventModelCustomProperties(element); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs index cffa059fb283..d7e708a77f12 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Event model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// public abstract partial class EventModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs index a01e29944ac5..764dc931068c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.Serialization.cs @@ -30,7 +30,8 @@ internal static FabricModelCustomProperties DeserializeFabricModelCustomProperti { switch (discriminator.GetString()) { - case "AzStackHCI": return AzStackHCIFabricModelCustomProperties.DeserializeAzStackHCIFabricModelCustomProperties(element); + case "AzStackHCI": return AzStackHciFabricModelCustomProperties.DeserializeAzStackHciFabricModelCustomProperties(element); + case "FabricModelCustomProperties": return GeneralFabricModelCustomProperties.DeserializeGeneralFabricModelCustomProperties(element); case "HyperVMigrate": return HyperVMigrateFabricModelCustomProperties.DeserializeHyperVMigrateFabricModelCustomProperties(element); case "VMwareMigrate": return VMwareMigrateFabricModelCustomProperties.DeserializeVMwareMigrateFabricModelCustomProperties(element); } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs index b2ebe88811fb..d5f1e9ab4fcf 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Fabric model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The available derived classes include , , and . /// public abstract partial class FabricModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..9bba016751d5 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class GeneralDraModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static GeneralDraModelCustomProperties DeserializeGeneralDraModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new GeneralDraModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.cs new file mode 100644 index 000000000000..5adc113dbd83 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralDraModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// General DRA model custom properties. + public partial class GeneralDraModelCustomProperties : DraModelCustomProperties + { + /// Initializes a new instance of GeneralDraModelCustomProperties. + public GeneralDraModelCustomProperties() + { + InstanceType = "DraModelCustomProperties"; + } + + /// Initializes a new instance of GeneralDraModelCustomProperties. + /// Gets or sets the instance type. + internal GeneralDraModelCustomProperties(string instanceType) : base(instanceType) + { + InstanceType = instanceType ?? "DraModelCustomProperties"; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..727e52449549 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class GeneralFabricModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static GeneralFabricModelCustomProperties DeserializeGeneralFabricModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new GeneralFabricModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.cs new file mode 100644 index 000000000000..9029d9e341d6 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralFabricModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// General fabric model custom properties. + public partial class GeneralFabricModelCustomProperties : FabricModelCustomProperties + { + /// Initializes a new instance of GeneralFabricModelCustomProperties. + public GeneralFabricModelCustomProperties() + { + InstanceType = "FabricModelCustomProperties"; + } + + /// Initializes a new instance of GeneralFabricModelCustomProperties. + /// Gets or sets the instance type. + internal GeneralFabricModelCustomProperties(string instanceType) : base(instanceType) + { + InstanceType = instanceType ?? "FabricModelCustomProperties"; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..b72f28c2ca45 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class GeneralPlannedFailoverModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static GeneralPlannedFailoverModelCustomProperties DeserializeGeneralPlannedFailoverModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new GeneralPlannedFailoverModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.cs new file mode 100644 index 000000000000..f866cdb6e0a3 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPlannedFailoverModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// General planned failover model custom properties. + public partial class GeneralPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties + { + /// Initializes a new instance of GeneralPlannedFailoverModelCustomProperties. + public GeneralPlannedFailoverModelCustomProperties() + { + InstanceType = "PlannedFailoverModelCustomProperties"; + } + + /// Initializes a new instance of GeneralPlannedFailoverModelCustomProperties. + /// Gets or sets the instance type. + internal GeneralPlannedFailoverModelCustomProperties(string instanceType) : base(instanceType) + { + InstanceType = instanceType ?? "PlannedFailoverModelCustomProperties"; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..bf7dd2a9c03d --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class GeneralPolicyModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static GeneralPolicyModelCustomProperties DeserializeGeneralPolicyModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new GeneralPolicyModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.cs new file mode 100644 index 000000000000..aef17e83507f --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralPolicyModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// General Policy model custom properties. + public partial class GeneralPolicyModelCustomProperties : PolicyModelCustomProperties + { + /// Initializes a new instance of GeneralPolicyModelCustomProperties. + public GeneralPolicyModelCustomProperties() + { + InstanceType = "PolicyModelCustomProperties"; + } + + /// Initializes a new instance of GeneralPolicyModelCustomProperties. + /// Gets or sets the instance type. + internal GeneralPolicyModelCustomProperties(string instanceType) : base(instanceType) + { + InstanceType = instanceType ?? "PolicyModelCustomProperties"; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..e7ef91c51471 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class GeneralProtectedItemModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static GeneralProtectedItemModelCustomProperties DeserializeGeneralProtectedItemModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new GeneralProtectedItemModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.cs new file mode 100644 index 000000000000..4f697a6364db --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralProtectedItemModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// General Protected item model custom properties. + public partial class GeneralProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties + { + /// Initializes a new instance of GeneralProtectedItemModelCustomProperties. + public GeneralProtectedItemModelCustomProperties() + { + InstanceType = "ProtectedItemModelCustomProperties"; + } + + /// Initializes a new instance of GeneralProtectedItemModelCustomProperties. + /// Gets or sets the instance type. + internal GeneralProtectedItemModelCustomProperties(string instanceType) : base(instanceType) + { + InstanceType = instanceType ?? "ProtectedItemModelCustomProperties"; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.Serialization.cs new file mode 100644 index 000000000000..e0af8ed36465 --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class GeneralReplicationExtensionModelCustomProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + writer.WriteEndObject(); + } + + internal static GeneralReplicationExtensionModelCustomProperties DeserializeGeneralReplicationExtensionModelCustomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + } + return new GeneralReplicationExtensionModelCustomProperties(instanceType); + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.cs new file mode 100644 index 000000000000..8bce73013a9e --- /dev/null +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GeneralReplicationExtensionModelCustomProperties.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// General Replication extension model custom properties. + public partial class GeneralReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties + { + /// Initializes a new instance of GeneralReplicationExtensionModelCustomProperties. + public GeneralReplicationExtensionModelCustomProperties() + { + InstanceType = "ReplicationExtensionModelCustomProperties"; + } + + /// Initializes a new instance of GeneralReplicationExtensionModelCustomProperties. + /// Gets or sets the instance type. + internal GeneralReplicationExtensionModelCustomProperties(string instanceType) : base(instanceType) + { + InstanceType = instanceType ?? "ReplicationExtensionModelCustomProperties"; + } + } +} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs deleted file mode 100644 index 3b93764cfe8a..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HealthStatus.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the fabric health. - public readonly partial struct HealthStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HealthStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NormalValue = "Normal"; - private const string WarningValue = "Warning"; - private const string CriticalValue = "Critical"; - - /// Normal. - public static HealthStatus Normal { get; } = new HealthStatus(NormalValue); - /// Warning. - public static HealthStatus Warning { get; } = new HealthStatus(WarningValue); - /// Critical. - public static HealthStatus Critical { get; } = new HealthStatus(CriticalValue); - /// Determines if two values are the same. - public static bool operator ==(HealthStatus left, HealthStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HealthStatus left, HealthStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HealthStatus(string value) => new HealthStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HealthStatus other && Equals(other); - /// - public bool Equals(HealthStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs index a6db3d0d6b6c..5a8b43a9ab1c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.Serialization.cs @@ -31,22 +31,26 @@ internal static HyperVMigrateFabricModelCustomProperties DeserializeHyperVMigrat { return null; } - string hyperVSiteId = default; - Optional fabricResourceId = default; + ResourceIdentifier hyperVSiteId = default; + Optional fabricResourceId = default; Optional fabricContainerId = default; - string migrationSolutionId = default; + ResourceIdentifier migrationSolutionId = default; Optional migrationHubUri = default; string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("hyperVSiteId"u8)) { - hyperVSiteId = property.Value.GetString(); + hyperVSiteId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("fabricResourceId"u8)) { - fabricResourceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("fabricContainerId"u8)) @@ -56,7 +60,7 @@ internal static HyperVMigrateFabricModelCustomProperties DeserializeHyperVMigrat } if (property.NameEquals("migrationSolutionId"u8)) { - migrationSolutionId = property.Value.GetString(); + migrationSolutionId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("migrationHubUri"u8)) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs index e078da0aa16b..01a0fabf603b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricModelCustomProperties.cs @@ -17,7 +17,7 @@ public partial class HyperVMigrateFabricModelCustomProperties : FabricModelCusto /// Gets or sets the ARM Id of the HyperV site. /// Gets or sets the migration solution ARM Id. /// or is null. - public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migrationSolutionId) + public HyperVMigrateFabricModelCustomProperties(ResourceIdentifier hyperVSiteId, ResourceIdentifier migrationSolutionId) { Argument.AssertNotNull(hyperVSiteId, nameof(hyperVSiteId)); Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); @@ -34,7 +34,7 @@ public HyperVMigrateFabricModelCustomProperties(string hyperVSiteId, string migr /// Gets or sets the fabric container Id. /// Gets or sets the migration solution ARM Id. /// Gets or sets the migration hub Uri. - internal HyperVMigrateFabricModelCustomProperties(string instanceType, string hyperVSiteId, string fabricResourceId, string fabricContainerId, string migrationSolutionId, Uri migrationHubUri) : base(instanceType) + internal HyperVMigrateFabricModelCustomProperties(string instanceType, ResourceIdentifier hyperVSiteId, ResourceIdentifier fabricResourceId, string fabricContainerId, ResourceIdentifier migrationSolutionId, Uri migrationHubUri) : base(instanceType) { HyperVSiteId = hyperVSiteId; FabricResourceId = fabricResourceId; @@ -45,13 +45,13 @@ internal HyperVMigrateFabricModelCustomProperties(string instanceType, string hy } /// Gets or sets the ARM Id of the HyperV site. - public string HyperVSiteId { get; set; } + public ResourceIdentifier HyperVSiteId { get; set; } /// Gets or sets the fabric resource Id. - public string FabricResourceId { get; } + public ResourceIdentifier FabricResourceId { get; } /// Gets or sets the fabric container Id. public string FabricContainerId { get; } /// Gets or sets the migration solution ARM Id. - public string MigrationSolutionId { get; set; } + public ResourceIdentifier MigrationSolutionId { get; set; } /// Gets or sets the migration hub Uri. public Uri MigrationHubUri { get; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.Serialization.cs similarity index 84% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.Serialization.cs index b8491d26c816..859dce241069 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCIDiskInput : IUtf8JsonSerializable + public partial class HyperVToAzStackHciDiskInput : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -36,14 +36,14 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VMwareToAzStackHCIDiskInput DeserializeVMwareToAzStackHCIDiskInput(JsonElement element) + internal static HyperVToAzStackHciDiskInput DeserializeHyperVToAzStackHciDiskInput(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } string diskId = default; - Optional storageContainerId = default; + Optional storageContainerId = default; Optional isDynamic = default; long diskSizeGB = default; string diskFileFormat = default; @@ -57,7 +57,11 @@ internal static VMwareToAzStackHCIDiskInput DeserializeVMwareToAzStackHCIDiskInp } if (property.NameEquals("storageContainerId"u8)) { - storageContainerId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageContainerId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("isDynamic"u8)) @@ -85,7 +89,7 @@ internal static VMwareToAzStackHCIDiskInput DeserializeVMwareToAzStackHCIDiskInp continue; } } - return new VMwareToAzStackHCIDiskInput(diskId, storageContainerId.Value, Optional.ToNullable(isDynamic), diskSizeGB, diskFileFormat, isOSDisk); + return new HyperVToAzStackHciDiskInput(diskId, storageContainerId.Value, Optional.ToNullable(isDynamic), diskSizeGB, diskFileFormat, isOSDisk); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.cs similarity index 87% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.cs index c7d886cea5b1..f4e74f1ebe27 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperVToAzStack disk input. - public partial class HyperVToAzStackHCIDiskInput + public partial class HyperVToAzStackHciDiskInput { - /// Initializes a new instance of HyperVToAzStackHCIDiskInput. + /// Initializes a new instance of HyperVToAzStackHciDiskInput. /// Gets or sets the disk Id. /// Gets or sets the disk size in GB. /// Gets or sets the type of the virtual hard disk, vhd or vhdx. /// Gets or sets a value indicating whether disk is os disk. /// or is null. - public HyperVToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) + public HyperVToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { Argument.AssertNotNull(diskId, nameof(diskId)); Argument.AssertNotNull(diskFileFormat, nameof(diskFileFormat)); @@ -30,7 +30,7 @@ public HyperVToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFi IsOSDisk = isOSDisk; } - /// Initializes a new instance of HyperVToAzStackHCIDiskInput. + /// Initializes a new instance of HyperVToAzStackHciDiskInput. /// Gets or sets the disk Id. /// Gets or sets the target storage account ARM Id. /// @@ -40,7 +40,7 @@ public HyperVToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFi /// Gets or sets the disk size in GB. /// Gets or sets the type of the virtual hard disk, vhd or vhdx. /// Gets or sets a value indicating whether disk is os disk. - internal HyperVToAzStackHCIDiskInput(string diskId, string storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk) + internal HyperVToAzStackHciDiskInput(string diskId, ResourceIdentifier storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk) { DiskId = diskId; StorageContainerId = storageContainerId; @@ -53,7 +53,7 @@ internal HyperVToAzStackHCIDiskInput(string diskId, string storageContainerId, b /// Gets or sets the disk Id. public string DiskId { get; set; } /// Gets or sets the target storage account ARM Id. - public string StorageContainerId { get; set; } + public ResourceIdentifier StorageContainerId { get; set; } /// /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard /// disk. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventModelCustomProperties.Serialization.cs similarity index 89% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventModelCustomProperties.Serialization.cs index ecf8e697ec0a..e4747b0a34fc 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventModelCustomProperties.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIEventModelCustomProperties + public partial class HyperVToAzStackHciEventModelCustomProperties { - internal static HyperVToAzStackHCIEventModelCustomProperties DeserializeHyperVToAzStackHCIEventModelCustomProperties(JsonElement element) + internal static HyperVToAzStackHciEventModelCustomProperties DeserializeHyperVToAzStackHciEventModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -57,7 +57,7 @@ internal static HyperVToAzStackHCIEventModelCustomProperties DeserializeHyperVTo continue; } } - return new HyperVToAzStackHCIEventModelCustomProperties(instanceType, eventSourceFriendlyName.Value, protectedItemFriendlyName.Value, sourceApplianceName.Value, targetApplianceName.Value, serverType.Value); + return new HyperVToAzStackHciEventModelCustomProperties(instanceType, eventSourceFriendlyName.Value, protectedItemFriendlyName.Value, sourceApplianceName.Value, targetApplianceName.Value, serverType.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventModelCustomProperties.cs similarity index 90% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventModelCustomProperties.cs index 841803ad0b89..b52350893cd5 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIEventModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventModelCustomProperties.cs @@ -12,22 +12,22 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// details for events of type DataContract.HealthEvents.HealthEventType.ProtectedItemHealth and /// DataContract.HealthEvents.HealthEventType.AgentHealth. /// - public partial class HyperVToAzStackHCIEventModelCustomProperties : EventModelCustomProperties + public partial class HyperVToAzStackHciEventModelCustomProperties : EventModelCustomProperties { - /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. - internal HyperVToAzStackHCIEventModelCustomProperties() + /// Initializes a new instance of HyperVToAzStackHciEventModelCustomProperties. + internal HyperVToAzStackHciEventModelCustomProperties() { InstanceType = "HyperVToAzStackHCI"; } - /// Initializes a new instance of HyperVToAzStackHCIEventModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciEventModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the friendly name of the source which has raised this health event. /// Gets or sets the protected item friendly name. /// Gets or sets the source appliance name. /// Gets or sets the source target name. /// Gets or sets the server type. - internal HyperVToAzStackHCIEventModelCustomProperties(string instanceType, string eventSourceFriendlyName, string protectedItemFriendlyName, string sourceApplianceName, string targetApplianceName, string serverType) : base(instanceType) + internal HyperVToAzStackHciEventModelCustomProperties(string instanceType, string eventSourceFriendlyName, string protectedItemFriendlyName, string sourceApplianceName, string targetApplianceName, string serverType) : base(instanceType) { EventSourceFriendlyName = eventSourceFriendlyName; ProtectedItemFriendlyName = protectedItemFriendlyName; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.Serialization.cs similarity index 91% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.Serialization.cs index 8c910bdf319e..5df44e2e52ee 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCINicInput : IUtf8JsonSerializable + public partial class HyperVToAzStackHciNicInput : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,7 +26,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static HyperVToAzStackHCINicInput DeserializeHyperVToAzStackHCINicInput(JsonElement element) + internal static HyperVToAzStackHciNicInput DeserializeHyperVToAzStackHciNicInput(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -65,7 +65,7 @@ internal static HyperVToAzStackHCINicInput DeserializeHyperVToAzStackHCINicInput continue; } } - return new HyperVToAzStackHCINicInput(nicId, networkName.Value, targetNetworkId, testNetworkId, selectionTypeForFailover); + return new HyperVToAzStackHciNicInput(nicId, networkName.Value, targetNetworkId, testNetworkId, selectionTypeForFailover); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.cs similarity index 92% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.cs index 7dcc194a0b79..90d9f0516902 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCINicInput.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperVToAzStackHCI NIC properties. - public partial class HyperVToAzStackHCINicInput + public partial class HyperVToAzStackHciNicInput { - /// Initializes a new instance of HyperVToAzStackHCINicInput. + /// Initializes a new instance of HyperVToAzStackHciNicInput. /// Gets or sets the NIC Id. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. /// , or is null. - public HyperVToAzStackHCINicInput(string nicId, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + public HyperVToAzStackHciNicInput(string nicId, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) { Argument.AssertNotNull(nicId, nameof(nicId)); Argument.AssertNotNull(targetNetworkId, nameof(targetNetworkId)); @@ -31,13 +31,13 @@ public HyperVToAzStackHCINicInput(string nicId, string targetNetworkId, string t SelectionTypeForFailover = selectionTypeForFailover; } - /// Initializes a new instance of HyperVToAzStackHCINicInput. + /// Initializes a new instance of HyperVToAzStackHciNicInput. /// Gets or sets the NIC Id. /// Gets or sets the network name. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - internal HyperVToAzStackHCINicInput(string nicId, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + internal HyperVToAzStackHciNicInput(string nicId, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) { NicId = nicId; NetworkName = networkName; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs similarity index 85% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs index 7fca915da158..d7ad4f435027 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIPlannedFailoverModelCustomProperties : IUtf8JsonSerializable + public partial class HyperVToAzStackHciPlannedFailoverModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,7 +22,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static HyperVToAzStackHCIPlannedFailoverModelCustomProperties DeserializeHyperVToAzStackHCIPlannedFailoverModelCustomProperties(JsonElement element) + internal static HyperVToAzStackHciPlannedFailoverModelCustomProperties DeserializeHyperVToAzStackHciPlannedFailoverModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -43,7 +43,7 @@ internal static HyperVToAzStackHCIPlannedFailoverModelCustomProperties Deseriali continue; } } - return new HyperVToAzStackHCIPlannedFailoverModelCustomProperties(instanceType, shutdownSourceVm); + return new HyperVToAzStackHciPlannedFailoverModelCustomProperties(instanceType, shutdownSourceVm); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverModelCustomProperties.cs similarity index 81% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverModelCustomProperties.cs index 7f0b773474ff..ad74861ddf35 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPlannedFailoverModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverModelCustomProperties.cs @@ -8,20 +8,20 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperV to AzStackHCI planned failover model custom properties. - public partial class HyperVToAzStackHCIPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties + public partial class HyperVToAzStackHciPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties { - /// Initializes a new instance of HyperVToAzStackHCIPlannedFailoverModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciPlannedFailoverModelCustomProperties. /// Gets or sets a value indicating whether VM needs to be shut down. - public HyperVToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) + public HyperVToAzStackHciPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { ShutdownSourceVm = shutdownSourceVm; InstanceType = "HyperVToAzStackHCI"; } - /// Initializes a new instance of HyperVToAzStackHCIPlannedFailoverModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciPlannedFailoverModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets a value indicating whether VM needs to be shut down. - internal HyperVToAzStackHCIPlannedFailoverModelCustomProperties(string instanceType, bool shutdownSourceVm) : base(instanceType) + internal HyperVToAzStackHciPlannedFailoverModelCustomProperties(string instanceType, bool shutdownSourceVm) : base(instanceType) { ShutdownSourceVm = shutdownSourceVm; InstanceType = instanceType ?? "HyperVToAzStackHCI"; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyModelCustomProperties.Serialization.cs similarity index 90% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyModelCustomProperties.Serialization.cs index 511a366ac0d2..98c4b07b25e0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyModelCustomProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIPolicyModelCustomProperties : IUtf8JsonSerializable + public partial class HyperVToAzStackHciPolicyModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,7 +26,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static HyperVToAzStackHCIPolicyModelCustomProperties DeserializeHyperVToAzStackHCIPolicyModelCustomProperties(JsonElement element) + internal static HyperVToAzStackHciPolicyModelCustomProperties DeserializeHyperVToAzStackHciPolicyModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -59,7 +59,7 @@ internal static HyperVToAzStackHCIPolicyModelCustomProperties DeserializeHyperVT continue; } } - return new HyperVToAzStackHCIPolicyModelCustomProperties(instanceType, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); + return new HyperVToAzStackHciPolicyModelCustomProperties(instanceType, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyModelCustomProperties.cs similarity index 91% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyModelCustomProperties.cs index 40f0edc7614f..6784ce452d5f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIPolicyModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyModelCustomProperties.cs @@ -8,16 +8,16 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperV To AzStackHCI Policy model custom properties. - public partial class HyperVToAzStackHCIPolicyModelCustomProperties : PolicyModelCustomProperties + public partial class HyperVToAzStackHciPolicyModelCustomProperties : PolicyModelCustomProperties { - /// Initializes a new instance of HyperVToAzStackHCIPolicyModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciPolicyModelCustomProperties. /// /// Gets or sets the duration in minutes until which the recovery points need to be /// stored. /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// Gets or sets the app consistent snapshot frequency (in minutes). - public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) + public HyperVToAzStackHciPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; @@ -25,7 +25,7 @@ public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM InstanceType = "HyperVToAzStackHCI"; } - /// Initializes a new instance of HyperVToAzStackHCIPolicyModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciPolicyModelCustomProperties. /// Gets or sets the instance type. /// /// Gets or sets the duration in minutes until which the recovery points need to be @@ -33,7 +33,7 @@ public HyperVToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// Gets or sets the app consistent snapshot frequency (in minutes). - internal HyperVToAzStackHCIPolicyModelCustomProperties(string instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) + internal HyperVToAzStackHciPolicyModelCustomProperties(string instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) { RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.Serialization.cs similarity index 87% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.Serialization.cs index 7de80043d7df..df4e73ab211f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.Serialization.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCIProtectedDiskProperties + public partial class HyperVToAzStackHciProtectedDiskProperties { - internal static VMwareToAzStackHCIProtectedDiskProperties DeserializeVMwareToAzStackHCIProtectedDiskProperties(JsonElement element) + internal static HyperVToAzStackHciProtectedDiskProperties DeserializeHyperVToAzStackHciProtectedDiskProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional storageContainerId = default; + Optional storageContainerId = default; Optional storageContainerLocalPath = default; Optional sourceDiskId = default; Optional sourceDiskName = default; @@ -33,7 +33,11 @@ internal static VMwareToAzStackHCIProtectedDiskProperties DeserializeVMwareToAzS { if (property.NameEquals("storageContainerId"u8)) { - storageContainerId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageContainerId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("storageContainerLocalPath"u8)) @@ -99,7 +103,7 @@ internal static VMwareToAzStackHCIProtectedDiskProperties DeserializeVMwareToAzS continue; } } - return new VMwareToAzStackHCIProtectedDiskProperties(storageContainerId.Value, storageContainerLocalPath.Value, sourceDiskId.Value, sourceDiskName.Value, seedDiskName.Value, testMigrateDiskName.Value, migrateDiskName.Value, Optional.ToNullable(isOSDisk), Optional.ToNullable(capacityInBytes), Optional.ToNullable(isDynamic), diskType.Value); + return new HyperVToAzStackHciProtectedDiskProperties(storageContainerId.Value, storageContainerLocalPath.Value, sourceDiskId.Value, sourceDiskName.Value, seedDiskName.Value, testMigrateDiskName.Value, migrateDiskName.Value, Optional.ToNullable(isOSDisk), Optional.ToNullable(capacityInBytes), Optional.ToNullable(isDynamic), diskType.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.cs similarity index 84% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.cs index 0c61f57100f9..fd87e0eaa1f9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.cs @@ -5,17 +5,19 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperVToAzStackHCI protected disk properties. - public partial class HyperVToAzStackHCIProtectedDiskProperties + public partial class HyperVToAzStackHciProtectedDiskProperties { - /// Initializes a new instance of HyperVToAzStackHCIProtectedDiskProperties. - internal HyperVToAzStackHCIProtectedDiskProperties() + /// Initializes a new instance of HyperVToAzStackHciProtectedDiskProperties. + internal HyperVToAzStackHciProtectedDiskProperties() { } - /// Initializes a new instance of HyperVToAzStackHCIProtectedDiskProperties. + /// Initializes a new instance of HyperVToAzStackHciProtectedDiskProperties. /// Gets or sets the ARM Id of the storage container. /// Gets or sets the local path of the storage container. /// Gets or sets the source disk Id. @@ -30,7 +32,7 @@ internal HyperVToAzStackHCIProtectedDiskProperties() /// disk. /// /// Gets or sets the disk type. - internal HyperVToAzStackHCIProtectedDiskProperties(string storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType) + internal HyperVToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType) { StorageContainerId = storageContainerId; StorageContainerLocalPath = storageContainerLocalPath; @@ -46,7 +48,7 @@ internal HyperVToAzStackHCIProtectedDiskProperties(string storageContainerId, st } /// Gets or sets the ARM Id of the storage container. - public string StorageContainerId { get; } + public ResourceIdentifier StorageContainerId { get; } /// Gets or sets the local path of the storage container. public string StorageContainerLocalPath { get; } /// Gets or sets the source disk Id. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemModelCustomProperties.Serialization.cs similarity index 88% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemModelCustomProperties.Serialization.cs index a12b46c84bdf..1c1f089f1b13 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemModelCustomProperties.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIProtectedItemModelCustomProperties : IUtf8JsonSerializable + public partial class HyperVToAzStackHciProtectedItemModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -91,25 +91,25 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static HyperVToAzStackHCIProtectedItemModelCustomProperties DeserializeHyperVToAzStackHCIProtectedItemModelCustomProperties(JsonElement element) + internal static HyperVToAzStackHciProtectedItemModelCustomProperties DeserializeHyperVToAzStackHciProtectedItemModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } Optional activeLocation = default; - string targetHciClusterId = default; - string targetArcClusterCustomLocationId = default; + ResourceIdentifier targetHciClusterId = default; + ResourceIdentifier targetArcClusterCustomLocationId = default; Optional targetAzStackHciClusterName = default; - string fabricDiscoveryMachineId = default; - IList disksToInclude = default; - IList nicsToInclude = default; + ResourceIdentifier fabricDiscoveryMachineId = default; + IList disksToInclude = default; + IList nicsToInclude = default; Optional sourceVmName = default; Optional sourceCpuCores = default; Optional sourceMemoryInMegaBytes = default; Optional targetVmName = default; - string targetResourceGroupId = default; - string storageContainerId = default; + ResourceIdentifier targetResourceGroupId = default; + ResourceIdentifier storageContainerId = default; string hyperVGeneration = default; Optional targetNetworkId = default; Optional testNetworkId = default; @@ -132,8 +132,8 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize Optional lastRecoveryPointId = default; Optional initialReplicationProgressPercentage = default; Optional resyncProgressPercentage = default; - Optional> protectedDisks = default; - Optional> protectedNics = default; + Optional> protectedDisks = default; + Optional> protectedNics = default; Optional targetVmBiosId = default; Optional lastReplicationUpdateTime = default; string instanceType = default; @@ -150,12 +150,12 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("targetHciClusterId"u8)) { - targetHciClusterId = property.Value.GetString(); + targetHciClusterId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetArcClusterCustomLocationId"u8)) { - targetArcClusterCustomLocationId = property.Value.GetString(); + targetArcClusterCustomLocationId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetAzStackHciClusterName"u8)) @@ -165,25 +165,25 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("fabricDiscoveryMachineId"u8)) { - fabricDiscoveryMachineId = property.Value.GetString(); + fabricDiscoveryMachineId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("disksToInclude"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HyperVToAzStackHCIDiskInput.DeserializeHyperVToAzStackHCIDiskInput(item)); + array.Add(HyperVToAzStackHciDiskInput.DeserializeHyperVToAzStackHciDiskInput(item)); } disksToInclude = array; continue; } if (property.NameEquals("nicsToInclude"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HyperVToAzStackHCINicInput.DeserializeHyperVToAzStackHCINicInput(item)); + array.Add(HyperVToAzStackHciNicInput.DeserializeHyperVToAzStackHciNicInput(item)); } nicsToInclude = array; continue; @@ -218,12 +218,12 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("targetResourceGroupId"u8)) { - targetResourceGroupId = property.Value.GetString(); + targetResourceGroupId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("storageContainerId"u8)) { - storageContainerId = property.Value.GetString(); + storageContainerId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("hyperVGeneration"u8)) @@ -370,10 +370,10 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HyperVToAzStackHCIProtectedDiskProperties.DeserializeHyperVToAzStackHCIProtectedDiskProperties(item)); + array.Add(HyperVToAzStackHciProtectedDiskProperties.DeserializeHyperVToAzStackHciProtectedDiskProperties(item)); } protectedDisks = array; continue; @@ -384,10 +384,10 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(HyperVToAzStackHCIProtectedNicProperties.DeserializeHyperVToAzStackHCIProtectedNicProperties(item)); + array.Add(HyperVToAzStackHciProtectedNicProperties.DeserializeHyperVToAzStackHciProtectedNicProperties(item)); } protectedNics = array; continue; @@ -412,7 +412,7 @@ internal static HyperVToAzStackHCIProtectedItemModelCustomProperties Deserialize continue; } } - return new HyperVToAzStackHCIProtectedItemModelCustomProperties(instanceType, Optional.ToNullable(activeLocation), targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName.Value, fabricDiscoveryMachineId, disksToInclude, nicsToInclude, sourceVmName.Value, Optional.ToNullable(sourceCpuCores), Optional.ToNullable(sourceMemoryInMegaBytes), targetVmName.Value, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(targetCpuCores), Optional.ToNullable(isDynamicRam), dynamicMemoryConfig.Value, Optional.ToNullable(targetMemoryInMegaBytes), runAsAccountId, sourceDraName, targetDraName, sourceApplianceName.Value, targetApplianceName.Value, osType.Value, osName.Value, firmwareType.Value, targetLocation.Value, customLocationRegion, failoverRecoveryPointId.Value, Optional.ToNullable(lastRecoveryPointReceived), lastRecoveryPointId.Value, Optional.ToNullable(initialReplicationProgressPercentage), Optional.ToNullable(resyncProgressPercentage), Optional.ToList(protectedDisks), Optional.ToList(protectedNics), targetVmBiosId.Value, Optional.ToNullable(lastReplicationUpdateTime)); + return new HyperVToAzStackHciProtectedItemModelCustomProperties(instanceType, Optional.ToNullable(activeLocation), targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName.Value, fabricDiscoveryMachineId, disksToInclude, nicsToInclude, sourceVmName.Value, Optional.ToNullable(sourceCpuCores), Optional.ToNullable(sourceMemoryInMegaBytes), targetVmName.Value, targetResourceGroupId, storageContainerId, hyperVGeneration, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(targetCpuCores), Optional.ToNullable(isDynamicRam), dynamicMemoryConfig.Value, Optional.ToNullable(targetMemoryInMegaBytes), runAsAccountId, sourceDraName, targetDraName, sourceApplianceName.Value, targetApplianceName.Value, osType.Value, osName.Value, firmwareType.Value, targetLocation.Value, customLocationRegion, failoverRecoveryPointId.Value, Optional.ToNullable(lastRecoveryPointReceived), lastRecoveryPointId.Value, Optional.ToNullable(initialReplicationProgressPercentage), Optional.ToNullable(resyncProgressPercentage), Optional.ToList(protectedDisks), Optional.ToList(protectedNics), targetVmBiosId.Value, Optional.ToNullable(lastReplicationUpdateTime)); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemModelCustomProperties.cs similarity index 85% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemModelCustomProperties.cs index 772f6cd65948..2395ed308ebc 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedItemModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemModelCustomProperties.cs @@ -13,9 +13,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperV to AzStackHCI Protected item model custom properties. - public partial class HyperVToAzStackHCIProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties + public partial class HyperVToAzStackHciProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties { - /// Initializes a new instance of HyperVToAzStackHCIProtectedItemModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciProtectedItemModelCustomProperties. /// Gets or sets the Target HCI Cluster ARM Id. /// Gets or sets the Target Arc Cluster Custom Location ARM Id. /// Gets or sets the ARM Id of the discovered machine. @@ -29,7 +29,7 @@ public partial class HyperVToAzStackHCIProtectedItemModelCustomProperties : Prot /// Gets or sets the target DRA name. /// Gets or sets the location of Azure Arc HCI custom location resource. /// , , , , , , , , , , or is null. - public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string fabricDiscoveryMachineId, IEnumerable disksToInclude, IEnumerable nicsToInclude, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceDraName, string targetDraName, string customLocationRegion) + public HyperVToAzStackHciProtectedItemModelCustomProperties(ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, ResourceIdentifier fabricDiscoveryMachineId, IEnumerable disksToInclude, IEnumerable nicsToInclude, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceDraName, string targetDraName, string customLocationRegion) { Argument.AssertNotNull(targetHciClusterId, nameof(targetHciClusterId)); Argument.AssertNotNull(targetArcClusterCustomLocationId, nameof(targetArcClusterCustomLocationId)); @@ -56,12 +56,12 @@ public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus SourceDraName = sourceDraName; TargetDraName = targetDraName; CustomLocationRegion = customLocationRegion; - ProtectedDisks = new ChangeTrackingList(); - ProtectedNics = new ChangeTrackingList(); + ProtectedDisks = new ChangeTrackingList(); + ProtectedNics = new ChangeTrackingList(); InstanceType = "HyperVToAzStackHCI"; } - /// Initializes a new instance of HyperVToAzStackHCIProtectedItemModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciProtectedItemModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the location of the protected item. /// Gets or sets the Target HCI Cluster ARM Id. @@ -108,7 +108,7 @@ public HyperVToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus /// Gets or sets the VM NIC details. /// Gets or sets the BIOS Id of the target AzStackHCI VM. /// Gets or sets the latest timestamp that replication status is updated. - internal HyperVToAzStackHCIProtectedItemModelCustomProperties(string instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string fabricDiscoveryMachineId, IList disksToInclude, IList nicsToInclude, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string targetVmName, string targetResourceGroupId, string storageContainerId, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string osType, string osName, string firmwareType, string targetLocation, string customLocationRegion, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? resyncProgressPercentage, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) + internal HyperVToAzStackHciProtectedItemModelCustomProperties(string instanceType, ProtectedItemActiveLocation? activeLocation, ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, string targetAzStackHciClusterName, ResourceIdentifier fabricDiscoveryMachineId, IList disksToInclude, IList nicsToInclude, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string targetVmName, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageContainerId, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string osType, string osName, string firmwareType, string targetLocation, string customLocationRegion, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? resyncProgressPercentage, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) { ActiveLocation = activeLocation; TargetHciClusterId = targetHciClusterId; @@ -155,17 +155,17 @@ internal HyperVToAzStackHCIProtectedItemModelCustomProperties(string instanceTyp /// Gets or sets the location of the protected item. public ProtectedItemActiveLocation? ActiveLocation { get; } /// Gets or sets the Target HCI Cluster ARM Id. - public string TargetHciClusterId { get; set; } + public ResourceIdentifier TargetHciClusterId { get; set; } /// Gets or sets the Target Arc Cluster Custom Location ARM Id. - public string TargetArcClusterCustomLocationId { get; set; } + public ResourceIdentifier TargetArcClusterCustomLocationId { get; set; } /// Gets or sets the Target AzStackHCI cluster name. public string TargetAzStackHciClusterName { get; } /// Gets or sets the ARM Id of the discovered machine. - public string FabricDiscoveryMachineId { get; set; } + public ResourceIdentifier FabricDiscoveryMachineId { get; set; } /// Gets or sets the list of disks to replicate. - public IList DisksToInclude { get; } + public IList DisksToInclude { get; } /// Gets or sets the list of VM NIC to replicate. - public IList NicsToInclude { get; } + public IList NicsToInclude { get; } /// Gets or sets the source VM display name. public string SourceVmName { get; } /// Gets or sets the source VM CPU cores. @@ -175,9 +175,9 @@ internal HyperVToAzStackHCIProtectedItemModelCustomProperties(string instanceTyp /// Gets or sets the target VM display name. public string TargetVmName { get; set; } /// Gets or sets the target resource group ARM Id. - public string TargetResourceGroupId { get; set; } + public ResourceIdentifier TargetResourceGroupId { get; set; } /// Gets or sets the target storage container ARM Id. - public string StorageContainerId { get; set; } + public ResourceIdentifier StorageContainerId { get; set; } /// Gets or sets the hypervisor generation of the virtual machine. public string HyperVGeneration { get; set; } /// Gets or sets the target network Id within AzStackHCI Cluster. @@ -229,9 +229,9 @@ internal HyperVToAzStackHCIProtectedItemModelCustomProperties(string instanceTyp /// public int? ResyncProgressPercentage { get; } /// Gets or sets the list of protected disks. - public IReadOnlyList ProtectedDisks { get; } + public IReadOnlyList ProtectedDisks { get; } /// Gets or sets the VM NIC details. - public IReadOnlyList ProtectedNics { get; } + public IReadOnlyList ProtectedNics { get; } /// Gets or sets the BIOS Id of the target AzStackHCI VM. public string TargetVmBiosId { get; } /// Gets or sets the latest timestamp that replication status is updated. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.Serialization.cs similarity index 89% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.Serialization.cs index 538b20501b9f..ad46daa9fcf9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIProtectedNicProperties + public partial class HyperVToAzStackHciProtectedNicProperties { - internal static HyperVToAzStackHCIProtectedNicProperties DeserializeHyperVToAzStackHCIProtectedNicProperties(JsonElement element) + internal static HyperVToAzStackHciProtectedNicProperties DeserializeHyperVToAzStackHciProtectedNicProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -61,7 +61,7 @@ internal static HyperVToAzStackHCIProtectedNicProperties DeserializeHyperVToAzSt continue; } } - return new HyperVToAzStackHCIProtectedNicProperties(nicId.Value, macAddress.Value, networkName.Value, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(selectionTypeForFailover)); + return new HyperVToAzStackHciProtectedNicProperties(nicId.Value, macAddress.Value, networkName.Value, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(selectionTypeForFailover)); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.cs similarity index 88% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.cs index f45a66cbd0c2..c619accdd2a3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedNicProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.cs @@ -8,21 +8,21 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperVToAzStackHCI NIC properties. - public partial class HyperVToAzStackHCIProtectedNicProperties + public partial class HyperVToAzStackHciProtectedNicProperties { - /// Initializes a new instance of HyperVToAzStackHCIProtectedNicProperties. - internal HyperVToAzStackHCIProtectedNicProperties() + /// Initializes a new instance of HyperVToAzStackHciProtectedNicProperties. + internal HyperVToAzStackHciProtectedNicProperties() { } - /// Initializes a new instance of HyperVToAzStackHCIProtectedNicProperties. + /// Initializes a new instance of HyperVToAzStackHciProtectedNicProperties. /// Gets or sets the NIC Id. /// Gets or sets the NIC mac address. /// Gets or sets the network name. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - internal HyperVToAzStackHCIProtectedNicProperties(string nicId, string macAddress, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover) + internal HyperVToAzStackHciProtectedNicProperties(string nicId, string macAddress, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover) { NicId = nicId; MacAddress = macAddress; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointModelCustomProperties.Serialization.cs similarity index 85% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointModelCustomProperties.Serialization.cs index e7c3b29742d0..ec9fe5db6f4e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointModelCustomProperties.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIRecoveryPointModelCustomProperties + public partial class HyperVToAzStackHciRecoveryPointModelCustomProperties { - internal static HyperVToAzStackHCIRecoveryPointModelCustomProperties DeserializeHyperVToAzStackHCIRecoveryPointModelCustomProperties(JsonElement element) + internal static HyperVToAzStackHciRecoveryPointModelCustomProperties DeserializeHyperVToAzStackHciRecoveryPointModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -43,7 +43,7 @@ internal static HyperVToAzStackHCIRecoveryPointModelCustomProperties Deserialize continue; } } - return new HyperVToAzStackHCIRecoveryPointModelCustomProperties(instanceType, Optional.ToList(diskIds)); + return new HyperVToAzStackHciRecoveryPointModelCustomProperties(instanceType, Optional.ToList(diskIds)); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointModelCustomProperties.cs similarity index 79% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointModelCustomProperties.cs index 861b6ff3ca5c..f1503ee7017c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIRecoveryPointModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointModelCustomProperties.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperV to AzStackHCI recovery point model custom properties. - public partial class HyperVToAzStackHCIRecoveryPointModelCustomProperties : RecoveryPointModelCustomProperties + public partial class HyperVToAzStackHciRecoveryPointModelCustomProperties : RecoveryPointModelCustomProperties { - /// Initializes a new instance of HyperVToAzStackHCIRecoveryPointModelCustomProperties. - internal HyperVToAzStackHCIRecoveryPointModelCustomProperties() + /// Initializes a new instance of HyperVToAzStackHciRecoveryPointModelCustomProperties. + internal HyperVToAzStackHciRecoveryPointModelCustomProperties() { DiskIds = new ChangeTrackingList(); InstanceType = "HyperVToAzStackHCI"; } - /// Initializes a new instance of HyperVToAzStackHCIRecoveryPointModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciRecoveryPointModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the list of the disk Ids. - internal HyperVToAzStackHCIRecoveryPointModelCustomProperties(string instanceType, IReadOnlyList diskIds) : base(instanceType) + internal HyperVToAzStackHciRecoveryPointModelCustomProperties(string instanceType, IReadOnlyList diskIds) : base(instanceType) { DiskIds = diskIds; InstanceType = instanceType ?? "HyperVToAzStackHCI"; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs similarity index 84% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs index 3decef324f80..d3908b8c21cc 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIReplicationExtensionModelCustomProperties : IUtf8JsonSerializable + public partial class HyperVToAzStackHciReplicationExtensionModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -35,16 +35,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static HyperVToAzStackHCIReplicationExtensionModelCustomProperties DeserializeHyperVToAzStackHCIReplicationExtensionModelCustomProperties(JsonElement element) + internal static HyperVToAzStackHciReplicationExtensionModelCustomProperties DeserializeHyperVToAzStackHciReplicationExtensionModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - string hyperVFabricArmId = default; - Optional hyperVSiteId = default; - string azStackHciFabricArmId = default; - Optional azStackHciSiteId = default; + ResourceIdentifier hyperVFabricArmId = default; + Optional hyperVSiteId = default; + ResourceIdentifier azStackHciFabricArmId = default; + Optional azStackHciSiteId = default; Optional storageAccountId = default; Optional storageAccountSasSecretName = default; Optional asrServiceUri = default; @@ -62,22 +62,30 @@ internal static HyperVToAzStackHCIReplicationExtensionModelCustomProperties Dese { if (property.NameEquals("hyperVFabricArmId"u8)) { - hyperVFabricArmId = property.Value.GetString(); + hyperVFabricArmId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("hyperVSiteId"u8)) { - hyperVSiteId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hyperVSiteId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("azStackHciFabricArmId"u8)) { - azStackHciFabricArmId = property.Value.GetString(); + azStackHciFabricArmId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("azStackHciSiteId"u8)) { - azStackHciSiteId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azStackHciSiteId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("storageAccountId"u8)) @@ -158,7 +166,7 @@ internal static HyperVToAzStackHCIReplicationExtensionModelCustomProperties Dese continue; } } - return new HyperVToAzStackHCIReplicationExtensionModelCustomProperties(instanceType, hyperVFabricArmId, hyperVSiteId.Value, azStackHciFabricArmId, azStackHciSiteId.Value, storageAccountId.Value, storageAccountSasSecretName.Value, asrServiceUri.Value, rcmServiceUri.Value, gatewayServiceUri.Value, sourceGatewayServiceId.Value, targetGatewayServiceId.Value, sourceStorageContainerName.Value, targetStorageContainerName.Value, resourceLocation.Value, subscriptionId.Value, resourceGroup.Value); + return new HyperVToAzStackHciReplicationExtensionModelCustomProperties(instanceType, hyperVFabricArmId, hyperVSiteId.Value, azStackHciFabricArmId, azStackHciSiteId.Value, storageAccountId.Value, storageAccountSasSecretName.Value, asrServiceUri.Value, rcmServiceUri.Value, gatewayServiceUri.Value, sourceGatewayServiceId.Value, targetGatewayServiceId.Value, sourceStorageContainerName.Value, targetStorageContainerName.Value, resourceLocation.Value, subscriptionId.Value, resourceGroup.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionModelCustomProperties.cs similarity index 82% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionModelCustomProperties.cs index 8f15537bd5f3..adee194e75a7 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIReplicationExtensionModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionModelCustomProperties.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// HyperV to AzStackHCI Replication extension model custom properties. - public partial class HyperVToAzStackHCIReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties + public partial class HyperVToAzStackHciReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties { - /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciReplicationExtensionModelCustomProperties. /// Gets or sets the ARM Id of the source HyperV fabric. /// Gets or sets the ARM Id of the target AzStackHCI fabric. /// or is null. - public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperVFabricArmId, string azStackHciFabricArmId) + public HyperVToAzStackHciReplicationExtensionModelCustomProperties(ResourceIdentifier hyperVFabricArmId, ResourceIdentifier azStackHciFabricArmId) { Argument.AssertNotNull(hyperVFabricArmId, nameof(hyperVFabricArmId)); Argument.AssertNotNull(azStackHciFabricArmId, nameof(azStackHciFabricArmId)); @@ -27,7 +27,7 @@ public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperV InstanceType = "HyperVToAzStackHCI"; } - /// Initializes a new instance of HyperVToAzStackHCIReplicationExtensionModelCustomProperties. + /// Initializes a new instance of HyperVToAzStackHciReplicationExtensionModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the ARM Id of the source HyperV fabric. /// Gets or sets the ARM Id of the HyperV site. @@ -45,7 +45,7 @@ public HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string hyperV /// Gets or sets the resource location. /// Gets or sets the subscription. /// Gets or sets the resource group. - internal HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string instanceType, string hyperVFabricArmId, string hyperVSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) + internal HyperVToAzStackHciReplicationExtensionModelCustomProperties(string instanceType, ResourceIdentifier hyperVFabricArmId, ResourceIdentifier hyperVSiteId, ResourceIdentifier azStackHciFabricArmId, ResourceIdentifier azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) { HyperVFabricArmId = hyperVFabricArmId; HyperVSiteId = hyperVSiteId; @@ -67,13 +67,13 @@ internal HyperVToAzStackHCIReplicationExtensionModelCustomProperties(string inst } /// Gets or sets the ARM Id of the source HyperV fabric. - public string HyperVFabricArmId { get; set; } + public ResourceIdentifier HyperVFabricArmId { get; set; } /// Gets or sets the ARM Id of the HyperV site. - public string HyperVSiteId { get; } + public ResourceIdentifier HyperVSiteId { get; } /// Gets or sets the ARM Id of the target AzStackHCI fabric. - public string AzStackHciFabricArmId { get; set; } + public ResourceIdentifier AzStackHciFabricArmId { get; set; } /// Gets or sets the ARM Id of the AzStackHCI site. - public string AzStackHciSiteId { get; } + public ResourceIdentifier AzStackHciSiteId { get; } /// Gets or sets the storage account Id. public string StorageAccountId { get; set; } /// Gets or sets the Sas Secret of storage account. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs deleted file mode 100644 index 5e6bca7f44e9..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - public partial class OperationStatus - { - internal static OperationStatus DeserializeOperationStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional id = default; - Optional name = default; - Optional status = default; - Optional startTime = default; - Optional endTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - startTime = property.Value.GetString(); - continue; - } - if (property.NameEquals("endTime"u8)) - { - endTime = property.Value.GetString(); - continue; - } - } - return new OperationStatus(id.Value, name.Value, status.Value, startTime.Value, endTime.Value); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs deleted file mode 100644 index 6610a81eb54f..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/OperationStatus.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Defines the operation status. - public partial class OperationStatus - { - /// Initializes a new instance of OperationStatus. - internal OperationStatus() - { - } - - /// Initializes a new instance of OperationStatus. - /// Gets or sets the Id. - /// Gets or sets the operation name. - /// - /// Gets or sets the status of the operation. ARM expects the terminal status to be one of - /// Succeeded/ Failed/ Canceled. All other values imply that the operation is still running. - /// - /// Gets or sets the start time. - /// Gets or sets the end time. - internal OperationStatus(string id, string name, string status, string startTime, string endTime) - { - Id = id; - Name = name; - Status = status; - StartTime = startTime; - EndTime = endTime; - } - - /// Gets or sets the Id. - public string Id { get; } - /// Gets or sets the operation name. - public string Name { get; } - /// - /// Gets or sets the status of the operation. ARM expects the terminal status to be one of - /// Succeeded/ Failed/ Canceled. All other values imply that the operation is still running. - /// - public string Status { get; } - /// Gets or sets the start time. - public string StartTime { get; } - /// Gets or sets the end time. - public string EndTime { get; } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs index a79973240dd3..9745333ca9ea 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModel.cs @@ -28,7 +28,7 @@ public PlannedFailoverModel(PlannedFailoverModelProperties properties) /// /// Planned failover model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public PlannedFailoverModelCustomProperties PlannedFailoverModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs index cf1a0663de70..6dc5d8d7e1ce 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.Serialization.cs @@ -30,8 +30,9 @@ internal static PlannedFailoverModelCustomProperties DeserializePlannedFailoverM { switch (discriminator.GetString()) { - case "HyperVToAzStackHCI": return HyperVToAzStackHCIPlannedFailoverModelCustomProperties.DeserializeHyperVToAzStackHCIPlannedFailoverModelCustomProperties(element); - case "VMwareToAzStackHCI": return VMwareToAzStackHCIPlannedFailoverModelCustomProperties.DeserializeVMwareToAzStackHCIPlannedFailoverModelCustomProperties(element); + case "HyperVToAzStackHCI": return HyperVToAzStackHciPlannedFailoverModelCustomProperties.DeserializeHyperVToAzStackHciPlannedFailoverModelCustomProperties(element); + case "PlannedFailoverModelCustomProperties": return GeneralPlannedFailoverModelCustomProperties.DeserializeGeneralPlannedFailoverModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHciPlannedFailoverModelCustomProperties.DeserializeVMwareToAzStackHciPlannedFailoverModelCustomProperties(element); } } return UnknownPlannedFailoverModelCustomProperties.DeserializeUnknownPlannedFailoverModelCustomProperties(element); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs index 824b986cb599..5ebaa57b08d3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Planned failover model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public abstract partial class PlannedFailoverModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs index 77fffeea3d7a..169a08ff4e7c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverModelProperties.cs @@ -17,7 +17,7 @@ public partial class PlannedFailoverModelProperties /// /// Planned failover model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// is null. public PlannedFailoverModelProperties(PlannedFailoverModelCustomProperties customProperties) @@ -30,7 +30,7 @@ public PlannedFailoverModelProperties(PlannedFailoverModelCustomProperties custo /// /// Planned failover model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public PlannedFailoverModelCustomProperties CustomProperties { get; set; } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs index 599be153bd48..5299cfed8efa 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.Serialization.cs @@ -30,8 +30,9 @@ internal static PolicyModelCustomProperties DeserializePolicyModelCustomProperti { switch (discriminator.GetString()) { - case "HyperVToAzStackHCI": return HyperVToAzStackHCIPolicyModelCustomProperties.DeserializeHyperVToAzStackHCIPolicyModelCustomProperties(element); - case "VMwareToAzStackHCI": return VMwareToAzStackHCIPolicyModelCustomProperties.DeserializeVMwareToAzStackHCIPolicyModelCustomProperties(element); + case "HyperVToAzStackHCI": return HyperVToAzStackHciPolicyModelCustomProperties.DeserializeHyperVToAzStackHciPolicyModelCustomProperties(element); + case "PolicyModelCustomProperties": return GeneralPolicyModelCustomProperties.DeserializeGeneralPolicyModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHciPolicyModelCustomProperties.DeserializeVMwareToAzStackHciPolicyModelCustomProperties(element); } } return UnknownPolicyModelCustomProperties.DeserializeUnknownPolicyModelCustomProperties(element); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs index 56273929fecf..e9d29395008c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Policy model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public abstract partial class PolicyModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs index b1ad72fdb594..47a60636306b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.Serialization.cs @@ -30,8 +30,9 @@ internal static ProtectedItemModelCustomProperties DeserializeProtectedItemModel { switch (discriminator.GetString()) { - case "HyperVToAzStackHCI": return HyperVToAzStackHCIProtectedItemModelCustomProperties.DeserializeHyperVToAzStackHCIProtectedItemModelCustomProperties(element); - case "VMwareToAzStackHCI": return VMwareToAzStackHCIProtectedItemModelCustomProperties.DeserializeVMwareToAzStackHCIProtectedItemModelCustomProperties(element); + case "HyperVToAzStackHCI": return HyperVToAzStackHciProtectedItemModelCustomProperties.DeserializeHyperVToAzStackHciProtectedItemModelCustomProperties(element); + case "ProtectedItemModelCustomProperties": return GeneralProtectedItemModelCustomProperties.DeserializeGeneralProtectedItemModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHciProtectedItemModelCustomProperties.DeserializeVMwareToAzStackHciProtectedItemModelCustomProperties(element); } } return UnknownProtectedItemModelCustomProperties.DeserializeUnknownProtectedItemModelCustomProperties(element); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs index 242eab9ec4c3..a995493e037e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Protected item model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public abstract partial class ProtectedItemModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs deleted file mode 100644 index a2513264cea2..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - public partial class ProtectedItemModelPropertiesCurrentJob - { - internal static ProtectedItemModelPropertiesCurrentJob DeserializeProtectedItemModelPropertiesCurrentJob(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional scenarioName = default; - Optional id = default; - Optional name = default; - Optional displayName = default; - Optional state = default; - Optional startTime = default; - Optional endTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("scenarioName"u8)) - { - scenarioName = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - state = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new ProtectedItemModelPropertiesCurrentJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs deleted file mode 100644 index 1b53e4642097..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesCurrentJob.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// The ProtectedItemModelPropertiesCurrentJob. - public partial class ProtectedItemModelPropertiesCurrentJob : ProtectedItemJobProperties - { - /// Initializes a new instance of ProtectedItemModelPropertiesCurrentJob. - internal ProtectedItemModelPropertiesCurrentJob() - { - } - - /// Initializes a new instance of ProtectedItemModelPropertiesCurrentJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - internal ProtectedItemModelPropertiesCurrentJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) - { - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs deleted file mode 100644 index 376fdd08f140..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - public partial class ProtectedItemModelPropertiesLastFailedEnableProtectionJob - { - internal static ProtectedItemModelPropertiesLastFailedEnableProtectionJob DeserializeProtectedItemModelPropertiesLastFailedEnableProtectionJob(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional scenarioName = default; - Optional id = default; - Optional name = default; - Optional displayName = default; - Optional state = default; - Optional startTime = default; - Optional endTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("scenarioName"u8)) - { - scenarioName = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - state = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new ProtectedItemModelPropertiesLastFailedEnableProtectionJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs deleted file mode 100644 index 491b4679305e..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedEnableProtectionJob.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// The ProtectedItemModelPropertiesLastFailedEnableProtectionJob. - public partial class ProtectedItemModelPropertiesLastFailedEnableProtectionJob : ProtectedItemJobProperties - { - /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedEnableProtectionJob. - internal ProtectedItemModelPropertiesLastFailedEnableProtectionJob() - { - } - - /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedEnableProtectionJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - internal ProtectedItemModelPropertiesLastFailedEnableProtectionJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) - { - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs deleted file mode 100644 index 04bd1c1536a9..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - public partial class ProtectedItemModelPropertiesLastFailedPlannedFailoverJob - { - internal static ProtectedItemModelPropertiesLastFailedPlannedFailoverJob DeserializeProtectedItemModelPropertiesLastFailedPlannedFailoverJob(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional scenarioName = default; - Optional id = default; - Optional name = default; - Optional displayName = default; - Optional state = default; - Optional startTime = default; - Optional endTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("scenarioName"u8)) - { - scenarioName = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - state = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs deleted file mode 100644 index 9eb25e1b2627..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastFailedPlannedFailoverJob.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// The ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. - public partial class ProtectedItemModelPropertiesLastFailedPlannedFailoverJob : ProtectedItemJobProperties - { - /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. - internal ProtectedItemModelPropertiesLastFailedPlannedFailoverJob() - { - } - - /// Initializes a new instance of ProtectedItemModelPropertiesLastFailedPlannedFailoverJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - internal ProtectedItemModelPropertiesLastFailedPlannedFailoverJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) - { - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs deleted file mode 100644 index 17346a5a92c9..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - public partial class ProtectedItemModelPropertiesLastTestFailoverJob - { - internal static ProtectedItemModelPropertiesLastTestFailoverJob DeserializeProtectedItemModelPropertiesLastTestFailoverJob(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional scenarioName = default; - Optional id = default; - Optional name = default; - Optional displayName = default; - Optional state = default; - Optional startTime = default; - Optional endTime = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("scenarioName"u8)) - { - scenarioName = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - state = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("endTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endTime = property.Value.GetDateTimeOffset("O"); - continue; - } - } - return new ProtectedItemModelPropertiesLastTestFailoverJob(scenarioName.Value, id.Value, name.Value, displayName.Value, state.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime)); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs deleted file mode 100644 index d10f0bb6dcb2..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelPropertiesLastTestFailoverJob.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// The ProtectedItemModelPropertiesLastTestFailoverJob. - public partial class ProtectedItemModelPropertiesLastTestFailoverJob : ProtectedItemJobProperties - { - /// Initializes a new instance of ProtectedItemModelPropertiesLastTestFailoverJob. - internal ProtectedItemModelPropertiesLastTestFailoverJob() - { - } - - /// Initializes a new instance of ProtectedItemModelPropertiesLastTestFailoverJob. - /// Gets or sets protection scenario name. - /// Gets or sets workflow Id. - /// Gets or sets workflow name. - /// Gets or sets the workflow friendly display name. - /// Gets or sets workflow state. - /// Gets or sets start time of the workflow. - /// Gets or sets end time of the workflow. - internal ProtectedItemModelPropertiesLastTestFailoverJob(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn) : base(scenarioName, id, name, displayName, state, startOn, endOn) - { - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs deleted file mode 100644 index cc28762f5a86..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectionState.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the protection state. - public readonly partial struct ProtectionState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProtectionState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UnprotectedStatesBeginValue = "UnprotectedStatesBegin"; - private const string EnablingProtectionValue = "EnablingProtection"; - private const string EnablingFailedValue = "EnablingFailed"; - private const string DisablingProtectionValue = "DisablingProtection"; - private const string MarkedForDeletionValue = "MarkedForDeletion"; - private const string DisablingFailedValue = "DisablingFailed"; - private const string UnprotectedStatesEndValue = "UnprotectedStatesEnd"; - private const string InitialReplicationStatesBeginValue = "InitialReplicationStatesBegin"; - private const string InitialReplicationInProgressValue = "InitialReplicationInProgress"; - private const string InitialReplicationCompletedOnPrimaryValue = "InitialReplicationCompletedOnPrimary"; - private const string InitialReplicationCompletedOnRecoveryValue = "InitialReplicationCompletedOnRecovery"; - private const string InitialReplicationFailedValue = "InitialReplicationFailed"; - private const string InitialReplicationStatesEndValue = "InitialReplicationStatesEnd"; - private const string ProtectedStatesBeginValue = "ProtectedStatesBegin"; - private const string ProtectedValue = "Protected"; - private const string ProtectedStatesEndValue = "ProtectedStatesEnd"; - private const string PlannedFailoverTransitionStatesBeginValue = "PlannedFailoverTransitionStatesBegin"; - private const string PlannedFailoverInitiatedValue = "PlannedFailoverInitiated"; - private const string PlannedFailoverCompletingValue = "PlannedFailoverCompleting"; - private const string PlannedFailoverCompletedValue = "PlannedFailoverCompleted"; - private const string PlannedFailoverFailedValue = "PlannedFailoverFailed"; - private const string PlannedFailoverCompletionFailedValue = "PlannedFailoverCompletionFailed"; - private const string PlannedFailoverTransitionStatesEndValue = "PlannedFailoverTransitionStatesEnd"; - private const string UnplannedFailoverTransitionStatesBeginValue = "UnplannedFailoverTransitionStatesBegin"; - private const string UnplannedFailoverInitiatedValue = "UnplannedFailoverInitiated"; - private const string UnplannedFailoverCompletingValue = "UnplannedFailoverCompleting"; - private const string UnplannedFailoverCompletedValue = "UnplannedFailoverCompleted"; - private const string UnplannedFailoverFailedValue = "UnplannedFailoverFailed"; - private const string UnplannedFailoverCompletionFailedValue = "UnplannedFailoverCompletionFailed"; - private const string UnplannedFailoverTransitionStatesEndValue = "UnplannedFailoverTransitionStatesEnd"; - private const string CommitFailoverStatesBeginValue = "CommitFailoverStatesBegin"; - private const string CommitFailoverInProgressOnPrimaryValue = "CommitFailoverInProgressOnPrimary"; - private const string CommitFailoverInProgressOnRecoveryValue = "CommitFailoverInProgressOnRecovery"; - private const string CommitFailoverCompletedValue = "CommitFailoverCompleted"; - private const string CommitFailoverFailedOnPrimaryValue = "CommitFailoverFailedOnPrimary"; - private const string CommitFailoverFailedOnRecoveryValue = "CommitFailoverFailedOnRecovery"; - private const string CommitFailoverStatesEndValue = "CommitFailoverStatesEnd"; - private const string CancelFailoverStatesBeginValue = "CancelFailoverStatesBegin"; - private const string CancelFailoverInProgressOnPrimaryValue = "CancelFailoverInProgressOnPrimary"; - private const string CancelFailoverInProgressOnRecoveryValue = "CancelFailoverInProgressOnRecovery"; - private const string CancelFailoverFailedOnPrimaryValue = "CancelFailoverFailedOnPrimary"; - private const string CancelFailoverFailedOnRecoveryValue = "CancelFailoverFailedOnRecovery"; - private const string CancelFailoverStatesEndValue = "CancelFailoverStatesEnd"; - private const string ChangeRecoveryPointStatesBeginValue = "ChangeRecoveryPointStatesBegin"; - private const string ChangeRecoveryPointInitiatedValue = "ChangeRecoveryPointInitiated"; - private const string ChangeRecoveryPointCompletedValue = "ChangeRecoveryPointCompleted"; - private const string ChangeRecoveryPointFailedValue = "ChangeRecoveryPointFailed"; - private const string ChangeRecoveryPointStatesEndValue = "ChangeRecoveryPointStatesEnd"; - private const string ReprotectStatesBeginValue = "ReprotectStatesBegin"; - private const string ReprotectInitiatedValue = "ReprotectInitiated"; - private const string ReprotectFailedValue = "ReprotectFailed"; - private const string ReprotectStatesEndValue = "ReprotectStatesEnd"; - - /// UnprotectedStatesBegin. - public static ProtectionState UnprotectedStatesBegin { get; } = new ProtectionState(UnprotectedStatesBeginValue); - /// EnablingProtection. - public static ProtectionState EnablingProtection { get; } = new ProtectionState(EnablingProtectionValue); - /// EnablingFailed. - public static ProtectionState EnablingFailed { get; } = new ProtectionState(EnablingFailedValue); - /// DisablingProtection. - public static ProtectionState DisablingProtection { get; } = new ProtectionState(DisablingProtectionValue); - /// MarkedForDeletion. - public static ProtectionState MarkedForDeletion { get; } = new ProtectionState(MarkedForDeletionValue); - /// DisablingFailed. - public static ProtectionState DisablingFailed { get; } = new ProtectionState(DisablingFailedValue); - /// UnprotectedStatesEnd. - public static ProtectionState UnprotectedStatesEnd { get; } = new ProtectionState(UnprotectedStatesEndValue); - /// InitialReplicationStatesBegin. - public static ProtectionState InitialReplicationStatesBegin { get; } = new ProtectionState(InitialReplicationStatesBeginValue); - /// InitialReplicationInProgress. - public static ProtectionState InitialReplicationInProgress { get; } = new ProtectionState(InitialReplicationInProgressValue); - /// InitialReplicationCompletedOnPrimary. - public static ProtectionState InitialReplicationCompletedOnPrimary { get; } = new ProtectionState(InitialReplicationCompletedOnPrimaryValue); - /// InitialReplicationCompletedOnRecovery. - public static ProtectionState InitialReplicationCompletedOnRecovery { get; } = new ProtectionState(InitialReplicationCompletedOnRecoveryValue); - /// InitialReplicationFailed. - public static ProtectionState InitialReplicationFailed { get; } = new ProtectionState(InitialReplicationFailedValue); - /// InitialReplicationStatesEnd. - public static ProtectionState InitialReplicationStatesEnd { get; } = new ProtectionState(InitialReplicationStatesEndValue); - /// ProtectedStatesBegin. - public static ProtectionState ProtectedStatesBegin { get; } = new ProtectionState(ProtectedStatesBeginValue); - /// Protected. - public static ProtectionState Protected { get; } = new ProtectionState(ProtectedValue); - /// ProtectedStatesEnd. - public static ProtectionState ProtectedStatesEnd { get; } = new ProtectionState(ProtectedStatesEndValue); - /// PlannedFailoverTransitionStatesBegin. - public static ProtectionState PlannedFailoverTransitionStatesBegin { get; } = new ProtectionState(PlannedFailoverTransitionStatesBeginValue); - /// PlannedFailoverInitiated. - public static ProtectionState PlannedFailoverInitiated { get; } = new ProtectionState(PlannedFailoverInitiatedValue); - /// PlannedFailoverCompleting. - public static ProtectionState PlannedFailoverCompleting { get; } = new ProtectionState(PlannedFailoverCompletingValue); - /// PlannedFailoverCompleted. - public static ProtectionState PlannedFailoverCompleted { get; } = new ProtectionState(PlannedFailoverCompletedValue); - /// PlannedFailoverFailed. - public static ProtectionState PlannedFailoverFailed { get; } = new ProtectionState(PlannedFailoverFailedValue); - /// PlannedFailoverCompletionFailed. - public static ProtectionState PlannedFailoverCompletionFailed { get; } = new ProtectionState(PlannedFailoverCompletionFailedValue); - /// PlannedFailoverTransitionStatesEnd. - public static ProtectionState PlannedFailoverTransitionStatesEnd { get; } = new ProtectionState(PlannedFailoverTransitionStatesEndValue); - /// UnplannedFailoverTransitionStatesBegin. - public static ProtectionState UnplannedFailoverTransitionStatesBegin { get; } = new ProtectionState(UnplannedFailoverTransitionStatesBeginValue); - /// UnplannedFailoverInitiated. - public static ProtectionState UnplannedFailoverInitiated { get; } = new ProtectionState(UnplannedFailoverInitiatedValue); - /// UnplannedFailoverCompleting. - public static ProtectionState UnplannedFailoverCompleting { get; } = new ProtectionState(UnplannedFailoverCompletingValue); - /// UnplannedFailoverCompleted. - public static ProtectionState UnplannedFailoverCompleted { get; } = new ProtectionState(UnplannedFailoverCompletedValue); - /// UnplannedFailoverFailed. - public static ProtectionState UnplannedFailoverFailed { get; } = new ProtectionState(UnplannedFailoverFailedValue); - /// UnplannedFailoverCompletionFailed. - public static ProtectionState UnplannedFailoverCompletionFailed { get; } = new ProtectionState(UnplannedFailoverCompletionFailedValue); - /// UnplannedFailoverTransitionStatesEnd. - public static ProtectionState UnplannedFailoverTransitionStatesEnd { get; } = new ProtectionState(UnplannedFailoverTransitionStatesEndValue); - /// CommitFailoverStatesBegin. - public static ProtectionState CommitFailoverStatesBegin { get; } = new ProtectionState(CommitFailoverStatesBeginValue); - /// CommitFailoverInProgressOnPrimary. - public static ProtectionState CommitFailoverInProgressOnPrimary { get; } = new ProtectionState(CommitFailoverInProgressOnPrimaryValue); - /// CommitFailoverInProgressOnRecovery. - public static ProtectionState CommitFailoverInProgressOnRecovery { get; } = new ProtectionState(CommitFailoverInProgressOnRecoveryValue); - /// CommitFailoverCompleted. - public static ProtectionState CommitFailoverCompleted { get; } = new ProtectionState(CommitFailoverCompletedValue); - /// CommitFailoverFailedOnPrimary. - public static ProtectionState CommitFailoverFailedOnPrimary { get; } = new ProtectionState(CommitFailoverFailedOnPrimaryValue); - /// CommitFailoverFailedOnRecovery. - public static ProtectionState CommitFailoverFailedOnRecovery { get; } = new ProtectionState(CommitFailoverFailedOnRecoveryValue); - /// CommitFailoverStatesEnd. - public static ProtectionState CommitFailoverStatesEnd { get; } = new ProtectionState(CommitFailoverStatesEndValue); - /// CancelFailoverStatesBegin. - public static ProtectionState CancelFailoverStatesBegin { get; } = new ProtectionState(CancelFailoverStatesBeginValue); - /// CancelFailoverInProgressOnPrimary. - public static ProtectionState CancelFailoverInProgressOnPrimary { get; } = new ProtectionState(CancelFailoverInProgressOnPrimaryValue); - /// CancelFailoverInProgressOnRecovery. - public static ProtectionState CancelFailoverInProgressOnRecovery { get; } = new ProtectionState(CancelFailoverInProgressOnRecoveryValue); - /// CancelFailoverFailedOnPrimary. - public static ProtectionState CancelFailoverFailedOnPrimary { get; } = new ProtectionState(CancelFailoverFailedOnPrimaryValue); - /// CancelFailoverFailedOnRecovery. - public static ProtectionState CancelFailoverFailedOnRecovery { get; } = new ProtectionState(CancelFailoverFailedOnRecoveryValue); - /// CancelFailoverStatesEnd. - public static ProtectionState CancelFailoverStatesEnd { get; } = new ProtectionState(CancelFailoverStatesEndValue); - /// ChangeRecoveryPointStatesBegin. - public static ProtectionState ChangeRecoveryPointStatesBegin { get; } = new ProtectionState(ChangeRecoveryPointStatesBeginValue); - /// ChangeRecoveryPointInitiated. - public static ProtectionState ChangeRecoveryPointInitiated { get; } = new ProtectionState(ChangeRecoveryPointInitiatedValue); - /// ChangeRecoveryPointCompleted. - public static ProtectionState ChangeRecoveryPointCompleted { get; } = new ProtectionState(ChangeRecoveryPointCompletedValue); - /// ChangeRecoveryPointFailed. - public static ProtectionState ChangeRecoveryPointFailed { get; } = new ProtectionState(ChangeRecoveryPointFailedValue); - /// ChangeRecoveryPointStatesEnd. - public static ProtectionState ChangeRecoveryPointStatesEnd { get; } = new ProtectionState(ChangeRecoveryPointStatesEndValue); - /// ReprotectStatesBegin. - public static ProtectionState ReprotectStatesBegin { get; } = new ProtectionState(ReprotectStatesBeginValue); - /// ReprotectInitiated. - public static ProtectionState ReprotectInitiated { get; } = new ProtectionState(ReprotectInitiatedValue); - /// ReprotectFailed. - public static ProtectionState ReprotectFailed { get; } = new ProtectionState(ReprotectFailedValue); - /// ReprotectStatesEnd. - public static ProtectionState ReprotectStatesEnd { get; } = new ProtectionState(ReprotectStatesEndValue); - /// Determines if two values are the same. - public static bool operator ==(ProtectionState left, ProtectionState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ProtectionState left, ProtectionState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ProtectionState(string value) => new ProtectionState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProtectionState other && Equals(other); - /// - public bool Equals(ProtectionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs deleted file mode 100644 index 90e5991fb08e..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProvisioningState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the provisioning state of the Dra. - public readonly partial struct ProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CanceledValue = "Canceled"; - private const string CreatingValue = "Creating"; - private const string DeletingValue = "Deleting"; - private const string DeletedValue = "Deleted"; - private const string FailedValue = "Failed"; - private const string SucceededValue = "Succeeded"; - private const string UpdatingValue = "Updating"; - - /// Canceled. - public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); - /// Creating. - public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); - /// Deleting. - public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); - /// Deleted. - public static ProvisioningState Deleted { get; } = new ProvisioningState(DeletedValue); - /// Failed. - public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); - /// Succeeded. - public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); - /// Updating. - public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); - /// Determines if two values are the same. - public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); - /// - public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs deleted file mode 100644 index 27f8d5dd9ea4..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCollection.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.RecoveryServicesDataReplication; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - internal partial class RecoveryPointModelCollection - { - internal static RecoveryPointModelCollection DeserializeRecoveryPointModelCollection(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RecoveryPointModelData.DeserializeRecoveryPointModelData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new RecoveryPointModelCollection(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs index c8f96fa95d21..4fe80948d4af 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.Serialization.cs @@ -21,7 +21,7 @@ internal static RecoveryPointModelCustomProperties DeserializeRecoveryPointModel { switch (discriminator.GetString()) { - case "HyperVToAzStackHCI": return HyperVToAzStackHCIRecoveryPointModelCustomProperties.DeserializeHyperVToAzStackHCIRecoveryPointModelCustomProperties(element); + case "HyperVToAzStackHCI": return HyperVToAzStackHciRecoveryPointModelCustomProperties.DeserializeHyperVToAzStackHciRecoveryPointModelCustomProperties(element); } } return UnknownRecoveryPointModelCustomProperties.DeserializeUnknownRecoveryPointModelCustomProperties(element); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs index 45d185e5d847..f90d8b914bb9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Recovery point model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include . /// public abstract partial class RecoveryPointModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs deleted file mode 100644 index 14472eb69187..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the recovery point type. - public readonly partial struct RecoveryPointType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RecoveryPointType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ApplicationConsistentValue = "ApplicationConsistent"; - private const string CrashConsistentValue = "CrashConsistent"; - - /// ApplicationConsistent. - public static RecoveryPointType ApplicationConsistent { get; } = new RecoveryPointType(ApplicationConsistentValue); - /// CrashConsistent. - public static RecoveryPointType CrashConsistent { get; } = new RecoveryPointType(CrashConsistentValue); - /// Determines if two values are the same. - public static bool operator ==(RecoveryPointType left, RecoveryPointType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RecoveryPointType left, RecoveryPointType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RecoveryPointType(string value) => new RecoveryPointType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RecoveryPointType other && Equals(other); - /// - public bool Equals(RecoveryPointType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs deleted file mode 100644 index e425e7582f7e..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCollection.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.RecoveryServicesDataReplication; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - internal partial class ReplicationExtensionModelCollection - { - internal static ReplicationExtensionModelCollection DeserializeReplicationExtensionModelCollection(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new ReplicationExtensionModelCollection(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs index 5c441a7fa415..79caba7f9f7c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.Serialization.cs @@ -30,8 +30,9 @@ internal static ReplicationExtensionModelCustomProperties DeserializeReplication { switch (discriminator.GetString()) { - case "HyperVToAzStackHCI": return HyperVToAzStackHCIReplicationExtensionModelCustomProperties.DeserializeHyperVToAzStackHCIReplicationExtensionModelCustomProperties(element); - case "VMwareToAzStackHCI": return VMwareToAzStackHCIReplicationExtensionModelCustomProperties.DeserializeVMwareToAzStackHCIReplicationExtensionModelCustomProperties(element); + case "HyperVToAzStackHCI": return HyperVToAzStackHciReplicationExtensionModelCustomProperties.DeserializeHyperVToAzStackHciReplicationExtensionModelCustomProperties(element); + case "ReplicationExtensionModelCustomProperties": return GeneralReplicationExtensionModelCustomProperties.DeserializeGeneralReplicationExtensionModelCustomProperties(element); + case "VMwareToAzStackHCI": return VMwareToAzStackHciReplicationExtensionModelCustomProperties.DeserializeVMwareToAzStackHciReplicationExtensionModelCustomProperties(element); } } return UnknownReplicationExtensionModelCustomProperties.DeserializeUnknownReplicationExtensionModelCustomProperties(element); diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs index b55255fd1977..ca6633cf9807 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelCustomProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models /// /// Replication extension model custom properties. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public abstract partial class ReplicationExtensionModelCustomProperties { diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs deleted file mode 100644 index 918e7e16d7e4..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelData.Serialization.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - public partial class ReplicationExtensionModelData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ReplicationExtensionModelData DeserializeReplicationExtensionModelData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ReplicationExtensionModelProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = ReplicationExtensionModelProperties.DeserializeReplicationExtensionModelProperties(property.Value); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - } - return new ReplicationExtensionModelData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs deleted file mode 100644 index 907ccdfa6597..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationVaultType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the type of vault. - public readonly partial struct ReplicationVaultType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ReplicationVaultType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DisasterRecoveryValue = "DisasterRecovery"; - private const string MigrateValue = "Migrate"; - - /// DisasterRecovery. - public static ReplicationVaultType DisasterRecovery { get; } = new ReplicationVaultType(DisasterRecoveryValue); - /// Migrate. - public static ReplicationVaultType Migrate { get; } = new ReplicationVaultType(MigrateValue); - /// Determines if two values are the same. - public static bool operator ==(ReplicationVaultType left, ReplicationVaultType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ReplicationVaultType left, ReplicationVaultType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ReplicationVaultType(string value) => new ReplicationVaultType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ReplicationVaultType other && Equals(other); - /// - public bool Equals(ReplicationVaultType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs deleted file mode 100644 index 04f5ff71946f..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ResynchronizationState.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the resynchronization state. - public readonly partial struct ResynchronizationState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ResynchronizationState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string ResynchronizationInitiatedValue = "ResynchronizationInitiated"; - private const string ResynchronizationCompletedValue = "ResynchronizationCompleted"; - private const string ResynchronizationFailedValue = "ResynchronizationFailed"; - - /// None. - public static ResynchronizationState None { get; } = new ResynchronizationState(NoneValue); - /// ResynchronizationInitiated. - public static ResynchronizationState ResynchronizationInitiated { get; } = new ResynchronizationState(ResynchronizationInitiatedValue); - /// ResynchronizationCompleted. - public static ResynchronizationState ResynchronizationCompleted { get; } = new ResynchronizationState(ResynchronizationCompletedValue); - /// ResynchronizationFailed. - public static ResynchronizationState ResynchronizationFailed { get; } = new ResynchronizationState(ResynchronizationFailedValue); - /// Determines if two values are the same. - public static bool operator ==(ResynchronizationState left, ResynchronizationState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ResynchronizationState left, ResynchronizationState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ResynchronizationState(string value) => new ResynchronizationState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ResynchronizationState other && Equals(other); - /// - public bool Equals(ResynchronizationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs deleted file mode 100644 index cb223580b258..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TaskState.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the task state. - public readonly partial struct TaskState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TaskState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PendingValue = "Pending"; - private const string StartedValue = "Started"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CancelledValue = "Cancelled"; - private const string SkippedValue = "Skipped"; - - /// Pending. - public static TaskState Pending { get; } = new TaskState(PendingValue); - /// Started. - public static TaskState Started { get; } = new TaskState(StartedValue); - /// Succeeded. - public static TaskState Succeeded { get; } = new TaskState(SucceededValue); - /// Failed. - public static TaskState Failed { get; } = new TaskState(FailedValue); - /// Cancelled. - public static TaskState Cancelled { get; } = new TaskState(CancelledValue); - /// Skipped. - public static TaskState Skipped { get; } = new TaskState(SkippedValue); - /// Determines if two values are the same. - public static bool operator ==(TaskState left, TaskState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TaskState left, TaskState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TaskState(string value) => new TaskState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TaskState other && Equals(other); - /// - public bool Equals(TaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs deleted file mode 100644 index 18a63eb8e4a0..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverState.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the test failover state. - public readonly partial struct TestFailoverState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TestFailoverState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string TestFailoverInitiatedValue = "TestFailoverInitiated"; - private const string TestFailoverCompletingValue = "TestFailoverCompleting"; - private const string TestFailoverCompletedValue = "TestFailoverCompleted"; - private const string TestFailoverFailedValue = "TestFailoverFailed"; - private const string TestFailoverCompletionFailedValue = "TestFailoverCompletionFailed"; - private const string TestFailoverCleanupInitiatedValue = "TestFailoverCleanupInitiated"; - private const string TestFailoverCleanupCompletingValue = "TestFailoverCleanupCompleting"; - private const string MarkedForDeletionValue = "MarkedForDeletion"; - - /// None. - public static TestFailoverState None { get; } = new TestFailoverState(NoneValue); - /// TestFailoverInitiated. - public static TestFailoverState TestFailoverInitiated { get; } = new TestFailoverState(TestFailoverInitiatedValue); - /// TestFailoverCompleting. - public static TestFailoverState TestFailoverCompleting { get; } = new TestFailoverState(TestFailoverCompletingValue); - /// TestFailoverCompleted. - public static TestFailoverState TestFailoverCompleted { get; } = new TestFailoverState(TestFailoverCompletedValue); - /// TestFailoverFailed. - public static TestFailoverState TestFailoverFailed { get; } = new TestFailoverState(TestFailoverFailedValue); - /// TestFailoverCompletionFailed. - public static TestFailoverState TestFailoverCompletionFailed { get; } = new TestFailoverState(TestFailoverCompletionFailedValue); - /// TestFailoverCleanupInitiated. - public static TestFailoverState TestFailoverCleanupInitiated { get; } = new TestFailoverState(TestFailoverCleanupInitiatedValue); - /// TestFailoverCleanupCompleting. - public static TestFailoverState TestFailoverCleanupCompleting { get; } = new TestFailoverState(TestFailoverCleanupCompletingValue); - /// MarkedForDeletion. - public static TestFailoverState MarkedForDeletion { get; } = new TestFailoverState(MarkedForDeletionValue); - /// Determines if two values are the same. - public static bool operator ==(TestFailoverState left, TestFailoverState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TestFailoverState left, TestFailoverState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TestFailoverState(string value) => new TestFailoverState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TestFailoverState other && Equals(other); - /// - public bool Equals(TestFailoverState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs index 1892bd1243d1..b5e3ef4900f7 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.Serialization.cs @@ -31,7 +31,7 @@ internal static VMwareDraModelCustomProperties DeserializeVMwareDraModelCustomPr return null; } string biosId = default; - IdentityModel marsAuthenticationIdentity = default; + DataReplicationIdentity marsAuthenticationIdentity = default; string instanceType = default; foreach (var property in element.EnumerateObject()) { @@ -42,7 +42,7 @@ internal static VMwareDraModelCustomProperties DeserializeVMwareDraModelCustomPr } if (property.NameEquals("marsAuthenticationIdentity"u8)) { - marsAuthenticationIdentity = IdentityModel.DeserializeIdentityModel(property.Value); + marsAuthenticationIdentity = DataReplicationIdentity.DeserializeDataReplicationIdentity(property.Value); continue; } if (property.NameEquals("instanceType"u8)) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs index 30a3ae71ee52..bee852d3c609 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareDraModelCustomProperties.cs @@ -17,7 +17,7 @@ public partial class VMwareDraModelCustomProperties : DraModelCustomProperties /// Gets or sets the BIOS Id of the DRA machine. /// Identity model. /// or is null. - public VMwareDraModelCustomProperties(string biosId, IdentityModel marsAuthenticationIdentity) + public VMwareDraModelCustomProperties(string biosId, DataReplicationIdentity marsAuthenticationIdentity) { Argument.AssertNotNull(biosId, nameof(biosId)); Argument.AssertNotNull(marsAuthenticationIdentity, nameof(marsAuthenticationIdentity)); @@ -31,7 +31,7 @@ public VMwareDraModelCustomProperties(string biosId, IdentityModel marsAuthentic /// Gets or sets the instance type. /// Gets or sets the BIOS Id of the DRA machine. /// Identity model. - internal VMwareDraModelCustomProperties(string instanceType, string biosId, IdentityModel marsAuthenticationIdentity) : base(instanceType) + internal VMwareDraModelCustomProperties(string instanceType, string biosId, DataReplicationIdentity marsAuthenticationIdentity) : base(instanceType) { BiosId = biosId; MarsAuthenticationIdentity = marsAuthenticationIdentity; @@ -41,6 +41,6 @@ internal VMwareDraModelCustomProperties(string instanceType, string biosId, Iden /// Gets or sets the BIOS Id of the DRA machine. public string BiosId { get; set; } /// Identity model. - public IdentityModel MarsAuthenticationIdentity { get; set; } + public DataReplicationIdentity MarsAuthenticationIdentity { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs index a86e20c90781..25253fa0b952 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.Serialization.cs @@ -16,7 +16,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("vmwareSiteId"u8); - writer.WriteStringValue(VmwareSiteId); + writer.WriteStringValue(VMwareSiteId); writer.WritePropertyName("migrationSolutionId"u8); writer.WriteStringValue(MigrationSolutionId); writer.WritePropertyName("instanceType"u8); @@ -30,19 +30,19 @@ internal static VMwareMigrateFabricModelCustomProperties DeserializeVMwareMigrat { return null; } - string vmwareSiteId = default; - string migrationSolutionId = default; + ResourceIdentifier vmwareSiteId = default; + ResourceIdentifier migrationSolutionId = default; string instanceType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("vmwareSiteId"u8)) { - vmwareSiteId = property.Value.GetString(); + vmwareSiteId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("migrationSolutionId"u8)) { - migrationSolutionId = property.Value.GetString(); + migrationSolutionId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("instanceType"u8)) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs index 788d977c7db9..b90da1dbe59b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricModelCustomProperties.cs @@ -14,33 +14,33 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models public partial class VMwareMigrateFabricModelCustomProperties : FabricModelCustomProperties { /// Initializes a new instance of VMwareMigrateFabricModelCustomProperties. - /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the VMware site. /// Gets or sets the ARM Id of the migration solution. - /// or is null. - public VMwareMigrateFabricModelCustomProperties(string vmwareSiteId, string migrationSolutionId) + /// or is null. + public VMwareMigrateFabricModelCustomProperties(ResourceIdentifier vMwareSiteId, ResourceIdentifier migrationSolutionId) { - Argument.AssertNotNull(vmwareSiteId, nameof(vmwareSiteId)); + Argument.AssertNotNull(vMwareSiteId, nameof(vMwareSiteId)); Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); - VmwareSiteId = vmwareSiteId; + VMwareSiteId = vMwareSiteId; MigrationSolutionId = migrationSolutionId; InstanceType = "VMwareMigrate"; } /// Initializes a new instance of VMwareMigrateFabricModelCustomProperties. /// Gets or sets the instance type. - /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the VMware site. /// Gets or sets the ARM Id of the migration solution. - internal VMwareMigrateFabricModelCustomProperties(string instanceType, string vmwareSiteId, string migrationSolutionId) : base(instanceType) + internal VMwareMigrateFabricModelCustomProperties(string instanceType, ResourceIdentifier vMwareSiteId, ResourceIdentifier migrationSolutionId) : base(instanceType) { - VmwareSiteId = vmwareSiteId; + VMwareSiteId = vMwareSiteId; MigrationSolutionId = migrationSolutionId; InstanceType = instanceType ?? "VMwareMigrate"; } /// Gets or sets the ARM Id of the VMware site. - public string VmwareSiteId { get; set; } + public ResourceIdentifier VMwareSiteId { get; set; } /// Gets or sets the ARM Id of the migration solution. - public string MigrationSolutionId { get; set; } + public ResourceIdentifier MigrationSolutionId { get; set; } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.Serialization.cs similarity index 92% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.Serialization.cs index 5ee3af4bb8eb..6751c171ed95 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIDiskInput.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIDiskInput : IUtf8JsonSerializable + public partial class VMwareToAzStackHciDiskInput : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -36,7 +36,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static HyperVToAzStackHCIDiskInput DeserializeHyperVToAzStackHCIDiskInput(JsonElement element) + internal static VMwareToAzStackHciDiskInput DeserializeVMwareToAzStackHciDiskInput(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -85,7 +85,7 @@ internal static HyperVToAzStackHCIDiskInput DeserializeHyperVToAzStackHCIDiskInp continue; } } - return new HyperVToAzStackHCIDiskInput(diskId, storageContainerId.Value, Optional.ToNullable(isDynamic), diskSizeGB, diskFileFormat, isOSDisk); + return new VMwareToAzStackHciDiskInput(diskId, storageContainerId.Value, Optional.ToNullable(isDynamic), diskSizeGB, diskFileFormat, isOSDisk); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.cs similarity index 92% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.cs index 9aa5482d4412..484fe2430cfe 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIDiskInput.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMwareToAzStack disk input. - public partial class VMwareToAzStackHCIDiskInput + public partial class VMwareToAzStackHciDiskInput { - /// Initializes a new instance of VMwareToAzStackHCIDiskInput. + /// Initializes a new instance of VMwareToAzStackHciDiskInput. /// Gets or sets the disk Id. /// Gets or sets the disk size in GB. /// Gets or sets the type of the virtual hard disk, vhd or vhdx. /// Gets or sets a value indicating whether disk is os disk. /// or is null. - public VMwareToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) + public VMwareToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { Argument.AssertNotNull(diskId, nameof(diskId)); Argument.AssertNotNull(diskFileFormat, nameof(diskFileFormat)); @@ -30,7 +30,7 @@ public VMwareToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFi IsOSDisk = isOSDisk; } - /// Initializes a new instance of VMwareToAzStackHCIDiskInput. + /// Initializes a new instance of VMwareToAzStackHciDiskInput. /// Gets or sets the disk Id. /// Gets or sets the target storage account ARM Id. /// @@ -40,7 +40,7 @@ public VMwareToAzStackHCIDiskInput(string diskId, long diskSizeGB, string diskFi /// Gets or sets the disk size in GB. /// Gets or sets the type of the virtual hard disk, vhd or vhdx. /// Gets or sets a value indicating whether disk is os disk. - internal VMwareToAzStackHCIDiskInput(string diskId, string storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk) + internal VMwareToAzStackHciDiskInput(string diskId, string storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk) { DiskId = diskId; StorageContainerId = storageContainerId; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.Serialization.cs similarity index 91% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.Serialization.cs index 77dbe544484e..a12f283335ea 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCINicInput : IUtf8JsonSerializable + public partial class VMwareToAzStackHciNicInput : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -28,7 +28,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VMwareToAzStackHCINicInput DeserializeVMwareToAzStackHCINicInput(JsonElement element) + internal static VMwareToAzStackHciNicInput DeserializeVMwareToAzStackHciNicInput(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -73,7 +73,7 @@ internal static VMwareToAzStackHCINicInput DeserializeVMwareToAzStackHCINicInput continue; } } - return new VMwareToAzStackHCINicInput(nicId, label, networkName.Value, targetNetworkId, testNetworkId, selectionTypeForFailover); + return new VMwareToAzStackHciNicInput(nicId, label, networkName.Value, targetNetworkId, testNetworkId, selectionTypeForFailover); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.cs similarity index 93% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.cs index 7bd58761dcd9..3bf2858bdcf3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCINicInput.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.cs @@ -11,16 +11,16 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMwareToAzStackHCI NIC properties. - public partial class VMwareToAzStackHCINicInput + public partial class VMwareToAzStackHciNicInput { - /// Initializes a new instance of VMwareToAzStackHCINicInput. + /// Initializes a new instance of VMwareToAzStackHciNicInput. /// Gets or sets the NIC Id. /// Gets or sets the NIC label. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. /// , , or is null. - public VMwareToAzStackHCINicInput(string nicId, string label, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + public VMwareToAzStackHciNicInput(string nicId, string label, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) { Argument.AssertNotNull(nicId, nameof(nicId)); Argument.AssertNotNull(label, nameof(label)); @@ -34,14 +34,14 @@ public VMwareToAzStackHCINicInput(string nicId, string label, string targetNetwo SelectionTypeForFailover = selectionTypeForFailover; } - /// Initializes a new instance of VMwareToAzStackHCINicInput. + /// Initializes a new instance of VMwareToAzStackHciNicInput. /// Gets or sets the NIC Id. /// Gets or sets the NIC label. /// Gets or sets the network name. /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - internal VMwareToAzStackHCINicInput(string nicId, string label, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) + internal VMwareToAzStackHciNicInput(string nicId, string label, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover) { NicId = nicId; Label = label; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs similarity index 85% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs index f22a636af9c8..d6cb0e2d152a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverModelCustomProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCIPlannedFailoverModelCustomProperties : IUtf8JsonSerializable + public partial class VMwareToAzStackHciPlannedFailoverModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,7 +22,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VMwareToAzStackHCIPlannedFailoverModelCustomProperties DeserializeVMwareToAzStackHCIPlannedFailoverModelCustomProperties(JsonElement element) + internal static VMwareToAzStackHciPlannedFailoverModelCustomProperties DeserializeVMwareToAzStackHciPlannedFailoverModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -43,7 +43,7 @@ internal static VMwareToAzStackHCIPlannedFailoverModelCustomProperties Deseriali continue; } } - return new VMwareToAzStackHCIPlannedFailoverModelCustomProperties(instanceType, shutdownSourceVm); + return new VMwareToAzStackHciPlannedFailoverModelCustomProperties(instanceType, shutdownSourceVm); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverModelCustomProperties.cs similarity index 81% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverModelCustomProperties.cs index d9a88b27d55d..c33c501814c9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPlannedFailoverModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverModelCustomProperties.cs @@ -8,20 +8,20 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMware to AzStackHCI planned failover model custom properties. - public partial class VMwareToAzStackHCIPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties + public partial class VMwareToAzStackHciPlannedFailoverModelCustomProperties : PlannedFailoverModelCustomProperties { - /// Initializes a new instance of VMwareToAzStackHCIPlannedFailoverModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciPlannedFailoverModelCustomProperties. /// Gets or sets a value indicating whether VM needs to be shut down. - public VMwareToAzStackHCIPlannedFailoverModelCustomProperties(bool shutdownSourceVm) + public VMwareToAzStackHciPlannedFailoverModelCustomProperties(bool shutdownSourceVm) { ShutdownSourceVm = shutdownSourceVm; InstanceType = "VMwareToAzStackHCI"; } - /// Initializes a new instance of VMwareToAzStackHCIPlannedFailoverModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciPlannedFailoverModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets a value indicating whether VM needs to be shut down. - internal VMwareToAzStackHCIPlannedFailoverModelCustomProperties(string instanceType, bool shutdownSourceVm) : base(instanceType) + internal VMwareToAzStackHciPlannedFailoverModelCustomProperties(string instanceType, bool shutdownSourceVm) : base(instanceType) { ShutdownSourceVm = shutdownSourceVm; InstanceType = instanceType ?? "VMwareToAzStackHCI"; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyModelCustomProperties.Serialization.cs similarity index 90% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyModelCustomProperties.Serialization.cs index 8e2dcc917e80..491444d25312 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyModelCustomProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCIPolicyModelCustomProperties : IUtf8JsonSerializable + public partial class VMwareToAzStackHciPolicyModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,7 +26,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VMwareToAzStackHCIPolicyModelCustomProperties DeserializeVMwareToAzStackHCIPolicyModelCustomProperties(JsonElement element) + internal static VMwareToAzStackHciPolicyModelCustomProperties DeserializeVMwareToAzStackHciPolicyModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -59,7 +59,7 @@ internal static VMwareToAzStackHCIPolicyModelCustomProperties DeserializeVMwareT continue; } } - return new VMwareToAzStackHCIPolicyModelCustomProperties(instanceType, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); + return new VMwareToAzStackHciPolicyModelCustomProperties(instanceType, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyModelCustomProperties.cs similarity index 91% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyModelCustomProperties.cs index 7413a3c94f13..169738f1455b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIPolicyModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyModelCustomProperties.cs @@ -8,16 +8,16 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMware To AzStackHCI Policy model custom properties. - public partial class VMwareToAzStackHCIPolicyModelCustomProperties : PolicyModelCustomProperties + public partial class VMwareToAzStackHciPolicyModelCustomProperties : PolicyModelCustomProperties { - /// Initializes a new instance of VMwareToAzStackHCIPolicyModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciPolicyModelCustomProperties. /// /// Gets or sets the duration in minutes until which the recovery points need to be /// stored. /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// Gets or sets the app consistent snapshot frequency (in minutes). - public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) + public VMwareToAzStackHciPolicyModelCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; @@ -25,7 +25,7 @@ public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM InstanceType = "VMwareToAzStackHCI"; } - /// Initializes a new instance of VMwareToAzStackHCIPolicyModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciPolicyModelCustomProperties. /// Gets or sets the instance type. /// /// Gets or sets the duration in minutes until which the recovery points need to be @@ -33,7 +33,7 @@ public VMwareToAzStackHCIPolicyModelCustomProperties(int recoveryPointHistoryInM /// /// Gets or sets the crash consistent snapshot frequency (in minutes). /// Gets or sets the app consistent snapshot frequency (in minutes). - internal VMwareToAzStackHCIPolicyModelCustomProperties(string instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) + internal VMwareToAzStackHciPolicyModelCustomProperties(string instanceType, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType) { RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.Serialization.cs similarity index 87% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.Serialization.cs index e1d3c18cd907..f3a8881fdb86 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHCIProtectedDiskProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.Serialization.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class HyperVToAzStackHCIProtectedDiskProperties + public partial class VMwareToAzStackHciProtectedDiskProperties { - internal static HyperVToAzStackHCIProtectedDiskProperties DeserializeHyperVToAzStackHCIProtectedDiskProperties(JsonElement element) + internal static VMwareToAzStackHciProtectedDiskProperties DeserializeVMwareToAzStackHciProtectedDiskProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional storageContainerId = default; + Optional storageContainerId = default; Optional storageContainerLocalPath = default; Optional sourceDiskId = default; Optional sourceDiskName = default; @@ -33,7 +33,11 @@ internal static HyperVToAzStackHCIProtectedDiskProperties DeserializeHyperVToAzS { if (property.NameEquals("storageContainerId"u8)) { - storageContainerId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageContainerId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("storageContainerLocalPath"u8)) @@ -99,7 +103,7 @@ internal static HyperVToAzStackHCIProtectedDiskProperties DeserializeHyperVToAzS continue; } } - return new HyperVToAzStackHCIProtectedDiskProperties(storageContainerId.Value, storageContainerLocalPath.Value, sourceDiskId.Value, sourceDiskName.Value, seedDiskName.Value, testMigrateDiskName.Value, migrateDiskName.Value, Optional.ToNullable(isOSDisk), Optional.ToNullable(capacityInBytes), Optional.ToNullable(isDynamic), diskType.Value); + return new VMwareToAzStackHciProtectedDiskProperties(storageContainerId.Value, storageContainerLocalPath.Value, sourceDiskId.Value, sourceDiskName.Value, seedDiskName.Value, testMigrateDiskName.Value, migrateDiskName.Value, Optional.ToNullable(isOSDisk), Optional.ToNullable(capacityInBytes), Optional.ToNullable(isDynamic), diskType.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.cs similarity index 84% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.cs index def196d1c3d4..59427974c591 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedDiskProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.cs @@ -5,17 +5,19 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMwareToAzStackHCI protected disk properties. - public partial class VMwareToAzStackHCIProtectedDiskProperties + public partial class VMwareToAzStackHciProtectedDiskProperties { - /// Initializes a new instance of VMwareToAzStackHCIProtectedDiskProperties. - internal VMwareToAzStackHCIProtectedDiskProperties() + /// Initializes a new instance of VMwareToAzStackHciProtectedDiskProperties. + internal VMwareToAzStackHciProtectedDiskProperties() { } - /// Initializes a new instance of VMwareToAzStackHCIProtectedDiskProperties. + /// Initializes a new instance of VMwareToAzStackHciProtectedDiskProperties. /// Gets or sets the ARM Id of the storage container. /// Gets or sets the local path of the storage container. /// Gets or sets the source disk Id. @@ -30,7 +32,7 @@ internal VMwareToAzStackHCIProtectedDiskProperties() /// disk. /// /// Gets or sets the disk type. - internal VMwareToAzStackHCIProtectedDiskProperties(string storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType) + internal VMwareToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType) { StorageContainerId = storageContainerId; StorageContainerLocalPath = storageContainerLocalPath; @@ -46,7 +48,7 @@ internal VMwareToAzStackHCIProtectedDiskProperties(string storageContainerId, st } /// Gets or sets the ARM Id of the storage container. - public string StorageContainerId { get; } + public ResourceIdentifier StorageContainerId { get; } /// Gets or sets the local path of the storage container. public string StorageContainerLocalPath { get; } /// Gets or sets the source disk Id. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemModelCustomProperties.Serialization.cs similarity index 90% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemModelCustomProperties.Serialization.cs index cb5ad8969d5a..ae01bbe1b4ef 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemModelCustomProperties.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCIProtectedItemModelCustomProperties : IUtf8JsonSerializable + public partial class VMwareToAzStackHciProtectedItemModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -96,24 +96,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VMwareToAzStackHCIProtectedItemModelCustomProperties DeserializeVMwareToAzStackHCIProtectedItemModelCustomProperties(JsonElement element) + internal static VMwareToAzStackHciProtectedItemModelCustomProperties DeserializeVMwareToAzStackHciProtectedItemModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } Optional activeLocation = default; - string targetHciClusterId = default; - string targetArcClusterCustomLocationId = default; + ResourceIdentifier targetHciClusterId = default; + ResourceIdentifier targetArcClusterCustomLocationId = default; Optional targetAzStackHciClusterName = default; - string storageContainerId = default; - string targetResourceGroupId = default; + ResourceIdentifier storageContainerId = default; + ResourceIdentifier targetResourceGroupId = default; Optional targetLocation = default; string customLocationRegion = default; - IList disksToInclude = default; - IList nicsToInclude = default; - Optional> protectedDisks = default; - Optional> protectedNics = default; + IList disksToInclude = default; + IList nicsToInclude = default; + Optional> protectedDisks = default; + Optional> protectedNics = default; Optional targetVmBiosId = default; Optional targetVmName = default; string hyperVGeneration = default; @@ -126,7 +126,7 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize Optional osType = default; Optional osName = default; Optional firmwareType = default; - string fabricDiscoveryMachineId = default; + ResourceIdentifier fabricDiscoveryMachineId = default; Optional sourceVmName = default; Optional sourceCpuCores = default; Optional sourceMemoryInMegaBytes = default; @@ -162,12 +162,12 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("targetHciClusterId"u8)) { - targetHciClusterId = property.Value.GetString(); + targetHciClusterId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetArcClusterCustomLocationId"u8)) { - targetArcClusterCustomLocationId = property.Value.GetString(); + targetArcClusterCustomLocationId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetAzStackHciClusterName"u8)) @@ -177,12 +177,12 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("storageContainerId"u8)) { - storageContainerId = property.Value.GetString(); + storageContainerId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetResourceGroupId"u8)) { - targetResourceGroupId = property.Value.GetString(); + targetResourceGroupId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("targetLocation"u8)) @@ -197,20 +197,20 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("disksToInclude"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VMwareToAzStackHCIDiskInput.DeserializeVMwareToAzStackHCIDiskInput(item)); + array.Add(VMwareToAzStackHciDiskInput.DeserializeVMwareToAzStackHciDiskInput(item)); } disksToInclude = array; continue; } if (property.NameEquals("nicsToInclude"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VMwareToAzStackHCINicInput.DeserializeVMwareToAzStackHCINicInput(item)); + array.Add(VMwareToAzStackHciNicInput.DeserializeVMwareToAzStackHciNicInput(item)); } nicsToInclude = array; continue; @@ -221,10 +221,10 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VMwareToAzStackHCIProtectedDiskProperties.DeserializeVMwareToAzStackHCIProtectedDiskProperties(item)); + array.Add(VMwareToAzStackHciProtectedDiskProperties.DeserializeVMwareToAzStackHciProtectedDiskProperties(item)); } protectedDisks = array; continue; @@ -235,10 +235,10 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VMwareToAzStackHCIProtectedNicProperties.DeserializeVMwareToAzStackHCIProtectedNicProperties(item)); + array.Add(VMwareToAzStackHciProtectedNicProperties.DeserializeVMwareToAzStackHciProtectedNicProperties(item)); } protectedNics = array; continue; @@ -321,7 +321,7 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize } if (property.NameEquals("fabricDiscoveryMachineId"u8)) { - fabricDiscoveryMachineId = property.Value.GetString(); + fabricDiscoveryMachineId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("sourceVmName"u8)) @@ -487,7 +487,7 @@ internal static VMwareToAzStackHCIProtectedItemModelCustomProperties Deserialize continue; } } - return new VMwareToAzStackHCIProtectedItemModelCustomProperties(instanceType, Optional.ToNullable(activeLocation), targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName.Value, storageContainerId, targetResourceGroupId, targetLocation.Value, customLocationRegion, disksToInclude, nicsToInclude, Optional.ToList(protectedDisks), Optional.ToList(protectedNics), targetVmBiosId.Value, targetVmName.Value, hyperVGeneration, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(targetCpuCores), Optional.ToNullable(isDynamicRam), dynamicMemoryConfig.Value, Optional.ToNullable(targetMemoryInMegaBytes), osType.Value, osName.Value, firmwareType.Value, fabricDiscoveryMachineId, sourceVmName.Value, Optional.ToNullable(sourceCpuCores), Optional.ToNullable(sourceMemoryInMegaBytes), runAsAccountId, sourceDraName, targetDraName, sourceApplianceName.Value, targetApplianceName.Value, failoverRecoveryPointId.Value, Optional.ToNullable(lastRecoveryPointReceived), lastRecoveryPointId.Value, Optional.ToNullable(initialReplicationProgressPercentage), Optional.ToNullable(migrationProgressPercentage), Optional.ToNullable(resumeProgressPercentage), Optional.ToNullable(resyncProgressPercentage), Optional.ToNullable(resyncRetryCount), Optional.ToNullable(resyncRequired), Optional.ToNullable(resyncState), Optional.ToNullable(performAutoResync), Optional.ToNullable(resumeRetryCount), Optional.ToNullable(lastReplicationUpdateTime)); + return new VMwareToAzStackHciProtectedItemModelCustomProperties(instanceType, Optional.ToNullable(activeLocation), targetHciClusterId, targetArcClusterCustomLocationId, targetAzStackHciClusterName.Value, storageContainerId, targetResourceGroupId, targetLocation.Value, customLocationRegion, disksToInclude, nicsToInclude, Optional.ToList(protectedDisks), Optional.ToList(protectedNics), targetVmBiosId.Value, targetVmName.Value, hyperVGeneration, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(targetCpuCores), Optional.ToNullable(isDynamicRam), dynamicMemoryConfig.Value, Optional.ToNullable(targetMemoryInMegaBytes), osType.Value, osName.Value, firmwareType.Value, fabricDiscoveryMachineId, sourceVmName.Value, Optional.ToNullable(sourceCpuCores), Optional.ToNullable(sourceMemoryInMegaBytes), runAsAccountId, sourceDraName, targetDraName, sourceApplianceName.Value, targetApplianceName.Value, failoverRecoveryPointId.Value, Optional.ToNullable(lastRecoveryPointReceived), lastRecoveryPointId.Value, Optional.ToNullable(initialReplicationProgressPercentage), Optional.ToNullable(migrationProgressPercentage), Optional.ToNullable(resumeProgressPercentage), Optional.ToNullable(resyncProgressPercentage), Optional.ToNullable(resyncRetryCount), Optional.ToNullable(resyncRequired), Optional.ToNullable(resyncState), Optional.ToNullable(performAutoResync), Optional.ToNullable(resumeRetryCount), Optional.ToNullable(lastReplicationUpdateTime)); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemModelCustomProperties.cs similarity index 85% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemModelCustomProperties.cs index 143e5c64dc31..caa97b6ef3d8 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedItemModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemModelCustomProperties.cs @@ -13,9 +13,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMware to AzStackHCI Protected item model custom properties. - public partial class VMwareToAzStackHCIProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties + public partial class VMwareToAzStackHciProtectedItemModelCustomProperties : ProtectedItemModelCustomProperties { - /// Initializes a new instance of VMwareToAzStackHCIProtectedItemModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciProtectedItemModelCustomProperties. /// Gets or sets the Target HCI Cluster ARM Id. /// Gets or sets the Target Arc Cluster Custom Location ARM Id. /// Gets or sets the target storage container ARM Id. @@ -29,7 +29,7 @@ public partial class VMwareToAzStackHCIProtectedItemModelCustomProperties : Prot /// Gets or sets the source DRA name. /// Gets or sets the target DRA name. /// , , , , , , , , , , or is null. - public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClusterId, string targetArcClusterCustomLocationId, string storageContainerId, string targetResourceGroupId, string customLocationRegion, IEnumerable disksToInclude, IEnumerable nicsToInclude, string hyperVGeneration, string fabricDiscoveryMachineId, string runAsAccountId, string sourceDraName, string targetDraName) + public VMwareToAzStackHciProtectedItemModelCustomProperties(ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, ResourceIdentifier storageContainerId, ResourceIdentifier targetResourceGroupId, string customLocationRegion, IEnumerable disksToInclude, IEnumerable nicsToInclude, string hyperVGeneration, ResourceIdentifier fabricDiscoveryMachineId, string runAsAccountId, string sourceDraName, string targetDraName) { Argument.AssertNotNull(targetHciClusterId, nameof(targetHciClusterId)); Argument.AssertNotNull(targetArcClusterCustomLocationId, nameof(targetArcClusterCustomLocationId)); @@ -51,8 +51,8 @@ public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus CustomLocationRegion = customLocationRegion; DisksToInclude = disksToInclude.ToList(); NicsToInclude = nicsToInclude.ToList(); - ProtectedDisks = new ChangeTrackingList(); - ProtectedNics = new ChangeTrackingList(); + ProtectedDisks = new ChangeTrackingList(); + ProtectedNics = new ChangeTrackingList(); HyperVGeneration = hyperVGeneration; FabricDiscoveryMachineId = fabricDiscoveryMachineId; RunAsAccountId = runAsAccountId; @@ -61,7 +61,7 @@ public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus InstanceType = "VMwareToAzStackHCI"; } - /// Initializes a new instance of VMwareToAzStackHCIProtectedItemModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciProtectedItemModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the location of the protected item. /// Gets or sets the Target HCI Cluster ARM Id. @@ -115,7 +115,7 @@ public VMwareToAzStackHCIProtectedItemModelCustomProperties(string targetHciClus /// Gets or sets a value indicating whether auto resync is to be done. /// Gets or sets the resume retry count. /// Gets or sets the latest timestamp that replication status is updated. - internal VMwareToAzStackHCIProtectedItemModelCustomProperties(string instanceType, ProtectedItemActiveLocation? activeLocation, string targetHciClusterId, string targetArcClusterCustomLocationId, string targetAzStackHciClusterName, string storageContainerId, string targetResourceGroupId, string targetLocation, string customLocationRegion, IList disksToInclude, IList nicsToInclude, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, string targetVmName, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType, string osName, string firmwareType, string fabricDiscoveryMachineId, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? migrationProgressPercentage, int? resumeProgressPercentage, int? resyncProgressPercentage, long? resyncRetryCount, bool? resyncRequired, VMwareToAzureMigrateResyncState? resyncState, bool? performAutoResync, long? resumeRetryCount, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) + internal VMwareToAzStackHciProtectedItemModelCustomProperties(string instanceType, ProtectedItemActiveLocation? activeLocation, ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, string targetAzStackHciClusterName, ResourceIdentifier storageContainerId, ResourceIdentifier targetResourceGroupId, string targetLocation, string customLocationRegion, IList disksToInclude, IList nicsToInclude, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, string targetVmName, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType, string osName, string firmwareType, ResourceIdentifier fabricDiscoveryMachineId, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string runAsAccountId, string sourceDraName, string targetDraName, string sourceApplianceName, string targetApplianceName, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceived, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? migrationProgressPercentage, int? resumeProgressPercentage, int? resyncProgressPercentage, long? resyncRetryCount, bool? resyncRequired, VMwareToAzureMigrateResyncState? resyncState, bool? performAutoResync, long? resumeRetryCount, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType) { ActiveLocation = activeLocation; TargetHciClusterId = targetHciClusterId; @@ -169,27 +169,27 @@ internal VMwareToAzStackHCIProtectedItemModelCustomProperties(string instanceTyp /// Gets or sets the location of the protected item. public ProtectedItemActiveLocation? ActiveLocation { get; } /// Gets or sets the Target HCI Cluster ARM Id. - public string TargetHciClusterId { get; set; } + public ResourceIdentifier TargetHciClusterId { get; set; } /// Gets or sets the Target Arc Cluster Custom Location ARM Id. - public string TargetArcClusterCustomLocationId { get; set; } + public ResourceIdentifier TargetArcClusterCustomLocationId { get; set; } /// Gets or sets the Target AzStackHCI cluster name. public string TargetAzStackHciClusterName { get; } /// Gets or sets the target storage container ARM Id. - public string StorageContainerId { get; set; } + public ResourceIdentifier StorageContainerId { get; set; } /// Gets or sets the target resource group ARM Id. - public string TargetResourceGroupId { get; set; } + public ResourceIdentifier TargetResourceGroupId { get; set; } /// Gets or sets the target location. public string TargetLocation { get; } /// Gets or sets the location of Azure Arc HCI custom location resource. public string CustomLocationRegion { get; set; } /// Gets or sets the list of disks to replicate. - public IList DisksToInclude { get; } + public IList DisksToInclude { get; } /// Gets or sets the list of VM NIC to replicate. - public IList NicsToInclude { get; } + public IList NicsToInclude { get; } /// Gets or sets the list of protected disks. - public IReadOnlyList ProtectedDisks { get; } + public IReadOnlyList ProtectedDisks { get; } /// Gets or sets the VM NIC details. - public IReadOnlyList ProtectedNics { get; } + public IReadOnlyList ProtectedNics { get; } /// Gets or sets the BIOS Id of the target AzStackHCI VM. public string TargetVmBiosId { get; } /// Gets or sets the target VM display name. @@ -215,7 +215,7 @@ internal VMwareToAzStackHCIProtectedItemModelCustomProperties(string instanceTyp /// Gets or sets the firmware type. public string FirmwareType { get; } /// Gets or sets the ARM Id of the discovered machine. - public string FabricDiscoveryMachineId { get; set; } + public ResourceIdentifier FabricDiscoveryMachineId { get; set; } /// Gets or sets the source VM display name. public string SourceVmName { get; } /// Gets or sets the source VM CPU cores. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.Serialization.cs similarity index 92% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.Serialization.cs index 928afb52b9fe..78904debb7e0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCIProtectedNicProperties + public partial class VMwareToAzStackHciProtectedNicProperties { - internal static VMwareToAzStackHCIProtectedNicProperties DeserializeVMwareToAzStackHCIProtectedNicProperties(JsonElement element) + internal static VMwareToAzStackHciProtectedNicProperties DeserializeVMwareToAzStackHciProtectedNicProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -77,7 +77,7 @@ internal static VMwareToAzStackHCIProtectedNicProperties DeserializeVMwareToAzSt continue; } } - return new VMwareToAzStackHCIProtectedNicProperties(nicId.Value, macAddress.Value, label.Value, Optional.ToNullable(isPrimaryNic), networkName.Value, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(selectionTypeForFailover)); + return new VMwareToAzStackHciProtectedNicProperties(nicId.Value, macAddress.Value, label.Value, Optional.ToNullable(isPrimaryNic), networkName.Value, targetNetworkId.Value, testNetworkId.Value, Optional.ToNullable(selectionTypeForFailover)); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.cs similarity index 90% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.cs index 90487938b721..5f15e24f3ec2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIProtectedNicProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.cs @@ -8,14 +8,14 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMwareToAzStackHCI NIC properties. - public partial class VMwareToAzStackHCIProtectedNicProperties + public partial class VMwareToAzStackHciProtectedNicProperties { - /// Initializes a new instance of VMwareToAzStackHCIProtectedNicProperties. - internal VMwareToAzStackHCIProtectedNicProperties() + /// Initializes a new instance of VMwareToAzStackHciProtectedNicProperties. + internal VMwareToAzStackHciProtectedNicProperties() { } - /// Initializes a new instance of VMwareToAzStackHCIProtectedNicProperties. + /// Initializes a new instance of VMwareToAzStackHciProtectedNicProperties. /// Gets or sets the NIC Id. /// Gets or sets the NIC mac address. /// Gets or sets the NIC label. @@ -24,7 +24,7 @@ internal VMwareToAzStackHCIProtectedNicProperties() /// Gets or sets the target network Id within AzStackHCI Cluster. /// Gets or sets the target test network Id within AzStackHCI Cluster. /// Gets or sets the selection type of the NIC. - internal VMwareToAzStackHCIProtectedNicProperties(string nicId, string macAddress, string label, bool? isPrimaryNic, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover) + internal VMwareToAzStackHciProtectedNicProperties(string nicId, string macAddress, string label, bool? isPrimaryNic, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover) { NicId = nicId; MacAddress = macAddress; diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs similarity index 80% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs index a393d9de12b0..574155f2bbbe 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionModelCustomProperties.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - public partial class VMwareToAzStackHCIReplicationExtensionModelCustomProperties : IUtf8JsonSerializable + public partial class VMwareToAzStackHciReplicationExtensionModelCustomProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -35,17 +35,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VMwareToAzStackHCIReplicationExtensionModelCustomProperties DeserializeVMwareToAzStackHCIReplicationExtensionModelCustomProperties(JsonElement element) + internal static VMwareToAzStackHciReplicationExtensionModelCustomProperties DeserializeVMwareToAzStackHciReplicationExtensionModelCustomProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - string vmwareFabricArmId = default; - Optional vmwareSiteId = default; - string azStackHciFabricArmId = default; - Optional azStackHciSiteId = default; - Optional storageAccountId = default; + ResourceIdentifier vmwareFabricArmId = default; + Optional vmwareSiteId = default; + ResourceIdentifier azStackHciFabricArmId = default; + Optional azStackHciSiteId = default; + Optional storageAccountId = default; Optional storageAccountSasSecretName = default; Optional asrServiceUri = default; Optional rcmServiceUri = default; @@ -62,27 +62,39 @@ internal static VMwareToAzStackHCIReplicationExtensionModelCustomProperties Dese { if (property.NameEquals("vmwareFabricArmId"u8)) { - vmwareFabricArmId = property.Value.GetString(); + vmwareFabricArmId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("vmwareSiteId"u8)) { - vmwareSiteId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmwareSiteId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("azStackHciFabricArmId"u8)) { - azStackHciFabricArmId = property.Value.GetString(); + azStackHciFabricArmId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("azStackHciSiteId"u8)) { - azStackHciSiteId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azStackHciSiteId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("storageAccountId"u8)) { - storageAccountId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageAccountId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("storageAccountSasSecretName"u8)) @@ -158,7 +170,7 @@ internal static VMwareToAzStackHCIReplicationExtensionModelCustomProperties Dese continue; } } - return new VMwareToAzStackHCIReplicationExtensionModelCustomProperties(instanceType, vmwareFabricArmId, vmwareSiteId.Value, azStackHciFabricArmId, azStackHciSiteId.Value, storageAccountId.Value, storageAccountSasSecretName.Value, asrServiceUri.Value, rcmServiceUri.Value, gatewayServiceUri.Value, sourceGatewayServiceId.Value, targetGatewayServiceId.Value, sourceStorageContainerName.Value, targetStorageContainerName.Value, resourceLocation.Value, subscriptionId.Value, resourceGroup.Value); + return new VMwareToAzStackHciReplicationExtensionModelCustomProperties(instanceType, vmwareFabricArmId, vmwareSiteId.Value, azStackHciFabricArmId, azStackHciSiteId.Value, storageAccountId.Value, storageAccountSasSecretName.Value, asrServiceUri.Value, rcmServiceUri.Value, gatewayServiceUri.Value, sourceGatewayServiceId.Value, targetGatewayServiceId.Value, sourceStorageContainerName.Value, targetStorageContainerName.Value, resourceLocation.Value, subscriptionId.Value, resourceGroup.Value); } } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionModelCustomProperties.cs similarity index 81% rename from sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs rename to sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionModelCustomProperties.cs index c40c771ab934..53db8f1821ba 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHCIReplicationExtensionModelCustomProperties.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionModelCustomProperties.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { /// VMware to AzStackHCI Replication extension model custom properties. - public partial class VMwareToAzStackHCIReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties + public partial class VMwareToAzStackHciReplicationExtensionModelCustomProperties : ReplicationExtensionModelCustomProperties { - /// Initializes a new instance of VMwareToAzStackHCIReplicationExtensionModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciReplicationExtensionModelCustomProperties. /// Gets or sets the ARM Id of the source VMware fabric. /// Gets or sets the ARM Id of the target AzStackHCI fabric. /// or is null. - public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmwareFabricArmId, string azStackHciFabricArmId) + public VMwareToAzStackHciReplicationExtensionModelCustomProperties(ResourceIdentifier vmwareFabricArmId, ResourceIdentifier azStackHciFabricArmId) { Argument.AssertNotNull(vmwareFabricArmId, nameof(vmwareFabricArmId)); Argument.AssertNotNull(azStackHciFabricArmId, nameof(azStackHciFabricArmId)); @@ -27,7 +27,7 @@ public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmware InstanceType = "VMwareToAzStackHCI"; } - /// Initializes a new instance of VMwareToAzStackHCIReplicationExtensionModelCustomProperties. + /// Initializes a new instance of VMwareToAzStackHciReplicationExtensionModelCustomProperties. /// Gets or sets the instance type. /// Gets or sets the ARM Id of the source VMware fabric. /// Gets or sets the ARM Id of the VMware site. @@ -45,7 +45,7 @@ public VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string vmware /// Gets or sets the resource location. /// Gets or sets the subscription. /// Gets or sets the resource group. - internal VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string instanceType, string vmwareFabricArmId, string vmwareSiteId, string azStackHciFabricArmId, string azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) + internal VMwareToAzStackHciReplicationExtensionModelCustomProperties(string instanceType, ResourceIdentifier vmwareFabricArmId, ResourceIdentifier vmwareSiteId, ResourceIdentifier azStackHciFabricArmId, ResourceIdentifier azStackHciSiteId, ResourceIdentifier storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType) { VmwareFabricArmId = vmwareFabricArmId; VmwareSiteId = vmwareSiteId; @@ -67,15 +67,15 @@ internal VMwareToAzStackHCIReplicationExtensionModelCustomProperties(string inst } /// Gets or sets the ARM Id of the source VMware fabric. - public string VmwareFabricArmId { get; set; } + public ResourceIdentifier VmwareFabricArmId { get; set; } /// Gets or sets the ARM Id of the VMware site. - public string VmwareSiteId { get; } + public ResourceIdentifier VmwareSiteId { get; } /// Gets or sets the ARM Id of the target AzStackHCI fabric. - public string AzStackHciFabricArmId { get; set; } + public ResourceIdentifier AzStackHciFabricArmId { get; set; } /// Gets or sets the ARM Id of the AzStackHCI site. - public string AzStackHciSiteId { get; } + public ResourceIdentifier AzStackHciSiteId { get; } /// Gets or sets the storage account Id. - public string StorageAccountId { get; set; } + public ResourceIdentifier StorageAccountId { get; set; } /// Gets or sets the Sas Secret of storage account. public string StorageAccountSasSecretName { get; set; } /// Gets or sets the Uri of ASR. diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs deleted file mode 100644 index 2fb24c1f0f6c..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelCollection.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.RecoveryServicesDataReplication; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - internal partial class VaultModelCollection - { - internal static VaultModelCollection DeserializeVaultModelCollection(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(VaultModelData.DeserializeVaultModelData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new VaultModelCollection(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs deleted file mode 100644 index 2350628a4f9d..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowModelCollection.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.RecoveryServicesDataReplication; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - internal partial class WorkflowModelCollection - { - internal static WorkflowModelCollection DeserializeWorkflowModelCollection(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(WorkflowModelData.DeserializeWorkflowModelData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new WorkflowModelCollection(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs deleted file mode 100644 index 5b65015d3222..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/WorkflowState.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models -{ - /// Gets or sets the workflow state. - public readonly partial struct WorkflowState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WorkflowState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PendingValue = "Pending"; - private const string StartedValue = "Started"; - private const string CancellingValue = "Cancelling"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CancelledValue = "Cancelled"; - private const string CompletedWithInformationValue = "CompletedWithInformation"; - private const string CompletedWithWarningsValue = "CompletedWithWarnings"; - private const string CompletedWithErrorsValue = "CompletedWithErrors"; - - /// Pending. - public static WorkflowState Pending { get; } = new WorkflowState(PendingValue); - /// Started. - public static WorkflowState Started { get; } = new WorkflowState(StartedValue); - /// Cancelling. - public static WorkflowState Cancelling { get; } = new WorkflowState(CancellingValue); - /// Succeeded. - public static WorkflowState Succeeded { get; } = new WorkflowState(SucceededValue); - /// Failed. - public static WorkflowState Failed { get; } = new WorkflowState(FailedValue); - /// Cancelled. - public static WorkflowState Cancelled { get; } = new WorkflowState(CancelledValue); - /// CompletedWithInformation. - public static WorkflowState CompletedWithInformation { get; } = new WorkflowState(CompletedWithInformationValue); - /// CompletedWithWarnings. - public static WorkflowState CompletedWithWarnings { get; } = new WorkflowState(CompletedWithWarningsValue); - /// CompletedWithErrors. - public static WorkflowState CompletedWithErrors { get; } = new WorkflowState(CompletedWithErrorsValue); - /// Determines if two values are the same. - public static bool operator ==(WorkflowState left, WorkflowState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WorkflowState left, WorkflowState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WorkflowState(string value) => new WorkflowState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WorkflowState other && Equals(other); - /// - public bool Equals(WorkflowState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs index f461938b2a11..89efcab0ff2f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/AzureSiteRecoveryManagementServiceAPIRestOperations.cs @@ -37,7 +37,7 @@ public AzureSiteRecoveryManagementServiceAPIRestOperations(HttpPipeline pipeline _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, CheckNameAvailabilityModel body) + internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, AzureLocation location, DataReplicationNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -52,12 +52,12 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (body != null) + if (content != null) { request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; } _userAgent.Apply(message); return message; @@ -66,23 +66,23 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A /// Checks the resource name availability. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. - /// Resource details. + /// Resource details. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + public async Task> CheckNameAvailabilityAsync(string subscriptionId, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, body); + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - CheckNameAvailabilityResponseModel value = default; + DataReplicationNameAvailabilityResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CheckNameAvailabilityResponseModel.DeserializeCheckNameAvailabilityResponseModel(document.RootElement); + value = DataReplicationNameAvailabilityResult.DeserializeDataReplicationNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -93,23 +93,23 @@ public async Task> CheckNameAvailab /// Checks the resource name availability. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. - /// Resource details. + /// Resource details. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response CheckNameAvailability(string subscriptionId, AzureLocation location, CheckNameAvailabilityModel body = null, CancellationToken cancellationToken = default) + public Response CheckNameAvailability(string subscriptionId, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, body); + using var message = CreateCheckNameAvailabilityRequest(subscriptionId, location, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - CheckNameAvailabilityResponseModel value = default; + DataReplicationNameAvailabilityResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CheckNameAvailabilityResponseModel.DeserializeCheckNameAvailabilityResponseModel(document.RootElement); + value = DataReplicationNameAvailabilityResult.DeserializeDataReplicationNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs deleted file mode 100644 index 0f01bd6d12cf..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraOperationStatusRestOperations.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal partial class DraOperationStatusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of DraOperationStatusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public DraOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-16-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); - uri.AppendPath("/fabricAgents/", false); - uri.AppendPath(fabricAgentName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Tracks the results of an asynchronous operation on the fabric agent. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The fabric name. - /// The fabric agent (Dra) name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Tracks the results of an asynchronous operation on the fabric agent. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The fabric name. - /// The fabric agent (Dra) name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs index f81fe9a93de9..f061ec779464 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DraRestOperations.cs @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -80,13 +80,13 @@ public async Task> GetAsync(string subscriptionId, string { case 200: { - DraModelData value = default; + DataReplicationDraData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DraModelData.DeserializeDraModelData(document.RootElement); + value = DataReplicationDraData.DeserializeDataReplicationDraData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DraModelData)null, message.Response); + return Response.FromValue((DataReplicationDraData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -100,7 +100,7 @@ public async Task> GetAsync(string subscriptionId, string /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -113,19 +113,19 @@ public Response Get(string subscriptionId, string resourceGroupNam { case 200: { - DraModelData value = default; + DataReplicationDraData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DraModelData.DeserializeDraModelData(document.RootElement); + value = DataReplicationDraData.DeserializeDataReplicationDraData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DraModelData)null, message.Response); + return Response.FromValue((DataReplicationDraData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DraModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DataReplicationDraData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -160,7 +160,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DataReplicationDraData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -189,7 +189,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DraModelData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DataReplicationDraData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -313,7 +313,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -325,9 +325,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.DraModelCollection value = default; + DataReplicationDraListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + value = DataReplicationDraListResult.DeserializeDataReplicationDraListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -342,7 +342,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -354,9 +354,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.DraModelCollection value = default; + DataReplicationDraListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + value = DataReplicationDraListResult.DeserializeDataReplicationDraListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -386,7 +386,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -399,9 +399,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.DraModelCollection value = default; + DataReplicationDraListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + value = DataReplicationDraListResult.DeserializeDataReplicationDraListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -417,7 +417,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -430,9 +430,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.DraModelCollection value = default; + DataReplicationDraListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.DraModelCollection.DeserializeDraModelCollection(document.RootElement); + value = DataReplicationDraListResult.DeserializeDataReplicationDraListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs index f7267a610268..c9a7fd9bbae9 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -80,13 +80,13 @@ public async Task> GetAsync(string subscri { case 200: { - EmailConfigurationModelData value = default; + DataReplicationEmailConfigurationData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EmailConfigurationModelData)null, message.Response); + return Response.FromValue((DataReplicationEmailConfigurationData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -100,7 +100,7 @@ public async Task> GetAsync(string subscri /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -113,19 +113,19 @@ public Response Get(string subscriptionId, string r { case 200: { - EmailConfigurationModelData value = default; + DataReplicationEmailConfigurationData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EmailConfigurationModelData)null, message.Response); + return Response.FromValue((DataReplicationEmailConfigurationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, EmailConfigurationModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, DataReplicationEmailConfigurationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -160,7 +160,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -175,9 +175,9 @@ public async Task> CreateAsync(string subs case 200: case 201: { - EmailConfigurationModelData value = default; + DataReplicationEmailConfigurationData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -194,7 +194,7 @@ public async Task> CreateAsync(string subs /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, EmailConfigurationModelData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -209,9 +209,9 @@ public Response Create(string subscriptionId, strin case 200: case 201: { - EmailConfigurationModelData value = default; + DataReplicationEmailConfigurationData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EmailConfigurationModelData.DeserializeEmailConfigurationModelData(document.RootElement); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -247,7 +247,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -259,9 +259,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.EmailConfigurationModelCollection value = default; + DataReplicationEmailConfigurationListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + value = DataReplicationEmailConfigurationListResult.DeserializeDataReplicationEmailConfigurationListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -276,7 +276,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -288,9 +288,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.EmailConfigurationModelCollection value = default; + DataReplicationEmailConfigurationListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + value = DataReplicationEmailConfigurationListResult.DeserializeDataReplicationEmailConfigurationListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -320,7 +320,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -333,9 +333,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.EmailConfigurationModelCollection value = default; + DataReplicationEmailConfigurationListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + value = DataReplicationEmailConfigurationListResult.DeserializeDataReplicationEmailConfigurationListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -351,7 +351,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -364,9 +364,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.EmailConfigurationModelCollection value = default; + DataReplicationEmailConfigurationListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.EmailConfigurationModelCollection.DeserializeEmailConfigurationModelCollection(document.RootElement); + value = DataReplicationEmailConfigurationListResult.DeserializeDataReplicationEmailConfigurationListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs index f1b918d082cb..0e5f027ca9c5 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -80,13 +80,13 @@ public async Task> GetAsync(string subscriptionId, stri { case 200: { - EventModelData value = default; + DataReplicationEventData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EventModelData.DeserializeEventModelData(document.RootElement); + value = DataReplicationEventData.DeserializeDataReplicationEventData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EventModelData)null, message.Response); + return Response.FromValue((DataReplicationEventData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -100,7 +100,7 @@ public async Task> GetAsync(string subscriptionId, stri /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -113,13 +113,13 @@ public Response Get(string subscriptionId, string resourceGroupN { case 200: { - EventModelData value = default; + DataReplicationEventData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EventModelData.DeserializeEventModelData(document.RootElement); + value = DataReplicationEventData.DeserializeDataReplicationEventData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EventModelData)null, message.Response); + return Response.FromValue((DataReplicationEventData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -163,7 +163,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -175,9 +175,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.EventModelCollection value = default; + DataReplicationEventListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + value = DataReplicationEventListResult.DeserializeDataReplicationEventListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -194,7 +194,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -206,9 +206,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.EventModelCollection value = default; + DataReplicationEventListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + value = DataReplicationEventListResult.DeserializeDataReplicationEventListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -240,7 +240,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -253,9 +253,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.EventModelCollection value = default; + DataReplicationEventListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + value = DataReplicationEventListResult.DeserializeDataReplicationEventListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -273,7 +273,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -286,9 +286,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.EventModelCollection value = default; + DataReplicationEventListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.EventModelCollection.DeserializeEventModelCollection(document.RootElement); + value = DataReplicationEventListResult.DeserializeDataReplicationEventListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs deleted file mode 100644 index 85386c9e76d1..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricOperationsStatusRestOperations.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal partial class FabricOperationsStatusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of FabricOperationsStatusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public FabricOperationsStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-16-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Tracks the results of an asynchronous operation on the fabric. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The fabric name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Tracks the results of an asynchronous operation on the fabric. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The fabric name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs index be4ae9e710ac..35814b5088d4 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs @@ -64,7 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -76,13 +76,13 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - FabricModelData value = default; + DataReplicationFabricData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = FabricModelData.DeserializeFabricModelData(document.RootElement); + value = DataReplicationFabricData.DeserializeDataReplicationFabricData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FabricModelData)null, message.Response); + return Response.FromValue((DataReplicationFabricData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -95,7 +95,7 @@ public async Task> GetAsync(string subscriptionId, str /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -107,19 +107,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - FabricModelData value = default; + DataReplicationFabricData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = FabricModelData.DeserializeFabricModelData(document.RootElement); + value = DataReplicationFabricData.DeserializeDataReplicationFabricData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((FabricModelData)null, message.Response); + return Response.FromValue((DataReplicationFabricData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, FabricModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -151,7 +151,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -178,7 +178,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string fabricName, FabricModelData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -197,7 +197,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string f } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fabricName, FabricModelPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -229,7 +229,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fabricName, FabricModelPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -256,7 +256,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string fabricName, FabricModelPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -372,7 +372,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionAsync(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -382,9 +382,9 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -398,7 +398,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListBySubscription(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -408,9 +408,9 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -448,7 +448,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -459,9 +459,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -476,7 +476,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -487,9 +487,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -518,7 +518,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -529,9 +529,9 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -546,7 +546,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -557,9 +557,9 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -589,7 +589,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -601,9 +601,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -619,7 +619,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -631,9 +631,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.FabricModelCollection value = default; + DataReplicationFabricListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.FabricModelCollection.DeserializeFabricModelCollection(document.RootElement); + value = DataReplicationFabricListResult.DeserializeDataReplicationFabricListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs deleted file mode 100644 index d4f883472ed4..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyOperationStatusRestOperations.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal partial class PolicyOperationStatusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PolicyOperationStatusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PolicyOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-16-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); - uri.AppendPath("/replicationPolicies/", false); - uri.AppendPath(policyName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Tracks the results of an asynchronous operation on the policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The policy name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Tracks the results of an asynchronous operation on the policy. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The policy name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string policyName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs index 868644c6654e..72677c0dffa0 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -80,13 +80,13 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - PolicyModelData value = default; + DataReplicationPolicyData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PolicyModelData.DeserializePolicyModelData(document.RootElement); + value = DataReplicationPolicyData.DeserializeDataReplicationPolicyData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((PolicyModelData)null, message.Response); + return Response.FromValue((DataReplicationPolicyData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -100,7 +100,7 @@ public async Task> GetAsync(string subscriptionId, str /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -113,19 +113,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - PolicyModelData value = default; + DataReplicationPolicyData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PolicyModelData.DeserializePolicyModelData(document.RootElement); + value = DataReplicationPolicyData.DeserializeDataReplicationPolicyData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((PolicyModelData)null, message.Response); + return Response.FromValue((DataReplicationPolicyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, PolicyModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, DataReplicationPolicyData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -160,7 +160,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -189,7 +189,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string policyName, PolicyModelData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -313,7 +313,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -325,9 +325,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.PolicyModelCollection value = default; + DataReplicationPolicyListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + value = DataReplicationPolicyListResult.DeserializeDataReplicationPolicyListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -342,7 +342,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -354,9 +354,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.PolicyModelCollection value = default; + DataReplicationPolicyListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + value = DataReplicationPolicyListResult.DeserializeDataReplicationPolicyListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -386,7 +386,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -399,9 +399,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.PolicyModelCollection value = default; + DataReplicationPolicyListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + value = DataReplicationPolicyListResult.DeserializeDataReplicationPolicyListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -417,7 +417,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -430,9 +430,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.PolicyModelCollection value = default; + DataReplicationPolicyListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.PolicyModelCollection.DeserializePolicyModelCollection(document.RootElement); + value = DataReplicationPolicyListResult.DeserializeDataReplicationPolicyListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs deleted file mode 100644 index 460f0ff538cd..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemOperationStatusRestOperations.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal partial class ProtectedItemOperationStatusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ProtectedItemOperationStatusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ProtectedItemOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-16-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); - uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Tracks the results of an asynchronous operation on the protected item. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The protected item name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Tracks the results of an asynchronous operation on the protected item. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The protected item name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs index edb6b854a54c..71cb225f1ba3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -80,13 +80,13 @@ public async Task> GetAsync(string subscription { case 200: { - ProtectedItemModelData value = default; + DataReplicationProtectedItemData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); + value = DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ProtectedItemModelData)null, message.Response); + return Response.FromValue((DataReplicationProtectedItemData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -100,7 +100,7 @@ public async Task> GetAsync(string subscription /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -113,19 +113,19 @@ public Response Get(string subscriptionId, string resour { case 200: { - ProtectedItemModelData value = default; + DataReplicationProtectedItemData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ProtectedItemModelData.DeserializeProtectedItemModelData(document.RootElement); + value = DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ProtectedItemModelData)null, message.Response); + return Response.FromValue((DataReplicationProtectedItemData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, ProtectedItemModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -160,7 +160,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -189,7 +189,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, ProtectedItemModelData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -319,7 +319,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -331,9 +331,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ProtectedItemModelCollection value = default; + DataReplicationProtectedItemListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + value = DataReplicationProtectedItemListResult.DeserializeDataReplicationProtectedItemListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -348,7 +348,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -360,9 +360,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ProtectedItemModelCollection value = default; + DataReplicationProtectedItemListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + value = DataReplicationProtectedItemListResult.DeserializeDataReplicationProtectedItemListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -478,7 +478,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -491,9 +491,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ProtectedItemModelCollection value = default; + DataReplicationProtectedItemListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + value = DataReplicationProtectedItemListResult.DeserializeDataReplicationProtectedItemListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -509,7 +509,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -522,9 +522,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ProtectedItemModelCollection value = default; + DataReplicationProtectedItemListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ProtectedItemModelCollection.DeserializeProtectedItemModelCollection(document.RootElement); + value = DataReplicationProtectedItemListResult.DeserializeDataReplicationProtectedItemListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs index 4bface856365..e98e467bfd39 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointsRestOperations.cs @@ -70,7 +70,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -84,13 +84,13 @@ public async Task> GetAsync(string subscription { case 200: { - RecoveryPointModelData value = default; + DataReplicationRecoveryPointData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RecoveryPointModelData.DeserializeRecoveryPointModelData(document.RootElement); + value = DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((RecoveryPointModelData)null, message.Response); + return Response.FromValue((DataReplicationRecoveryPointData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -105,7 +105,7 @@ public async Task> GetAsync(string subscription /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -119,13 +119,13 @@ public Response Get(string subscriptionId, string resour { case 200: { - RecoveryPointModelData value = default; + DataReplicationRecoveryPointData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RecoveryPointModelData.DeserializeRecoveryPointModelData(document.RootElement); + value = DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((RecoveryPointModelData)null, message.Response); + return Response.FromValue((DataReplicationRecoveryPointData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -162,7 +162,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -175,9 +175,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.RecoveryPointModelCollection value = default; + DataReplicationRecoveryPointListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + value = DataReplicationRecoveryPointListResult.DeserializeDataReplicationRecoveryPointListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -193,7 +193,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -206,9 +206,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.RecoveryPointModelCollection value = default; + DataReplicationRecoveryPointListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + value = DataReplicationRecoveryPointListResult.DeserializeDataReplicationRecoveryPointListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -239,7 +239,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -253,9 +253,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.RecoveryPointModelCollection value = default; + DataReplicationRecoveryPointListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + value = DataReplicationRecoveryPointListResult.DeserializeDataReplicationRecoveryPointListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -272,7 +272,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -286,9 +286,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.RecoveryPointModelCollection value = default; + DataReplicationRecoveryPointListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.RecoveryPointModelCollection.DeserializeRecoveryPointModelCollection(document.RootElement); + value = DataReplicationRecoveryPointListResult.DeserializeDataReplicationRecoveryPointListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs deleted file mode 100644 index 2c9cfeb372ab..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionOperationStatusRestOperations.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal partial class ReplicationExtensionOperationStatusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ReplicationExtensionOperationStatusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ReplicationExtensionOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-16-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); - uri.AppendPath("/replicationExtensions/", false); - uri.AppendPath(replicationExtensionName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Tracks the results of an asynchronous operation on the replication extension. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The replication extension name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Tracks the results of an asynchronous operation on the replication extension. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The replication extension name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs index d6a23ce1e6a4..932c049ae076 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -80,13 +80,13 @@ public async Task> GetAsync(string subsc { case 200: { - ReplicationExtensionModelData value = default; + DataReplicationReplicationExtensionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); + value = DataReplicationReplicationExtensionData.DeserializeDataReplicationReplicationExtensionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ReplicationExtensionModelData)null, message.Response); + return Response.FromValue((DataReplicationReplicationExtensionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -100,7 +100,7 @@ public async Task> GetAsync(string subsc /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -113,19 +113,19 @@ public Response Get(string subscriptionId, string { case 200: { - ReplicationExtensionModelData value = default; + DataReplicationReplicationExtensionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(document.RootElement); + value = DataReplicationReplicationExtensionData.DeserializeDataReplicationReplicationExtensionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ReplicationExtensionModelData)null, message.Response); + return Response.FromValue((DataReplicationReplicationExtensionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, ReplicationExtensionModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, DataReplicationReplicationExtensionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -160,7 +160,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, DataReplicationReplicationExtensionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -189,7 +189,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, ReplicationExtensionModelData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, DataReplicationReplicationExtensionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -313,7 +313,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -325,9 +325,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ReplicationExtensionModelCollection value = default; + DataReplicationReplicationExtensionListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + value = DataReplicationReplicationExtensionListResult.DeserializeDataReplicationReplicationExtensionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -342,7 +342,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -354,9 +354,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.ReplicationExtensionModelCollection value = default; + DataReplicationReplicationExtensionListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + value = DataReplicationReplicationExtensionListResult.DeserializeDataReplicationReplicationExtensionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -386,7 +386,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -399,9 +399,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ReplicationExtensionModelCollection value = default; + DataReplicationReplicationExtensionListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + value = DataReplicationReplicationExtensionListResult.DeserializeDataReplicationReplicationExtensionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -417,7 +417,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -430,9 +430,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.ReplicationExtensionModelCollection value = default; + DataReplicationReplicationExtensionListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.ReplicationExtensionModelCollection.DeserializeReplicationExtensionModelCollection(document.RootElement); + value = DataReplicationReplicationExtensionListResult.DeserializeDataReplicationReplicationExtensionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs deleted file mode 100644 index 72b8bb8e37db..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultOperationStatusRestOperations.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal partial class VaultOperationStatusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of VaultOperationStatusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public VaultOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-16-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Tracks the results of an asynchronous operation on the vault. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Tracks the results of an asynchronous operation on the vault. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs index 9ff2f9dd199e..3fb964073ea3 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs @@ -64,7 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -76,13 +76,13 @@ public async Task> GetAsync(string subscriptionId, stri { case 200: { - VaultModelData value = default; + DataReplicationVaultData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = VaultModelData.DeserializeVaultModelData(document.RootElement); + value = DataReplicationVaultData.DeserializeDataReplicationVaultData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((VaultModelData)null, message.Response); + return Response.FromValue((DataReplicationVaultData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -95,7 +95,7 @@ public async Task> GetAsync(string subscriptionId, stri /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -107,19 +107,19 @@ public Response Get(string subscriptionId, string resourceGroupN { case 200: { - VaultModelData value = default; + DataReplicationVaultData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = VaultModelData.DeserializeVaultModelData(document.RootElement); + value = DataReplicationVaultData.DeserializeDataReplicationVaultData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((VaultModelData)null, message.Response); + return Response.FromValue((DataReplicationVaultData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, VaultModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -151,7 +151,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -178,7 +178,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string vaultName, VaultModelData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -197,7 +197,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, VaultModelPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -229,7 +229,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, VaultModelPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -256,7 +256,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string vaultName, VaultModelPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -372,7 +372,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionAsync(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -382,9 +382,9 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -398,7 +398,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListBySubscription(string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -408,9 +408,9 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -448,7 +448,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -459,9 +459,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -476,7 +476,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -487,9 +487,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -518,7 +518,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -529,9 +529,9 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -546,7 +546,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -557,9 +557,9 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -589,7 +589,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -601,9 +601,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -619,7 +619,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -631,9 +631,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.VaultModelCollection value = default; + DataReplicationVaultListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.VaultModelCollection.DeserializeVaultModelCollection(document.RootElement); + value = DataReplicationVaultListResult.DeserializeDataReplicationVaultListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs deleted file mode 100644 index 8cf9195c5da2..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowOperationStatusRestOperations.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - internal partial class WorkflowOperationStatusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of WorkflowOperationStatusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public WorkflowOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-16-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string jobName, string operationId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); - uri.AppendPath("/jobs/", false); - uri.AppendPath(jobName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Tracks the results of an asynchronous operation on the job. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The job (workflow) name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string jobName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName, operationId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Tracks the results of an asynchronous operation on the job. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The vault name. - /// The job (workflow) name. - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string jobName, string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); - Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName, operationId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OperationStatus value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OperationStatus.DeserializeOperationStatus(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs index 80153aff19c1..68aed0f22a7a 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/WorkflowRestOperations.cs @@ -67,7 +67,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -80,13 +80,13 @@ public async Task> GetAsync(string subscriptionId, s { case 200: { - WorkflowModelData value = default; + DataReplicationWorkflowData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkflowModelData.DeserializeWorkflowModelData(document.RootElement); + value = DataReplicationWorkflowData.DeserializeDataReplicationWorkflowData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkflowModelData)null, message.Response); + return Response.FromValue((DataReplicationWorkflowData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -100,7 +100,7 @@ public async Task> GetAsync(string subscriptionId, s /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -113,13 +113,13 @@ public Response Get(string subscriptionId, string resourceGro { case 200: { - WorkflowModelData value = default; + DataReplicationWorkflowData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkflowModelData.DeserializeWorkflowModelData(document.RootElement); + value = DataReplicationWorkflowData.DeserializeDataReplicationWorkflowData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkflowModelData)null, message.Response); + return Response.FromValue((DataReplicationWorkflowData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -163,7 +163,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -175,9 +175,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.WorkflowModelCollection value = default; + DataReplicationWorkflowListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + value = DataReplicationWorkflowListResult.DeserializeDataReplicationWorkflowListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -194,7 +194,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -206,9 +206,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro { case 200: { - Models.WorkflowModelCollection value = default; + DataReplicationWorkflowListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + value = DataReplicationWorkflowListResult.DeserializeDataReplicationWorkflowListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -240,7 +240,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -253,9 +253,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.WorkflowModelCollection value = default; + DataReplicationWorkflowListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + value = DataReplicationWorkflowListResult.DeserializeDataReplicationWorkflowListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -273,7 +273,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter = null, string continuationToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -286,9 +286,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript { case 200: { - Models.WorkflowModelCollection value = default; + DataReplicationWorkflowListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = Models.WorkflowModelCollection.DeserializeWorkflowModelCollection(document.RootElement); + value = DataReplicationWorkflowListResult.DeserializeDataReplicationWorkflowListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs deleted file mode 100644 index 71d965967a82..000000000000 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/WorkflowModelResource.cs +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.RecoveryServicesDataReplication.Models; - -namespace Azure.ResourceManager.RecoveryServicesDataReplication -{ - /// - /// A Class representing a WorkflowModel along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetWorkflowModelResource method. - /// Otherwise you can get one from its parent resource using the GetWorkflowModel method. - /// - public partial class WorkflowModelResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _workflowModelWorkflowClientDiagnostics; - private readonly WorkflowRestOperations _workflowModelWorkflowRestClient; - private readonly ClientDiagnostics _workflowOperationStatusClientDiagnostics; - private readonly WorkflowOperationStatusRestOperations _workflowOperationStatusRestClient; - private readonly WorkflowModelData _data; - - /// Initializes a new instance of the class for mocking. - protected WorkflowModelResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal WorkflowModelResource(ArmClient client, WorkflowModelData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal WorkflowModelResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workflowModelWorkflowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string workflowModelWorkflowApiVersion); - _workflowModelWorkflowRestClient = new WorkflowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowModelWorkflowApiVersion); - _workflowOperationStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _workflowOperationStatusRestClient = new WorkflowOperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/jobs"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual WorkflowModelData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the details of the job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} - /// - /// - /// Operation Id - /// Workflow_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelResource.Get"); - scope.Start(); - try - { - var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the details of the job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} - /// - /// - /// Operation Id - /// Workflow_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _workflowModelWorkflowClientDiagnostics.CreateScope("WorkflowModelResource.Get"); - scope.Start(); - try - { - var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}/operations/{operationId} - /// - /// - /// Operation Id - /// WorkflowOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetWorkflowOperationStatuAsync(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _workflowOperationStatusClientDiagnostics.CreateScope("WorkflowModelResource.GetWorkflowOperationStatu"); - scope.Start(); - try - { - var response = await _workflowOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tracks the results of an asynchronous operation on the job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}/operations/{operationId} - /// - /// - /// Operation Id - /// WorkflowOperationStatus_Get - /// - /// - /// - /// The ID of an ongoing async operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetWorkflowOperationStatu(string operationId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - - using var scope = _workflowOperationStatusClientDiagnostics.CreateScope("WorkflowModelResource.GetWorkflowOperationStatu"); - scope.Start(); - try - { - var response = _workflowOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md index 6ec2a89b9837..946ef8c9f604 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/autorest.md @@ -8,13 +8,105 @@ csharp: true library-name: RecoveryServicesDataReplication namespace: Azure.ResourceManager.RecoveryServicesDataReplication require: https://github.com/Azure/azure-rest-api-specs/blob/64cddc58b25ae7d6e50cc0dfb5bc19af4ea23f65/specification/recoveryservicesdatareplication/resource-manager/readme.md +#tag: package-2021-02-16-preview output-folder: $(this-folder)/Generated clear-output-folder: true +sample-gen: + output-folder: $(this-folder)/../samples/Generated + clear-output-folder: true skip-csproj: true modelerfour: flatten-payloads: false - +#mgmt-debug: +# show-serialized-names: true + +rename-mapping: + AzStackHCIFabricModelCustomProperties.azStackHciSiteId: -|arm-id + AzStackHCIFabricModelCustomProperties.fabricResourceId: -|arm-id + AzStackHCIFabricModelCustomProperties.migrationSolutionId: -|arm-id + DraModelProperties.lastHeartbeat: LastHeartbeatOn + CheckNameAvailabilityModel: DataReplicationNameAvailabilityContent + CheckNameAvailabilityModel.type: -|resource-type + CheckNameAvailabilityResponseModel: DataReplicationNameAvailabilityResult + CheckNameAvailabilityResponseModel.nameAvailable: IsNameAvailable + DeploymentPreflightResource.type: -|resource-type + DraModel: DataReplicationDra + DraModelCollection: DataReplicationDraListResult + DraModelProperties: DataReplicationDraProperties + EmailConfigurationModel: DataReplicationEmailConfiguration + EmailConfigurationModelCollection: DataReplicationEmailConfigurationListResult + EmailConfigurationModelProperties: DataReplicationEmailConfigurationProperties + ErrorModel: DataReplicationErrorInfo + EventModel: DataReplicationEvent + EventModelCollection: DataReplicationEventListResult + EventModelProperties: DataReplicationEventProperties + EventModelProperties.resourceType: -|resource-type + EventModelProperties.timeOfOccurrence: OccurredOn + FabricModel: DataReplicationFabric + FabricModelCollection: DataReplicationFabricListResult + FabricModelProperties: DataReplicationFabricProperties + FabricModelProperties.serviceResourceId: -|arm-id + HealthErrorModel: DataReplicationHealthErrorInfo + HealthStatus: DataReplicationHealthStatus + HyperVMigrateFabricModelCustomProperties.hyperVSiteId: -|arm-id + HyperVMigrateFabricModelCustomProperties.fabricResourceId: -|arm-id + HyperVMigrateFabricModelCustomProperties.migrationSolutionId: -|arm-id + HyperVToAzStackHCIDiskInput.storageContainerId: -|arm-id + HyperVToAzStackHCIProtectedDiskProperties.storageContainerId: -|arm-id + HyperVToAzStackHCIProtectedItemModelCustomProperties.targetHciClusterId: -|arm-id + HyperVToAzStackHCIProtectedItemModelCustomProperties.targetArcClusterCustomLocationId: -|arm-id + HyperVToAzStackHCIProtectedItemModelCustomProperties.fabricDiscoveryMachineId: -|arm-id + HyperVToAzStackHCIProtectedItemModelCustomProperties.targetResourceGroupId: -|arm-id + HyperVToAzStackHCIProtectedItemModelCustomProperties.storageContainerId: -|arm-id + HyperVToAzStackHCIReplicationExtensionModelCustomProperties.hyperVFabricArmId: -|arm-id + HyperVToAzStackHCIReplicationExtensionModelCustomProperties.hyperVSiteId: -|arm-id + HyperVToAzStackHCIReplicationExtensionModelCustomProperties.azStackHciFabricArmId: -|arm-id + HyperVToAzStackHCIReplicationExtensionModelCustomProperties.azStackHciSiteId: -|arm-id + IdentityModel: DataReplicationIdentity + InnerHealthErrorModel: DataReplicationInnerHealthErrorInfo + PolicyModel: DataReplicationPolicy + PolicyModelCollection: DataReplicationPolicyListResult + PolicyModelProperties: DataReplicationPolicyProperties + ProtectedItemModel: DataReplicationProtectedItem + ProtectedItemModelCollection: DataReplicationProtectedItemListResult + ProtectedItemModelProperties: DataReplicationProtectedItemProperties + ProtectedItemModelProperties.resyncRequired: IsResyncRequired + ProtectionState: DataReplicationProtectionState + ProvisioningState: DataReplicationProvisioningState + RecoveryPointModel: DataReplicationRecoveryPoint + RecoveryPointModelCollection: DataReplicationRecoveryPointListResult + RecoveryPointModelProperties: DataReplicationRecoveryPointProperties + RecoveryPointType: DataReplicationRecoveryPointType + ReplicationExtensionModel: DataReplicationReplicationExtension + ReplicationExtensionModelCollection: DataReplicationReplicationExtensionListResult + ReplicationExtensionModelProperties: DataReplicationReplicationExtensionProperties + ReplicationVaultType: DataReplicationReplicationVaultType + ResynchronizationState: DataReplicationResynchronizationState + TaskModel: DataReplicationTask + TaskState: DataReplicationTaskState + TestFailoverState: DataReplicationTestFailoverState + VaultModel: DataReplicationVault + VaultModelCollection: DataReplicationVaultListResult + VaultModelProperties: DataReplicationVaultProperties + VaultModelProperties.serviceResourceId: -|arm-id + VMwareMigrateFabricModelCustomProperties.vmwareSiteId: VMwareSiteId|arm-id + VMwareMigrateFabricModelCustomProperties.migrationSolutionId: -|arm-id + VMwareToAzStackHCIProtectedDiskProperties.storageContainerId: -|arm-id + VMwareToAzStackHCIProtectedItemModelCustomProperties.targetHciClusterId: -|arm-id + VMwareToAzStackHCIProtectedItemModelCustomProperties.targetArcClusterCustomLocationId: -|arm-id + VMwareToAzStackHCIProtectedItemModelCustomProperties.storageContainerId: -|arm-id + VMwareToAzStackHCIProtectedItemModelCustomProperties.targetResourceGroupId: -|arm-id + VMwareToAzStackHCIProtectedItemModelCustomProperties.fabricDiscoveryMachineId: -|arm-id + VMwareToAzStackHCIReplicationExtensionModelCustomProperties.vmwareFabricArmId: -|arm-id + VMwareToAzStackHCIReplicationExtensionModelCustomProperties.vmwareSiteId: -|arm-id + VMwareToAzStackHCIReplicationExtensionModelCustomProperties.azStackHciFabricArmId: -|arm-id + VMwareToAzStackHCIReplicationExtensionModelCustomProperties.azStackHciSiteId: -|arm-id + VMwareToAzStackHCIReplicationExtensionModelCustomProperties.storageAccountId: -|arm-id + WorkflowModel: DataReplicationWorkflow + WorkflowModelCollection: DataReplicationWorkflowListResult + WorkflowModelProperties: DataReplicationWorkflowProperties + WorkflowState: DataReplicationWorkflowState format-by-name-rules: 'tenantId': 'uuid' @@ -23,7 +115,7 @@ format-by-name-rules: '*Uri': 'Uri' '*Uris': 'Uri' -rename-rules: +acronym-mapping: CPU: Cpu CPUs: Cpus Os: OS @@ -45,5 +137,94 @@ rename-rules: SSO: Sso URI: Uri Etag: ETag|etag + HCI: Hci + +override-operation-name: + CheckNameAvailability: CheckDataReplicationNameAvailability +directive: + # Remove all operation methods that already exist in core + - remove-operation: DraOperationStatus_Get + - remove-operation: FabricOperationsStatus_Get + - remove-operation: PolicyOperationStatus_Get + - remove-operation: ProtectedItemOperationStatus_Get + - remove-operation: ReplicationExtensionOperationStatus_Get + - remove-operation: VaultOperationStatus_Get + - remove-operation: WorkflowOperationStatus_Get + # Remove anonymous models + - from: recoveryservicesdatareplication.json + where: $.definitions + transform: > + delete $.ProtectedItemModelProperties.properties.currentJob.allOf; + $.ProtectedItemModelProperties.properties.currentJob['$ref'] = '#/definitions/ProtectedItemJobProperties'; + delete $.ProtectedItemModelProperties.properties.lastFailedEnableProtectionJob.allOf; + $.ProtectedItemModelProperties.properties.lastFailedEnableProtectionJob['$ref'] = '#/definitions/ProtectedItemJobProperties'; + delete $.ProtectedItemModelProperties.properties.lastFailedPlannedFailoverJob.allOf; + $.ProtectedItemModelProperties.properties.lastFailedPlannedFailoverJob['$ref'] = '#/definitions/ProtectedItemJobProperties'; + delete $.ProtectedItemModelProperties.properties.lastTestFailoverJob.allOf; + $.ProtectedItemModelProperties.properties.lastTestFailoverJob['$ref'] = '#/definitions/ProtectedItemJobProperties'; + # There are incorrect x-ms-discriminator-value in examples, should fix in the later + - from: recoveryservicesdatareplication.json + where: $.definitions + transform: > + $.GeneralDraModelCustomProperties = { + "description": "General DRA model custom properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DraModelCustomProperties" + } + ], + "x-ms-discriminator-value": "DraModelCustomProperties" + }; + $.GeneralFabricModelCustomProperties = { + "description": "General fabric model custom properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/FabricModelCustomProperties" + } + ], + "x-ms-discriminator-value": "FabricModelCustomProperties" + }; + $.GeneralPolicyModelCustomProperties = { + "description": "General Policy model custom properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PolicyModelCustomProperties" + } + ], + "x-ms-discriminator-value": "PolicyModelCustomProperties" + }; + $.GeneralProtectedItemModelCustomProperties = { + "description": "General Protected item model custom properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProtectedItemModelCustomProperties" + } + ], + "x-ms-discriminator-value": "ProtectedItemModelCustomProperties" + }; + $.GeneralPlannedFailoverModelCustomProperties = { + "description": "General planned failover model custom properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/PlannedFailoverModelCustomProperties" + } + ], + "x-ms-discriminator-value": "PlannedFailoverModelCustomProperties" + }; + $.GeneralReplicationExtensionModelCustomProperties = { + "description": "General Replication extension model custom properties.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ReplicationExtensionModelCustomProperties" + } + ], + "x-ms-discriminator-value": "ReplicationExtensionModelCustomProperties" + }; ``` \ No newline at end of file diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 9b1db2c83004..3ff7e90822a1 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -146,6 +146,7 @@ trigger: - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - sdk/relay/Azure.ResourceManager.Relay - sdk/reservations/Azure.ResourceManager.Reservations + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - sdk/resourcemover/Azure.ResourceManager.ResourceMover @@ -667,6 +668,7 @@ pr: - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - sdk/relay/Azure.ResourceManager.Relay - sdk/reservations/Azure.ResourceManager.Reservations + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth - sdk/resourcemover/Azure.ResourceManager.ResourceMover