From 7879ca8611c8777a3c97cb04174686de2ffc78f3 Mon Sep 17 00:00:00 2001 From: Sam Lee Date: Mon, 28 Aug 2023 20:40:20 -0700 Subject: [PATCH] Updated with latest swagger --- ...veryServicesDataReplicationModelFactory.cs | 26 +-- .../src/Generated/DraModelCollection.cs | 78 +++----- .../src/Generated/DraModelResource.cs | 82 ++++---- .../EmailConfigurationModelCollection.cs | 62 ++---- .../EmailConfigurationModelResource.cs | 20 +- .../src/Generated/EventModelCollection.cs | 44 ++--- .../src/Generated/EventModelResource.cs | 4 +- ...coveryServicesDataReplicationExtensions.cs | 28 +-- .../src/Generated/FabricModelCollection.cs | 58 ++---- .../src/Generated/FabricModelResource.cs | 68 +++---- ...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 | 66 ++----- .../src/Generated/PolicyModelResource.cs | 50 ++--- .../Generated/ProtectedItemModelCollection.cs | 66 ++----- .../Generated/ProtectedItemModelResource.cs | 72 +++---- .../Generated/RecoveryPointModelCollection.cs | 44 ++--- .../Generated/RecoveryPointModelResource.cs | 4 +- .../ReplicationExtensionModelCollection.cs | 66 ++----- .../ReplicationExtensionModelResource.cs | 50 ++--- .../DraOperationStatusRestOperations.cs | 50 +++-- .../RestOperations/DraRestOperations.cs | 147 ++++++--------- .../EmailConfigurationRestOperations.cs | 117 +++++------- .../RestOperations/EventRestOperations.cs | 87 ++++----- .../FabricOperationsStatusRestOperations.cs | 41 ++-- .../RestOperations/FabricRestOperations.cs | 104 +++++----- .../PolicyOperationStatusRestOperations.cs | 50 +++-- .../RestOperations/PolicyRestOperations.cs | 147 ++++++--------- ...tectedItemOperationStatusRestOperations.cs | 50 +++-- .../ProtectedItemRestOperations.cs | 177 +++++++----------- .../RecoveryPointsRestOperations.cs | 106 +++++------ ...nExtensionOperationStatusRestOperations.cs | 50 +++-- .../ReplicationExtensionRestOperations.cs | 147 ++++++--------- .../VaultOperationStatusRestOperations.cs | 41 ++-- .../RestOperations/VaultRestOperations.cs | 104 +++++----- .../WorkflowOperationStatusRestOperations.cs | 50 +++-- .../RestOperations/WorkflowRestOperations.cs | 87 ++++----- .../src/Generated/VaultModelCollection.cs | 58 ++---- .../src/Generated/VaultModelResource.cs | 138 +++++--------- .../src/Generated/WorkflowModelCollection.cs | 52 ++--- .../src/Generated/WorkflowModelResource.cs | 34 ++-- 106 files changed, 1225 insertions(+), 2116 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/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..dcb86cf8099a 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,19 @@ 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. /// 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 null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, 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); + var response = await _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -98,7 +95,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 +104,19 @@ 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. /// 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 null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, 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); + var response = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -139,7 +133,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 +141,14 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); @@ -176,7 +165,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 +173,14 @@ public virtual async Task> GetAsync(string draName, C /// /// /// - /// 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) + public virtual Response Get(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); + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); @@ -225,8 +209,8 @@ public virtual Response Get(string draName, CancellationToken /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -247,8 +231,8 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _draModelDraRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _draModelDraRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DraModelResource(Client, DraModelData.DeserializeDraModelData(e)), _draModelDraClientDiagnostics, Pipeline, "DraModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -257,7 +241,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 +249,14 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -292,7 +271,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 +279,14 @@ public virtual async Task> ExistsAsync(string draName, Cancellati /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, 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..e9997dfc71a3 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 @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(CancellationToken scope.Start(); try { - var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); @@ -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 @@ -144,7 +144,7 @@ public virtual Response Get(CancellationToken cancellationToke scope.Start(); try { - var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DraModelResource(Client, response.Value), response.GetRawResponse()); @@ -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 @@ -177,8 +177,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell 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 _draModelDraRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -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 @@ -211,8 +211,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel 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 = _draModelDraRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -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 @@ -249,8 +249,8 @@ public virtual async Task> UpdateAsync(WaitUntil 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 _draModelDraRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -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 @@ -287,8 +287,8 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DraMod 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 = _draModelDraRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DraModelOperationSource(Client), _draModelDraClientDiagnostics, Pipeline, _draModelDraRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -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 @@ -313,19 +313,14 @@ public virtual ArmOperation Update(WaitUntil waitUntil, DraMod /// /// /// - /// 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) + public virtual async Task> GetDraOperationStatuAsync(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); + var response = await _draOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -340,7 +335,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 @@ -348,19 +343,14 @@ public virtual async Task> GetDraOperationStatuAsync(s /// /// /// - /// 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) + public virtual Response GetDraOperationStatu(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); + var response = _draOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return response; } catch (Exception e) @@ -375,7 +365,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 @@ -401,7 +391,7 @@ public virtual async Task> AddTagAsync(string key, st 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); + var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -424,7 +414,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 @@ -450,7 +440,7 @@ public virtual Response AddTag(string key, string value, Cance 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); + var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -473,7 +463,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 @@ -498,7 +488,7 @@ public virtual async Task> SetTagsAsync(IDictionary> 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 @@ -546,7 +536,7 @@ public virtual Response SetTags(IDictionary ta 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); + var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -569,7 +559,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 @@ -593,7 +583,7 @@ public virtual async Task> RemoveTagAsync(string key, 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); + var originalResponse = await _draModelDraRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -616,7 +606,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 @@ -640,7 +630,7 @@ public virtual Response RemoveTag(string key, CancellationToke 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); + var originalResponse = _draModelDraRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new DraModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else 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..77a59ee0affe 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelCollection.cs @@ -66,21 +66,18 @@ 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. /// 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) + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, 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 response = await _emailConfigurationModelEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, 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); @@ -107,21 +104,18 @@ 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. /// 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) + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, 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 response = _emailConfigurationModelEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); @@ -147,19 +141,14 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); @@ -184,19 +173,14 @@ public virtual async Task> GetAsync(st /// /// /// - /// 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) + public virtual Response Get(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); + var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); @@ -225,8 +209,8 @@ public virtual Response Get(string emailConfigu /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -247,8 +231,8 @@ public virtual AsyncPageable GetAllAsync(Cancel /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _emailConfigurationModelEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _emailConfigurationModelEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmailConfigurationModelResource(Client, EmailConfigurationModelData.DeserializeEmailConfigurationModelData(e)), _emailConfigurationModelEmailConfigurationClientDiagnostics, Pipeline, "EmailConfigurationModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,19 +249,14 @@ public virtual Pageable GetAll(CancellationToke /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -300,19 +279,14 @@ public virtual async Task> ExistsAsync(string emailConfigurationN /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) 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..385627d86ebf 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EmailConfigurationModelResource.cs @@ -107,7 +107,7 @@ public virtual async Task> GetAsync(Ca scope.Start(); try { - var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); @@ -139,7 +139,7 @@ public virtual Response Get(CancellationToken c scope.Start(); try { - var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EmailConfigurationModelResource(Client, response.Value), response.GetRawResponse()); @@ -176,7 +176,7 @@ public virtual async Task> UpdateA scope.Start(); try { - var response = await _emailConfigurationModelEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var response = await _emailConfigurationModelEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, 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); @@ -214,7 +214,7 @@ public virtual ArmOperation Update(WaitUntil wa scope.Start(); try { - var response = _emailConfigurationModelEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var response = _emailConfigurationModelEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new EmailConfigurationModelResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); @@ -258,7 +258,7 @@ public virtual async Task> AddTagAsync 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); + var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -307,7 +307,7 @@ public virtual Response AddTag(string key, stri 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); + var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -355,7 +355,7 @@ public virtual async Task> SetTagsAsyn 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); + var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -403,7 +403,7 @@ public virtual Response SetTags(IDictionary> RemoveTagAs 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); + var originalResponse = await _emailConfigurationModelEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -497,7 +497,7 @@ public virtual Response RemoveTag(string key, C 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); + var originalResponse = _emailConfigurationModelEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new EmailConfigurationModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else 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..5eea5b3e977e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelCollection.cs @@ -65,19 +65,14 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); @@ -102,19 +97,14 @@ public virtual async Task> GetAsync(string eventNam /// /// /// - /// 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) + public virtual Response Get(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); + var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); @@ -145,8 +135,8 @@ public virtual Response Get(string eventName, CancellationTo /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -169,8 +159,8 @@ public virtual AsyncPageable GetAllAsync(string filter = nul /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventModelEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventModelEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventModelResource(Client, EventModelData.DeserializeEventModelData(e)), _eventModelEventClientDiagnostics, Pipeline, "EventModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -187,19 +177,14 @@ public virtual Pageable GetAll(string filter = null, string /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -222,19 +207,14 @@ public virtual async Task> ExistsAsync(string eventName, Cancella /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs index 9920ed88e4c2..37f9501688d7 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/EventModelResource.cs @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(CancellationTok scope.Start(); try { - var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _eventModelEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); @@ -138,7 +138,7 @@ public virtual Response Get(CancellationToken cancellationTo scope.Start(); try { - var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _eventModelEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventModelResource(Client, response.Value), response.GetRawResponse()); 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..aed72df491c3 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,14 +262,11 @@ public static FabricModelCollection GetFabricModels(this ResourceGroupResource r /// /// /// 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) + public static async Task> GetFabricModelAsync(this ResourceGroupResource resourceGroupResource, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetFabricModels().GetAsync(fabricName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetFabricModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -286,14 +283,11 @@ public static async Task> GetFabricModelAsync(this /// /// /// 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) + public static Response GetFabricModel(this ResourceGroupResource resourceGroupResource, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetFabricModels().Get(fabricName, cancellationToken); + return resourceGroupResource.GetFabricModels().Get(cancellationToken); } /// Gets a collection of VaultModelResources in the ResourceGroupResource. @@ -318,14 +312,11 @@ public static VaultModelCollection GetVaultModels(this ResourceGroupResource res /// /// /// 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) + public static async Task> GetVaultModelAsync(this ResourceGroupResource resourceGroupResource, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetVaultModels().GetAsync(vaultName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetVaultModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -342,14 +333,11 @@ public static async Task> GetVaultModelAsync(this R /// /// /// 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) + public static Response GetVaultModel(this ResourceGroupResource resourceGroupResource, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetVaultModels().Get(vaultName, cancellationToken); + return resourceGroupResource.GetVaultModels().Get(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 ccd5e3ce60d3..28687caea5c2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/FabricModelCollection.cs @@ -67,22 +67,19 @@ 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. /// 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) + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, 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); + var response = await _fabricModelFabricRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -108,22 +105,19 @@ 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. /// 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) + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, 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); + var response = _fabricModelFabricRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -148,19 +142,14 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); @@ -185,19 +174,14 @@ public virtual async Task> GetAsync(string fabricN /// /// /// - /// 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) + public virtual Response Get(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); + var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); @@ -268,19 +252,14 @@ public virtual Pageable GetAll(string continuationToken = n /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -303,19 +282,14 @@ public virtual async Task> ExistsAsync(string fabricName, Cancell /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) 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..ce7303fb6fb9 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,11 @@ public virtual DraModelCollection GetDraModels() /// /// /// - /// 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) + public virtual async Task> GetDraModelAsync(CancellationToken cancellationToken = default) { - return await GetDraModels().GetAsync(draName, cancellationToken).ConfigureAwait(false); + return await GetDraModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -128,7 +125,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 +133,11 @@ public virtual async Task> GetDraModelAsync(string dr /// /// /// - /// 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) + public virtual Response GetDraModel(CancellationToken cancellationToken = default) { - return GetDraModels().Get(draName, cancellationToken); + return GetDraModels().Get(cancellationToken); } /// @@ -166,7 +160,7 @@ public virtual async Task> GetAsync(CancellationTo scope.Start(); try { - var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); @@ -198,7 +192,7 @@ public virtual Response Get(CancellationToken cancellationT scope.Start(); try { - var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new FabricModelResource(Client, response.Value), response.GetRawResponse()); @@ -231,8 +225,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell 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 _fabricModelFabricRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -265,8 +259,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel 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 = _fabricModelFabricRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -303,8 +297,8 @@ public virtual async Task> UpdateAsync(WaitUnt 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 _fabricModelFabricRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -341,8 +335,8 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Fab 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 = _fabricModelFabricRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new FabricModelOperationSource(Client), _fabricModelFabricClientDiagnostics, Pipeline, _fabricModelFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -367,19 +361,14 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Fab /// /// /// - /// 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) + public virtual async Task> GetFabricOperationsStatuAsync(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); + var response = await _fabricOperationsStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -402,19 +391,14 @@ public virtual async Task> GetFabricOperationsStatuAsy /// /// /// - /// 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) + public virtual Response GetFabricOperationsStatu(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); + var response = _fabricOperationsStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return response; } catch (Exception e) @@ -455,7 +439,7 @@ 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); + var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -509,7 +493,7 @@ 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); + var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -562,7 +546,7 @@ 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); + var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -611,7 +595,7 @@ 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); + var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -659,7 +643,7 @@ 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); + var originalResponse = await _fabricModelFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -711,7 +695,7 @@ 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); + var originalResponse = _fabricModelFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new FabricModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else 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..346fb3d742c7 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelCollection.cs @@ -66,22 +66,19 @@ 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. /// 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) + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, 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); + var response = await _policyModelPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -107,22 +104,19 @@ 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. /// 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) + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, 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); + var response = _policyModelPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -147,19 +141,14 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); @@ -184,19 +173,14 @@ public virtual async Task> GetAsync(string policyN /// /// /// - /// 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) + public virtual Response Get(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); + var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); @@ -225,8 +209,8 @@ public virtual Response Get(string policyName, Cancellation /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -247,8 +231,8 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyModelPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyModelPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PolicyModelResource(Client, PolicyModelData.DeserializePolicyModelData(e)), _policyModelPolicyClientDiagnostics, Pipeline, "PolicyModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,19 +249,14 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -300,19 +279,14 @@ public virtual async Task> ExistsAsync(string policyName, Cancell /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) 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..eac4e8b43d09 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/PolicyModelResource.cs @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(CancellationTo scope.Start(); try { - var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); @@ -144,7 +144,7 @@ public virtual Response Get(CancellationToken cancellationT scope.Start(); try { - var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PolicyModelResource(Client, response.Value), response.GetRawResponse()); @@ -177,8 +177,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell 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 _policyModelPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -211,8 +211,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel 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 = _policyModelPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -249,8 +249,8 @@ public virtual async Task> UpdateAsync(WaitUnt 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 _policyModelPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -287,8 +287,8 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Pol 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 = _policyModelPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PolicyModelOperationSource(Client), _policyModelPolicyClientDiagnostics, Pipeline, _policyModelPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -313,19 +313,14 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Pol /// /// /// - /// 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) + public virtual async Task> GetPolicyOperationStatuAsync(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); + var response = await _policyOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -348,19 +343,14 @@ public virtual async Task> GetPolicyOperationStatuAsyn /// /// /// - /// 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) + public virtual Response GetPolicyOperationStatu(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); + var response = _policyOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return response; } catch (Exception e) @@ -401,7 +391,7 @@ 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 _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -450,7 +440,7 @@ 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 = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -498,7 +488,7 @@ 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 _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -546,7 +536,7 @@ 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 = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -593,7 +583,7 @@ 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 _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _policyModelPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -640,7 +630,7 @@ 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 = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var originalResponse = _policyModelPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new PolicyModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else 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..35739530837e 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelCollection.cs @@ -66,22 +66,19 @@ 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. /// 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) + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, 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); + var response = await _protectedItemModelProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -107,22 +104,19 @@ 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. /// 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) + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, 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); + var response = _protectedItemModelProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -147,19 +141,14 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); @@ -184,19 +173,14 @@ public virtual async Task> GetAsync(string /// /// /// - /// 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) + public virtual Response Get(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); + var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); @@ -225,8 +209,8 @@ public virtual Response Get(string protectedItemName /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -247,8 +231,8 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _protectedItemModelProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _protectedItemModelProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProtectedItemModelResource(Client, ProtectedItemModelData.DeserializeProtectedItemModelData(e)), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, "ProtectedItemModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,19 +249,14 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -300,19 +279,14 @@ public virtual async Task> ExistsAsync(string protectedItemName, /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) 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..de876c9d8a2d 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProtectedItemModelResource.cs @@ -112,14 +112,11 @@ public virtual RecoveryPointModelCollection GetRecoveryPointModels() /// /// /// - /// 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) + public virtual async Task> GetRecoveryPointModelAsync(CancellationToken cancellationToken = default) { - return await GetRecoveryPointModels().GetAsync(recoveryPointName, cancellationToken).ConfigureAwait(false); + return await GetRecoveryPointModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -135,14 +132,11 @@ public virtual async Task> GetRecoveryPoint /// /// /// - /// 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) + public virtual Response GetRecoveryPointModel(CancellationToken cancellationToken = default) { - return GetRecoveryPointModels().Get(recoveryPointName, cancellationToken); + return GetRecoveryPointModels().Get(cancellationToken); } /// @@ -165,7 +159,7 @@ public virtual async Task> GetAsync(Cancell scope.Start(); try { - var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); @@ -197,7 +191,7 @@ public virtual Response Get(CancellationToken cancel scope.Start(); try { - var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ProtectedItemModelResource(Client, response.Value), response.GetRawResponse()); @@ -231,8 +225,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f 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 _protectedItemModelProtectedItemRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, forceDelete, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, forceDelete).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -266,8 +260,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null 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 = _protectedItemModelProtectedItemRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, forceDelete, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, forceDelete).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -304,8 +298,8 @@ public virtual async Task> UpdateAsync( 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 _protectedItemModelProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -342,8 +336,8 @@ public virtual ArmOperation Update(WaitUntil waitUnt 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 = _protectedItemModelProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ProtectedItemModelOperationSource(Client), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -377,8 +371,8 @@ public virtual async Task> PlannedFailoverAsy 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 _protectedItemModelProtectedItemRestClient.PlannedFailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, body, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -412,8 +406,8 @@ public virtual ArmOperation PlannedFailover(WaitUntil wait 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 = _protectedItemModelProtectedItemRestClient.PlannedFailover(Id.SubscriptionId, Id.ResourceGroupName, body, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverModelOperationSource(), _protectedItemModelProtectedItemClientDiagnostics, Pipeline, _protectedItemModelProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -438,19 +432,14 @@ public virtual ArmOperation PlannedFailover(WaitUntil wait /// /// /// - /// 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) + public virtual async Task> GetProtectedItemOperationStatuAsync(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); + var response = await _protectedItemOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -473,19 +462,14 @@ public virtual async Task> GetProtectedItemOperationSt /// /// /// - /// 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) + public virtual Response GetProtectedItemOperationStatu(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); + var response = _protectedItemOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return response; } catch (Exception e) @@ -526,7 +510,7 @@ public virtual async Task> AddTagAsync(stri 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); + var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -575,7 +559,7 @@ public virtual Response AddTag(string key, string va 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); + var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -623,7 +607,7 @@ public virtual async Task> SetTagsAsync(IDi 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); + var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -671,7 +655,7 @@ public virtual Response SetTags(IDictionary> RemoveTagAsync(s 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); + var originalResponse = await _protectedItemModelProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -765,7 +749,7 @@ public virtual Response RemoveTag(string key, Cancel 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); + var originalResponse = _protectedItemModelProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new ProtectedItemModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else 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..19d3d7d97f38 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelCollection.cs @@ -65,19 +65,14 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); @@ -102,19 +97,14 @@ public virtual async Task> GetAsync(string /// /// /// - /// 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) + public virtual Response Get(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); + var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); @@ -143,8 +133,8 @@ public virtual Response Get(string recoveryPointName /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -165,8 +155,8 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _recoveryPointModelRecoveryPointsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _recoveryPointModelRecoveryPointsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RecoveryPointModelResource(Client, RecoveryPointModelData.DeserializeRecoveryPointModelData(e)), _recoveryPointModelRecoveryPointsClientDiagnostics, Pipeline, "RecoveryPointModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -183,19 +173,14 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -218,19 +203,14 @@ public virtual async Task> ExistsAsync(string recoveryPointName, /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs index ec4514b5c090..df3027d8f8fc 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RecoveryPointModelResource.cs @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(Cancell 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 _recoveryPointModelRecoveryPointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); @@ -138,7 +138,7 @@ public virtual Response Get(CancellationToken cancel scope.Start(); try { - var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var response = _recoveryPointModelRecoveryPointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new RecoveryPointModelResource(Client, response.Value), response.GetRawResponse()); 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..dea1e92c598c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelCollection.cs @@ -66,22 +66,19 @@ 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. /// 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) + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, 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); + var response = await _replicationExtensionModelReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -107,22 +104,19 @@ 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. /// 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) + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, 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); + var response = _replicationExtensionModelReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -147,19 +141,14 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); @@ -184,19 +173,14 @@ public virtual async Task> GetAsync( /// /// /// - /// 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) + public virtual Response Get(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); + var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); @@ -225,8 +209,8 @@ public virtual Response Get(string replicatio /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -247,8 +231,8 @@ public virtual AsyncPageable GetAllAsync(Canc /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _replicationExtensionModelReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _replicationExtensionModelReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ReplicationExtensionModelResource(Client, ReplicationExtensionModelData.DeserializeReplicationExtensionModelData(e)), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, "ReplicationExtensionModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,19 +249,14 @@ public virtual Pageable GetAll(CancellationTo /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -300,19 +279,14 @@ public virtual async Task> ExistsAsync(string replicationExtensio /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) 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..910482bd8a85 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ReplicationExtensionModelResource.cs @@ -112,7 +112,7 @@ public virtual async Task> GetAsync( scope.Start(); try { - var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); @@ -144,7 +144,7 @@ public virtual Response Get(CancellationToken scope.Start(); try { - var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new ReplicationExtensionModelResource(Client, response.Value), response.GetRawResponse()); @@ -177,8 +177,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell 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 _replicationExtensionModelReplicationExtensionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -211,8 +211,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel 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 = _replicationExtensionModelReplicationExtensionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -249,8 +249,8 @@ public virtual async Task> Updat 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 _replicationExtensionModelReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -287,8 +287,8 @@ public virtual ArmOperation Update(WaitUntil 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 = _replicationExtensionModelReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new ReplicationExtensionModelOperationSource(Client), _replicationExtensionModelReplicationExtensionClientDiagnostics, Pipeline, _replicationExtensionModelReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -313,19 +313,14 @@ public virtual ArmOperation Update(WaitUntil /// /// /// - /// 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) + public virtual async Task> GetReplicationExtensionOperationStatuAsync(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); + var response = await _replicationExtensionOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -348,19 +343,14 @@ public virtual async Task> GetReplicationExtensionOper /// /// /// - /// 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) + public virtual Response GetReplicationExtensionOperationStatu(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); + var response = _replicationExtensionOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return response; } catch (Exception e) @@ -401,7 +391,7 @@ public virtual async Task> AddTagAsy 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); + var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -450,7 +440,7 @@ public virtual Response AddTag(string key, st 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); + var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -498,7 +488,7 @@ public virtual async Task> SetTagsAs 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); + var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -546,7 +536,7 @@ public virtual Response SetTags(IDictionary> RemoveTag 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); + var originalResponse = await _replicationExtensionModelReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -640,7 +630,7 @@ public virtual Response RemoveTag(string key, 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); + var originalResponse = _replicationExtensionModelReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new ReplicationExtensionModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else 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..f61983e5f318 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 @@ -20,24 +20,34 @@ internal partial class DraOperationStatusRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _fabricName; + private readonly string _fabricAgentName; + private readonly string _operationId; 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. + /// The fabric name. + /// The fabric agent (Dra) name. + /// The operation Id. /// server parameter. /// Api Version. - /// or is null. - public DraOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public DraOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, string fabricName, string fabricAgentName, string operationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _fabricName = fabricName ?? throw new ArgumentNullException(nameof(fabricName)); + _fabricAgentName = fabricAgentName ?? throw new ArgumentNullException(nameof(fabricAgentName)); + _operationId = operationId ?? throw new ArgumentNullException(nameof(operationId)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + 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.AppendPath(_operationId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,21 +74,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -97,21 +101,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _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..49851489e63d 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 @@ -20,24 +20,31 @@ internal partial class DraRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _fabricName; + private readonly string _fabricAgentName; 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. + /// The fabric name. + /// The fabric agent (Dra) name. /// server parameter. /// Api Version. - /// or is null. - public DraRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public DraRestOperations(HttpPipeline pipeline, string applicationId, string fabricName, string fabricAgentName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _fabricName = fabricName ?? throw new ArgumentNullException(nameof(fabricName)); + _fabricAgentName = fabricAgentName ?? throw new ArgumentNullException(nameof(fabricAgentName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + 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 +69,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +98,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +124,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, DraModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -137,9 +136,9 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + 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 +153,17 @@ 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. /// 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, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -183,21 +178,17 @@ 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. /// 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, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -209,7 +200,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) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -221,9 +212,9 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + 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 +225,15 @@ 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 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, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -261,19 +248,15 @@ 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 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, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -285,7 +268,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string f } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string fabricName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -297,7 +280,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + uri.AppendPath(_fabricName, true); uri.AppendPath("/fabricAgents", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -309,17 +292,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -338,17 +319,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -364,7 +343,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fabricName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -382,18 +361,16 @@ 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 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) + /// , 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, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -413,18 +390,16 @@ 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 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..b67a2806288c 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 @@ -20,24 +20,31 @@ internal partial class EmailConfigurationRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _emailConfigurationName; 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. + /// The vault name. + /// The email configuration name. /// server parameter. /// Api Version. - /// or is null. - public EmailConfigurationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public EmailConfigurationRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string emailConfigurationName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _emailConfigurationName = emailConfigurationName ?? throw new ArgumentNullException(nameof(emailConfigurationName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/alertSettings/", false); - uri.AppendPath(emailConfigurationName, true); + uri.AppendPath(_emailConfigurationName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +69,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +98,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +124,7 @@ public Response Get(string subscriptionId, string r } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, EmailConfigurationModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, EmailConfigurationModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -137,9 +136,9 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/alertSettings/", false); - uri.AppendPath(emailConfigurationName, true); + uri.AppendPath(_emailConfigurationName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,21 +153,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -188,21 +183,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -219,7 +210,7 @@ public Response Create(string subscriptionId, strin } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -231,7 +222,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/alertSettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -243,17 +234,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -272,17 +261,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -298,7 +285,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -316,18 +303,16 @@ 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 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) + /// , 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, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -347,18 +332,16 @@ 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 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..ee6e28709956 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 @@ -20,24 +20,31 @@ internal partial class EventRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _eventName; 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. + /// The vault name. + /// The event name. /// server parameter. /// Api Version. - /// or is null. - public EventRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public EventRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string eventName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _eventName = eventName ?? throw new ArgumentNullException(nameof(eventName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/events/", false); - uri.AppendPath(eventName, true); + uri.AppendPath(_eventName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +69,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +98,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +124,7 @@ public Response Get(string subscriptionId, string resourceGroupN } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string filter, string continuationToken) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -137,7 +136,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/events", false); if (filter != null) { @@ -157,19 +156,17 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName, filter, continuationToken); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -188,19 +185,17 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName, filter, continuationToken); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -216,7 +211,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, string continuationToken) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -234,20 +229,18 @@ 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. /// 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) + /// , 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 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, continuationToken); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -267,20 +260,18 @@ 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. /// 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) + /// , 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 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, continuationToken); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..bc5ff60b7f18 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 @@ -20,24 +20,31 @@ internal partial class FabricOperationsStatusRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _fabricName; + private readonly string _operationId; 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. + /// The fabric name. + /// The operation Id. /// server parameter. /// Api Version. - /// or is null. - public FabricOperationsStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public FabricOperationsStatusRestOperations(HttpPipeline pipeline, string applicationId, string fabricName, string operationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _fabricName = fabricName ?? throw new ArgumentNullException(nameof(fabricName)); + _operationId = operationId ?? throw new ArgumentNullException(nameof(operationId)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + uri.AppendPath(_fabricName, true); uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); + uri.AppendPath(_operationId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +69,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -93,19 +96,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..a0b16c750713 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 @@ -20,24 +20,28 @@ internal partial class FabricRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _fabricName; 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. + /// The fabric name. /// server parameter. /// Api Version. - /// or is null. - public FabricRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public FabricRestOperations(HttpPipeline pipeline, string applicationId, string fabricName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _fabricName = fabricName ?? throw new ArgumentNullException(nameof(fabricName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,7 +53,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + uri.AppendPath(_fabricName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -60,17 +64,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -91,17 +93,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -119,7 +119,7 @@ public Response Get(string subscriptionId, string resourceGroup } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, FabricModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, FabricModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -131,7 +131,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + uri.AppendPath(_fabricName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -146,19 +146,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -173,19 +171,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -197,7 +193,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, FabricModelPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -209,7 +205,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + uri.AppendPath(_fabricName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -224,19 +220,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -251,19 +245,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, 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); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -275,7 +267,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string f } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fabricName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -287,7 +279,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); - uri.AppendPath(fabricName, true); + uri.AppendPath(_fabricName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -298,17 +290,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -323,17 +313,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..997668db6860 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 @@ -20,24 +20,34 @@ internal partial class PolicyOperationStatusRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _policyName; + private readonly string _operationId; 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. + /// The vault name. + /// The policy name. + /// The operation Id. /// server parameter. /// Api Version. - /// or is null. - public PolicyOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public PolicyOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string policyName, string operationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _policyName = policyName ?? throw new ArgumentNullException(nameof(policyName)); + _operationId = operationId ?? throw new ArgumentNullException(nameof(operationId)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationPolicies/", false); - uri.AppendPath(policyName, true); + uri.AppendPath(_policyName, true); uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); + uri.AppendPath(_operationId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,21 +74,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -97,21 +101,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..367a02de2e10 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 @@ -20,24 +20,31 @@ internal partial class PolicyRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _policyName; 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. + /// The vault name. + /// The policy name. /// server parameter. /// Api Version. - /// or is null. - public PolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public PolicyRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string policyName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _policyName = policyName ?? throw new ArgumentNullException(nameof(policyName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationPolicies/", false); - uri.AppendPath(policyName, true); + uri.AppendPath(_policyName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +69,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +98,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +124,7 @@ public Response Get(string subscriptionId, string resourceGroup } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, PolicyModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, PolicyModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -137,9 +136,9 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationPolicies/", false); - uri.AppendPath(policyName, true); + uri.AppendPath(_policyName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,21 +153,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -183,21 +178,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -209,7 +200,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -221,9 +212,9 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationPolicies/", false); - uri.AppendPath(policyName, true); + uri.AppendPath(_policyName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -234,19 +225,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -261,19 +248,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -285,7 +268,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -297,7 +280,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationPolicies", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -309,17 +292,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -338,17 +319,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -364,7 +343,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -382,18 +361,16 @@ 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 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) + /// , 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, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -413,18 +390,16 @@ 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 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..6f89bb50a2d0 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 @@ -20,24 +20,34 @@ internal partial class ProtectedItemOperationStatusRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _protectedItemName; + private readonly string _operationId; 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. + /// The vault name. + /// The protected item name. + /// The operation Id. /// server parameter. /// Api Version. - /// or is null. - public ProtectedItemOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public ProtectedItemOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string protectedItemName, string operationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _protectedItemName = protectedItemName ?? throw new ArgumentNullException(nameof(protectedItemName)); + _operationId = operationId ?? throw new ArgumentNullException(nameof(operationId)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); + uri.AppendPath(_protectedItemName, true); uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); + uri.AppendPath(_operationId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,21 +74,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -97,21 +101,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..ed6d3f590eda 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 @@ -20,24 +20,31 @@ internal partial class ProtectedItemRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _protectedItemName; 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. + /// The vault name. + /// The protected item name. /// server parameter. /// Api Version. - /// or is null. - public ProtectedItemRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public ProtectedItemRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string protectedItemName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _protectedItemName = protectedItemName ?? throw new ArgumentNullException(nameof(protectedItemName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); + uri.AppendPath(_protectedItemName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +69,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +98,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +124,7 @@ public Response Get(string subscriptionId, string resour } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, ProtectedItemModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, ProtectedItemModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -137,9 +136,9 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); + uri.AppendPath(_protectedItemName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,21 +153,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -183,21 +178,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -209,7 +200,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, bool? forceDelete) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -221,9 +212,9 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); + uri.AppendPath(_protectedItemName, true); if (forceDelete != null) { uri.AppendQuery("forceDelete", forceDelete.Value, true); @@ -238,20 +229,16 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, forceDelete); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -266,20 +253,16 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, forceDelete); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -291,7 +274,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -303,7 +286,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -315,17 +298,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -344,17 +325,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -370,7 +349,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreatePlannedFailoverRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailoverModel body) + internal HttpMessage CreatePlannedFailoverRequest(string subscriptionId, string resourceGroupName, PlannedFailoverModel body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -382,9 +361,9 @@ internal HttpMessage CreatePlannedFailoverRequest(string subscriptionId, string uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); + uri.AppendPath(_protectedItemName, true); uri.AppendPath("/plannedFailover", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -403,20 +382,16 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task PlannedFailoverAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreatePlannedFailoverRequest(subscriptionId, resourceGroupName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -431,20 +406,16 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response PlannedFailover(string subscriptionId, string resourceGroupName, 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); + using var message = CreatePlannedFailoverRequest(subscriptionId, resourceGroupName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -456,7 +427,7 @@ public Response PlannedFailover(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -474,18 +445,16 @@ 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 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) + /// , 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, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -505,18 +474,16 @@ 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 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..bbcf41e61a87 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 @@ -20,24 +20,34 @@ internal partial class RecoveryPointsRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _protectedItemName; + private readonly string _recoveryPointName; 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. + /// The vault name. + /// The protected item name. + /// The recovery point name. /// server parameter. /// Api Version. - /// or is null. - public RecoveryPointsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public RecoveryPointsRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string protectedItemName, string recoveryPointName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _protectedItemName = protectedItemName ?? throw new ArgumentNullException(nameof(protectedItemName)); + _recoveryPointName = recoveryPointName ?? throw new ArgumentNullException(nameof(recoveryPointName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); + uri.AppendPath(_protectedItemName, true); uri.AppendPath("/recoveryPoints/", false); - uri.AppendPath(recoveryPointName, true); + uri.AppendPath(_recoveryPointName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,21 +74,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -99,21 +103,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -131,7 +129,7 @@ public Response Get(string subscriptionId, string resour } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -143,9 +141,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/protectedItems/", false); - uri.AppendPath(protectedItemName, true); + uri.AppendPath(_protectedItemName, true); uri.AppendPath("/recoveryPoints", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -157,19 +155,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -188,19 +182,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -216,7 +206,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -234,20 +224,16 @@ 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 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) + /// , 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, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -267,20 +253,16 @@ 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 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..fdeb0abe62b2 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 @@ -20,24 +20,34 @@ internal partial class ReplicationExtensionOperationStatusRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _replicationExtensionName; + private readonly string _operationId; 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. + /// The vault name. + /// The replication extension name. + /// The operation Id. /// server parameter. /// Api Version. - /// or is null. - public ReplicationExtensionOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public ReplicationExtensionOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string replicationExtensionName, string operationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _replicationExtensionName = replicationExtensionName ?? throw new ArgumentNullException(nameof(replicationExtensionName)); + _operationId = operationId ?? throw new ArgumentNullException(nameof(operationId)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationExtensions/", false); - uri.AppendPath(replicationExtensionName, true); + uri.AppendPath(_replicationExtensionName, true); uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); + uri.AppendPath(_operationId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,21 +74,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -97,21 +101,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..0dfa7f8180d3 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 @@ -20,24 +20,31 @@ internal partial class ReplicationExtensionRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _replicationExtensionName; 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. + /// The vault name. + /// The replication extension name. /// server parameter. /// Api Version. - /// or is null. - public ReplicationExtensionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public ReplicationExtensionRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string replicationExtensionName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _replicationExtensionName = replicationExtensionName ?? throw new ArgumentNullException(nameof(replicationExtensionName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationExtensions/", false); - uri.AppendPath(replicationExtensionName, true); + uri.AppendPath(_replicationExtensionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +69,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +98,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +124,7 @@ public Response Get(string subscriptionId, string } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, ReplicationExtensionModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, ReplicationExtensionModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -137,9 +136,9 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationExtensions/", false); - uri.AppendPath(replicationExtensionName, true); + uri.AppendPath(_replicationExtensionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,21 +153,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -183,21 +178,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -209,7 +200,7 @@ public Response Create(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -221,9 +212,9 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationExtensions/", false); - uri.AppendPath(replicationExtensionName, true); + uri.AppendPath(_replicationExtensionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -234,19 +225,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -261,19 +248,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -285,7 +268,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -297,7 +280,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/replicationExtensions", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; @@ -309,17 +292,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -338,17 +319,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -364,7 +343,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -382,18 +361,16 @@ 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 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) + /// , 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, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -413,18 +390,16 @@ 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 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..9f8b2e78854f 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 @@ -20,24 +20,31 @@ internal partial class VaultOperationStatusRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _operationId; 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. + /// The vault name. + /// The operation Id. /// server parameter. /// Api Version. - /// or is null. - public VaultOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public VaultOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string operationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _operationId = operationId ?? throw new ArgumentNullException(nameof(operationId)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); + uri.AppendPath(_operationId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -62,19 +69,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -93,19 +96,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..abcc74b00e9d 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 @@ -20,24 +20,28 @@ internal partial class VaultRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; 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. + /// The vault name. /// server parameter. /// Api Version. - /// or is null. - public VaultRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public VaultRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,7 +53,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -60,17 +64,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -91,17 +93,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -119,7 +119,7 @@ public Response Get(string subscriptionId, string resourceGroupN } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, VaultModelData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, VaultModelData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -131,7 +131,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -146,19 +146,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -173,19 +171,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, 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); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -197,7 +193,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, VaultModelPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -209,7 +205,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -224,19 +220,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -251,19 +245,17 @@ 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. /// 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) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, 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); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -275,7 +267,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string v } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -287,7 +279,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -298,17 +290,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -323,17 +313,15 @@ 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 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, 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); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..d78886edbba8 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 @@ -20,24 +20,34 @@ internal partial class WorkflowOperationStatusRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _jobName; + private readonly string _operationId; 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. + /// The vault name. + /// The job (workflow) name. + /// The operation Id. /// server parameter. /// Api Version. - /// or is null. - public WorkflowOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public WorkflowOperationStatusRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string jobName, string operationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _jobName = jobName ?? throw new ArgumentNullException(nameof(jobName)); + _operationId = operationId ?? throw new ArgumentNullException(nameof(operationId)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + 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.AppendPath(_operationId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,21 +74,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -97,21 +101,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _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..a0a9312e5dcd 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 @@ -20,24 +20,31 @@ internal partial class WorkflowRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly string _vaultName; + private readonly string _jobName; 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. + /// The vault name. + /// The job (workflow) name. /// server parameter. /// Api Version. - /// or is null. - public WorkflowRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// , , or is null. + /// or is an empty string, and was expected to be non-empty. + public WorkflowRestOperations(HttpPipeline pipeline, string applicationId, string vaultName, string jobName, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _vaultName = vaultName ?? throw new ArgumentNullException(nameof(vaultName)); + _jobName = jobName ?? throw new ArgumentNullException(nameof(jobName)); _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) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +56,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + 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 +69,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -95,19 +98,15 @@ 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 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, 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); + using var message = CreateGetRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -125,7 +124,7 @@ public Response Get(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string filter, string continuationToken) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -137,7 +136,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); - uri.AppendPath(vaultName, true); + uri.AppendPath(_vaultName, true); uri.AppendPath("/jobs", false); if (filter != null) { @@ -157,19 +156,17 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName, filter, continuationToken); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -188,19 +185,17 @@ 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. /// 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) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, 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); + using var message = CreateListRequest(subscriptionId, resourceGroupName, filter, continuationToken); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -216,7 +211,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string filter, string continuationToken) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, string continuationToken) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -234,20 +229,18 @@ 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. /// 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) + /// , 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 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, continuationToken); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -267,20 +260,18 @@ 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. /// 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) + /// , 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 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); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, continuationToken); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..5a61537dca80 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelCollection.cs @@ -67,22 +67,19 @@ 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. /// 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) + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, 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); + var response = await _vaultModelVaultRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -108,22 +105,19 @@ 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. /// 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) + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, 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); + var response = _vaultModelVaultRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -148,19 +142,14 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); @@ -185,19 +174,14 @@ public virtual async Task> GetAsync(string vaultNam /// /// /// - /// 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) + public virtual Response Get(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); + var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); @@ -268,19 +252,14 @@ public virtual Pageable GetAll(string continuationToken = nu /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -303,19 +282,14 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) 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..b85117ddfc0b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/VaultModelResource.cs @@ -113,14 +113,11 @@ public virtual EmailConfigurationModelCollection GetEmailConfigurationModels() /// /// /// - /// 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) + public virtual async Task> GetEmailConfigurationModelAsync(CancellationToken cancellationToken = default) { - return await GetEmailConfigurationModels().GetAsync(emailConfigurationName, cancellationToken).ConfigureAwait(false); + return await GetEmailConfigurationModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -136,14 +133,11 @@ public virtual async Task> GetEmailCon /// /// /// - /// 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) + public virtual Response GetEmailConfigurationModel(CancellationToken cancellationToken = default) { - return GetEmailConfigurationModels().Get(emailConfigurationName, cancellationToken); + return GetEmailConfigurationModels().Get(cancellationToken); } /// Gets a collection of EventModelResources in the VaultModel. @@ -166,14 +160,11 @@ public virtual EventModelCollection GetEventModels() /// /// /// - /// 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) + public virtual async Task> GetEventModelAsync(CancellationToken cancellationToken = default) { - return await GetEventModels().GetAsync(eventName, cancellationToken).ConfigureAwait(false); + return await GetEventModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -189,14 +180,11 @@ public virtual async Task> GetEventModelAsync(strin /// /// /// - /// 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) + public virtual Response GetEventModel(CancellationToken cancellationToken = default) { - return GetEventModels().Get(eventName, cancellationToken); + return GetEventModels().Get(cancellationToken); } /// Gets a collection of PolicyModelResources in the VaultModel. @@ -219,14 +207,11 @@ public virtual PolicyModelCollection GetPolicyModels() /// /// /// - /// 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) + public virtual async Task> GetPolicyModelAsync(CancellationToken cancellationToken = default) { - return await GetPolicyModels().GetAsync(policyName, cancellationToken).ConfigureAwait(false); + return await GetPolicyModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -242,14 +227,11 @@ public virtual async Task> GetPolicyModelAsync(str /// /// /// - /// 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) + public virtual Response GetPolicyModel(CancellationToken cancellationToken = default) { - return GetPolicyModels().Get(policyName, cancellationToken); + return GetPolicyModels().Get(cancellationToken); } /// Gets a collection of ProtectedItemModelResources in the VaultModel. @@ -272,14 +254,11 @@ public virtual ProtectedItemModelCollection GetProtectedItemModels() /// /// /// - /// 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) + public virtual async Task> GetProtectedItemModelAsync(CancellationToken cancellationToken = default) { - return await GetProtectedItemModels().GetAsync(protectedItemName, cancellationToken).ConfigureAwait(false); + return await GetProtectedItemModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -295,14 +274,11 @@ public virtual async Task> GetProtectedItem /// /// /// - /// 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) + public virtual Response GetProtectedItemModel(CancellationToken cancellationToken = default) { - return GetProtectedItemModels().Get(protectedItemName, cancellationToken); + return GetProtectedItemModels().Get(cancellationToken); } /// Gets a collection of ReplicationExtensionModelResources in the VaultModel. @@ -325,14 +301,11 @@ public virtual ReplicationExtensionModelCollection GetReplicationExtensionModels /// /// /// - /// 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) + public virtual async Task> GetReplicationExtensionModelAsync(CancellationToken cancellationToken = default) { - return await GetReplicationExtensionModels().GetAsync(replicationExtensionName, cancellationToken).ConfigureAwait(false); + return await GetReplicationExtensionModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -348,14 +321,11 @@ public virtual async Task> GetReplic /// /// /// - /// 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) + public virtual Response GetReplicationExtensionModel(CancellationToken cancellationToken = default) { - return GetReplicationExtensionModels().Get(replicationExtensionName, cancellationToken); + return GetReplicationExtensionModels().Get(cancellationToken); } /// Gets a collection of WorkflowModelResources in the VaultModel. @@ -370,7 +340,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 +348,11 @@ public virtual WorkflowModelCollection GetWorkflowModels() /// /// /// - /// 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) + public virtual async Task> GetWorkflowModelAsync(CancellationToken cancellationToken = default) { - return await GetWorkflowModels().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + return await GetWorkflowModels().GetAsync(cancellationToken).ConfigureAwait(false); } /// @@ -393,7 +360,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 +368,11 @@ public virtual async Task> GetWorkflowModelAsync /// /// /// - /// 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) + public virtual Response GetWorkflowModel(CancellationToken cancellationToken = default) { - return GetWorkflowModels().Get(workflowName, cancellationToken); + return GetWorkflowModels().Get(cancellationToken); } /// @@ -431,7 +395,7 @@ public virtual async Task> GetAsync(CancellationTok scope.Start(); try { - var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); @@ -463,7 +427,7 @@ public virtual Response Get(CancellationToken cancellationTo scope.Start(); try { - var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new VaultModelResource(Client, response.Value), response.GetRawResponse()); @@ -496,8 +460,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell 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 _vaultModelVaultRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -530,8 +494,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel 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 = _vaultModelVaultRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -568,8 +532,8 @@ public virtual async Task> UpdateAsync(WaitUnti 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 _vaultModelVaultRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -606,8 +570,8 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Vaul 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 = _vaultModelVaultRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new VaultModelOperationSource(Client), _vaultModelVaultClientDiagnostics, Pipeline, _vaultModelVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -632,19 +596,14 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Vaul /// /// /// - /// 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) + public virtual async Task> GetVaultOperationStatuAsync(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); + var response = await _vaultOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -667,19 +626,14 @@ public virtual async Task> GetVaultOperationStatuAsync /// /// /// - /// 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) + public virtual Response GetVaultOperationStatu(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); + var response = _vaultOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return response; } catch (Exception e) @@ -720,7 +674,7 @@ 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); + var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -774,7 +728,7 @@ 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); + var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -827,7 +781,7 @@ 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); + var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -876,7 +830,7 @@ 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); + var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -924,7 +878,7 @@ 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); + var originalResponse = await _vaultModelVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -976,7 +930,7 @@ 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); + var originalResponse = _vaultModelVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return Response.FromValue(new VaultModelResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else 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..2a1550c4f7bf 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,14 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// 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) + public virtual async Task> GetAsync(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); + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); @@ -94,7 +89,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 +97,14 @@ public virtual async Task> GetAsync(string workf /// /// /// - /// 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) + public virtual Response Get(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); + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); @@ -145,8 +135,8 @@ public virtual Response Get(string workflowName, Cancella /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -169,8 +159,8 @@ public virtual AsyncPageable GetAllAsync(string filter = /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowModelWorkflowRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowModelWorkflowRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, continuationToken); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowModelResource(Client, WorkflowModelData.DeserializeWorkflowModelData(e)), _workflowModelWorkflowClientDiagnostics, Pipeline, "WorkflowModelCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -179,7 +169,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 +177,14 @@ public virtual Pageable GetAll(string filter = null, stri /// /// /// - /// 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) + public virtual async Task> ExistsAsync(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); + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -214,7 +199,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 +207,14 @@ public virtual async Task> ExistsAsync(string workflowName, Cance /// /// /// - /// 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) + public virtual Response Exists(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); + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, 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..2071f712515d 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 @@ -111,7 +111,7 @@ public virtual async Task> GetAsync(Cancellation scope.Start(); try { - var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _workflowModelWorkflowRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); @@ -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 @@ -143,7 +143,7 @@ public virtual Response Get(CancellationToken cancellatio scope.Start(); try { - var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _workflowModelWorkflowRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new WorkflowModelResource(Client, response.Value), response.GetRawResponse()); @@ -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 @@ -168,19 +168,14 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// - /// 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) + public virtual async Task> GetWorkflowOperationStatuAsync(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); + var response = await _workflowOperationStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -195,7 +190,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 @@ -203,19 +198,14 @@ public virtual async Task> GetWorkflowOperationStatuAs /// /// /// - /// 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) + public virtual Response GetWorkflowOperationStatu(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); + var response = _workflowOperationStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken); return response; } catch (Exception e)