diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineCollection.cs index c453f4bd5f2c..3d4e60f441cc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupEngineCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDpmAzureBackupServerLajollaBackupEngineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Dpm/BackupEngines_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Dpm/BackupEngines_Get.json // this example is just showing the usage of "BackupEngines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetDpmAzureBackupServerLajollaBackupEngineDetails() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDpmAzureBackupServerLajollaBackupEngines() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Dpm/BackupEngines_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Dpm/BackupEngines_List.json // this example is just showing the usage of "BackupEngines_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task GetAll_ListDpmAzureBackupServerLajollaBackupEngines() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDpmAzureBackupServerLajollaBackupEngineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Dpm/BackupEngines_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Dpm/BackupEngines_Get.json // this example is just showing the usage of "BackupEngines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetDpmAzureBackupServerLajollaBackupEngineDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDpmAzureBackupServerLajollaBackupEngineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Dpm/BackupEngines_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Dpm/BackupEngines_Get.json // this example is just showing the usage of "BackupEngines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineResource.cs index 5333446bdc36..37fe6d61df0a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupEngineResource.cs @@ -19,7 +19,7 @@ public partial class Sample_BackupEngineResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDpmAzureBackupServerLajollaBackupEngineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Dpm/BackupEngines_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Dpm/BackupEngines_Get.json // this example is just showing the usage of "BackupEngines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobCollection.cs index e0feb1a33700..42155b2453bf 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupJobCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetJobDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/GetJobDetails.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/GetJobDetails.json // this example is just showing the usage of "JobDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetJobDetails() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAllJobs() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/ListJobs.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/ListJobs.json // this example is just showing the usage of "BackupJobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task GetAll_ListAllJobs() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobsWithFilters() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/ListJobsWithAllSupportedFilters.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/ListJobsWithAllSupportedFilters.json // this example is just showing the usage of "BackupJobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetAll_ListJobsWithFilters() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobsWithTimeFilter() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/ListJobsWithStartTimeAndEndTimeFilters.json // this example is just showing the usage of "BackupJobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task GetAll_ListJobsWithTimeFilter() [Ignore("Only validating compilation of examples")] public async Task Exists_GetJobDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/GetJobDetails.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/GetJobDetails.json // this example is just showing the usage of "JobDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,7 +194,7 @@ public async Task Exists_GetJobDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetJobDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/GetJobDetails.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/GetJobDetails.json // this example is just showing the usage of "JobDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobResource.cs index 38c62a03cf9a..c634aa2d932d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupJobResource.cs @@ -19,7 +19,7 @@ public partial class Sample_BackupJobResource [Ignore("Only validating compilation of examples")] public async Task Get_GetJobDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/GetJobDetails.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/GetJobDetails.json // this example is just showing the usage of "JobDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetJobDetails() [Ignore("Only validating compilation of examples")] public async Task TriggerJobCancellation_CancelJob() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/TriggerCancelJob.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/TriggerCancelJob.json // this example is just showing the usage of "JobCancellations_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionCollection.cs index 007f376cc099..d8d77ab1c9da 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatePrivateEndpointConnection() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task CreateOrUpdate_UpdatePrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpointConnection() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task Get_GetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPrivateEndpointConnection() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Exists_GetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPrivateEndpointConnection() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionResource.cs index 654c19055fc4..30206e2d7aaf 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPrivateEndpointConnection() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/PrivateEndpointConnection/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletePrivateEndpointConnection() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/PrivateEndpointConnection/DeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeletePrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatePrivateEndpointConnection() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/PrivateEndpointConnection/PutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemCollection.cs index 437bd8ca4043..62712b53b6a7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupProtectedItemCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EnableProtectionOnAzureIaasVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ConfigureProtection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ConfigureProtection.json // this example is just showing the usage of "ProtectedItems_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_EnableProtectionOnAzureIaasVm() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_StopProtectionWithRetainDataOnAzureIaasVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/StopProtection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/StopProtection.json // this example is just showing the usage of "ProtectedItems_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task CreateOrUpdate_StopProtectionWithRetainDataOnAzureIaasVm() [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectedClassicVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task Get_GetProtectedClassicVirtualMachineDetails() [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectedVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/Compute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +182,7 @@ public async Task Get_GetProtectedVirtualMachineDetails() [Ignore("Only validating compilation of examples")] public async Task Exists_GetProtectedClassicVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +214,7 @@ public async Task Exists_GetProtectedClassicVirtualMachineDetails() [Ignore("Only validating compilation of examples")] public async Task Exists_GetProtectedVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/Compute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -246,7 +246,7 @@ public async Task Exists_GetProtectedVirtualMachineDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetProtectedClassicVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -290,7 +290,7 @@ public async Task GetIfExists_GetProtectedClassicVirtualMachineDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetProtectedVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/Compute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemResource.cs index e5d07076cad7..9ca726b0cff2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectedItemResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupProtectedItemResource [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectedClassicVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ClassicCompute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetProtectedClassicVirtualMachineDetails() [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectedVirtualMachineDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/Compute_ProtectedItem_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/Compute_ProtectedItem_Get.json // this example is just showing the usage of "ProtectedItems_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Get_GetProtectedVirtualMachineDetails() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteProtectionFromAzureVirtualMachine() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/ProtectedItem_Delete.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/ProtectedItem_Delete.json // this example is just showing the usage of "ProtectedItems_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Delete_DeleteProtectionFromAzureVirtualMachine() [Ignore("Only validating compilation of examples")] public async Task Update_EnableProtectionOnAzureIaasVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ConfigureProtection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ConfigureProtection.json // this example is just showing the usage of "ProtectedItems_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task Update_EnableProtectionOnAzureIaasVm() [Ignore("Only validating compilation of examples")] public async Task Update_StopProtectionWithRetainDataOnAzureIaasVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/StopProtection.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/StopProtection.json // this example is just showing the usage of "ProtectedItems_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task Update_StopProtectionWithRetainDataOnAzureIaasVm() [Ignore("Only validating compilation of examples")] public async Task TriggerBackup_TriggerBackup() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/TriggerBackup_Post.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/TriggerBackup_Post.json // this example is just showing the usage of "Backups_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task TriggerBackup_TriggerBackup() [Ignore("Only validating compilation of examples")] public async Task GetRecoveryPointsRecommendedForMove_GetProtectedAzureVmRecoveryPointsRecommendedForMove() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/RecoveryPointsRecommendedForMove_List.json // this example is just showing the usage of "RecoveryPointsRecommendedForMove_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerCollection.cs index 2f0fad2f6168..bed3e183a755 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupProtectionContainerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RegisterAzureStorageProtectionContainers() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionContainers_Register.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionContainers_Register.json // this example is just showing the usage of "ProtectionContainers_Register" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_RegisterAzureStorageProtectionContainers() [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectionContainerDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/ProtectionContainers_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/ProtectionContainers_Get.json // this example is just showing the usage of "ProtectionContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_GetProtectionContainerDetails() [Ignore("Only validating compilation of examples")] public async Task Exists_GetProtectionContainerDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/ProtectionContainers_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/ProtectionContainers_Get.json // this example is just showing the usage of "ProtectionContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task Exists_GetProtectionContainerDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetProtectionContainerDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/ProtectionContainers_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/ProtectionContainers_Get.json // this example is just showing the usage of "ProtectionContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerResource.cs index 08a7712765a7..faca1df390c1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupProtectionContainerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectionContainerDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/ProtectionContainers_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/ProtectionContainers_Get.json // this example is just showing the usage of "ProtectionContainers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetProtectionContainerDetails() [Ignore("Only validating compilation of examples")] public async Task Delete_UnregisterProtectionContainer() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/ProtectionContainers_Unregister.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/ProtectionContainers_Unregister.json // this example is just showing the usage of "ProtectionContainers_Unregister" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_UnregisterProtectionContainer() [Ignore("Only validating compilation of examples")] public async Task Update_RegisterAzureStorageProtectionContainers() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionContainers_Register.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionContainers_Register.json // this example is just showing the usage of "ProtectionContainers_Register" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Update_RegisterAzureStorageProtectionContainers() [Ignore("Only validating compilation of examples")] public async Task Inquire_InquireAzureStorageProtectionContainers() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionContainers_Inquire.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionContainers_Inquire.json // this example is just showing the usage of "ProtectionContainers_Inquire" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Inquire_InquireAzureStorageProtectionContainers() [Ignore("Only validating compilation of examples")] public async Task GetBackupWorkloadItems_ListWorkloadItemsInContainer() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupWorkloadItems_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupWorkloadItems_List.json // this example is just showing the usage of "BackupWorkloadItems_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentCollection.cs index 8ead089c03a3..fe8f1bc38b82 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupProtectionIntentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAzureVmProtectionIntent() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json // this example is just showing the usage of "ProtectionIntent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAzureVmProtectionIntent() [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectionIntentForAnItem() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupProtectionIntent_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupProtectionIntent_Get.json // this example is just showing the usage of "ProtectionIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Get_GetProtectionIntentForAnItem() [Ignore("Only validating compilation of examples")] public async Task Exists_GetProtectionIntentForAnItem() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupProtectionIntent_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupProtectionIntent_Get.json // this example is just showing the usage of "ProtectionIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Exists_GetProtectionIntentForAnItem() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetProtectionIntentForAnItem() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupProtectionIntent_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupProtectionIntent_Get.json // this example is just showing the usage of "ProtectionIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentResource.cs index 2a7cc20477a6..f61dfec7f9a3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionIntentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupProtectionIntentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetProtectionIntentForAnItem() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupProtectionIntent_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupProtectionIntent_Get.json // this example is just showing the usage of "ProtectionIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetProtectionIntentForAnItem() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteProtectionIntentFromItem() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupProtectionIntent_Delete.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupProtectionIntent_Delete.json // this example is just showing the usage of "ProtectionIntent_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_DeleteProtectionIntentFromItem() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAzureVmProtectionIntent() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionIntent_CreateOrUpdate.json // this example is just showing the usage of "ProtectionIntent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyCollection.cs index c13199adb5b3..59eff0c1754f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupProtectionPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAzureStorageVaultStandardProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAzureStorageVaultStandardProtecti [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateDailyAzureStorageProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -223,7 +223,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDailyAzureStorageProtectionPolicy [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithHourlyBackup() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -314,6 +314,7 @@ public async Task CreateOrUpdate_CreateOrUpdateEnhancedAzureVmProtectionPolicyWi InstantRPRetentionRangeInDays = 30, TimeZone = "India Standard Time", PolicyType = IaasVmPolicyType.V2, + SnapshotConsistencyType = IaasVmSnapshotConsistencyType.OnlyCrashConsistent, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, policyName, data); @@ -330,7 +331,7 @@ public async Task CreateOrUpdate_CreateOrUpdateEnhancedAzureVmProtectionPolicyWi [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithDailyBackup() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -416,6 +417,7 @@ public async Task CreateOrUpdate_CreateOrUpdateEnhancedAzureVmProtectionPolicyWi InstantRPRetentionRangeInDays = 30, TimeZone = "India Standard Time", PolicyType = IaasVmPolicyType.V2, + SnapshotConsistencyType = IaasVmSnapshotConsistencyType.OnlyCrashConsistent, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, policyName, data); @@ -432,7 +434,7 @@ public async Task CreateOrUpdate_CreateOrUpdateEnhancedAzureVmProtectionPolicyWi [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateFullAzureVmProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -524,7 +526,7 @@ public async Task CreateOrUpdate_CreateOrUpdateFullAzureVmProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateFullAzureWorkloadProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -657,7 +659,7 @@ public async Task CreateOrUpdate_CreateOrUpdateFullAzureWorkloadProtectionPolicy [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateHourlyAzureStorageProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -763,7 +765,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHourlyAzureStorageProtectionPolic [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateSimpleAzureVmProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -822,7 +824,7 @@ public async Task CreateOrUpdate_CreateOrUpdateSimpleAzureVmProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureIaasVmEnhancedProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -856,7 +858,7 @@ public async Task Get_GetAzureIaasVmEnhancedProtectionPolicyDetails() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureIaasVmProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_Get.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -890,7 +892,7 @@ public async Task Get_GetAzureIaasVmProtectionPolicyDetails() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/BackupPolicies_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/BackupPolicies_List.json // this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -927,7 +929,7 @@ public async Task GetAll_ListProtectionPoliciesWithBackupManagementTypeFilterAsA [Ignore("Only validating compilation of examples")] public async Task GetAll_ListProtectionPoliciesWithBackupManagementTypeFilterAsAzureIaasVmWithBothV1AndV2Policies() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/v2-List-Policies.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/v2-List-Policies.json // this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -964,7 +966,7 @@ public async Task GetAll_ListProtectionPoliciesWithBackupManagementTypeFilterAsA [Ignore("Only validating compilation of examples")] public async Task GetAll_ListProtectionPoliciesWithBackupManagementTypeFilterAsAzureWorkload() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupPolicies_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupPolicies_List.json // this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1001,7 +1003,7 @@ public async Task GetAll_ListProtectionPoliciesWithBackupManagementTypeFilterAsA [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureIaasVmEnhancedProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1031,7 +1033,7 @@ public async Task Exists_GetAzureIaasVmEnhancedProtectionPolicyDetails() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureIaasVmProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_Get.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1061,7 +1063,7 @@ public async Task Exists_GetAzureIaasVmProtectionPolicyDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureIaasVmEnhancedProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1103,7 +1105,7 @@ public async Task GetIfExists_GetAzureIaasVmEnhancedProtectionPolicyDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureIaasVmProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_Get.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyResource.cs index b0f8f66f2611..415171081781 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupProtectionPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupProtectionPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureIaasVmEnhancedProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/v2-Get-Policy.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAzureIaasVmEnhancedProtectionPolicyDetails() [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureIaasVmProtectionPolicyDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_Get.json // this example is just showing the usage of "ProtectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_GetAzureIaasVmProtectionPolicyDetails() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAzureVmProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_Delete.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_Delete.json // this example is just showing the usage of "ProtectionPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_DeleteAzureVmProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAzureStorageVaultStandardProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hardened.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task Update_CreateOrUpdateAzureStorageVaultStandardProtectionPolicy [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateDailyAzureStorageProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -305,7 +305,7 @@ public async Task Update_CreateOrUpdateDailyAzureStorageProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithHourlyBackup() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -393,6 +393,7 @@ public async Task Update_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithHourly InstantRPRetentionRangeInDays = 30, TimeZone = "India Standard Time", PolicyType = IaasVmPolicyType.V2, + SnapshotConsistencyType = IaasVmSnapshotConsistencyType.OnlyCrashConsistent, }, }; ArmOperation lro = await backupProtectionPolicy.UpdateAsync(WaitUntil.Completed, data); @@ -409,7 +410,7 @@ public async Task Update_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithHourly [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithDailyBackup() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -492,6 +493,7 @@ public async Task Update_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithDailyB InstantRPRetentionRangeInDays = 30, TimeZone = "India Standard Time", PolicyType = IaasVmPolicyType.V2, + SnapshotConsistencyType = IaasVmSnapshotConsistencyType.OnlyCrashConsistent, }, }; ArmOperation lro = await backupProtectionPolicy.UpdateAsync(WaitUntil.Completed, data); @@ -508,7 +510,7 @@ public async Task Update_CreateOrUpdateEnhancedAzureVmProtectionPolicyWithDailyB [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateFullAzureVmProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -597,7 +599,7 @@ public async Task Update_CreateOrUpdateFullAzureVmProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateFullAzureWorkloadProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -727,7 +729,7 @@ public async Task Update_CreateOrUpdateFullAzureWorkloadProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateHourlyAzureStorageProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -830,7 +832,7 @@ public async Task Update_CreateOrUpdateHourlyAzureStorageProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateSimpleAzureVmProtectionPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json // this example is just showing the usage of "ProtectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointCollection.cs index ea7dafd4da2b..f006c168203a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_BackupRecoveryPointCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureVmRecoveryPointDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/RecoveryPoints_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/RecoveryPoints_Get.json // this example is just showing the usage of "RecoveryPoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GetAzureVmRecoveryPointDetails() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetProtectedAzureVmRecoveryPoints() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/RecoveryPoints_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/RecoveryPoints_List.json // this example is just showing the usage of "RecoveryPoints_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_GetProtectedAzureVmRecoveryPoints() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAzureVmRecoveryPointDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/RecoveryPoints_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/RecoveryPoints_Get.json // this example is just showing the usage of "RecoveryPoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Exists_GetAzureVmRecoveryPointDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAzureVmRecoveryPointDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/RecoveryPoints_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/RecoveryPoints_Get.json // this example is just showing the usage of "RecoveryPoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointResource.cs index bb07df5f7ebb..4acdd67e0980 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupRecoveryPointResource.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupRecoveryPointResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAzureVmRecoveryPointDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/RecoveryPoints_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/RecoveryPoints_Get.json // this example is just showing the usage of "RecoveryPoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,11 +51,49 @@ public async Task Get_GetAzureVmRecoveryPointDetails() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateAzureVmRecoveryPointDetails() + { + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/RecoveryPoints_Update.json + // this example is just showing the usage of "RecoveryPoints_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BackupRecoveryPointResource created on azure + // for more information of creating BackupRecoveryPointResource, please refer to the document of BackupRecoveryPointResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "hanasnapshottesting"; + string vaultName = "HanaSnapshotTest"; + string fabricName = "Azure"; + string containerName = "VMAppContainer;compute;hanasnapshottesting;hana-eacan-2"; + string protectedItemName = "SAPHanaDatabase;hye;hye"; + string recoveryPointId = "2265668074516978193"; + ResourceIdentifier backupRecoveryPointResourceId = BackupRecoveryPointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId); + BackupRecoveryPointResource backupRecoveryPoint = client.GetBackupRecoveryPointResource(backupRecoveryPointResourceId); + + // invoke the operation + BackupRecoveryPointPatch patch = new BackupRecoveryPointPatch + { + RecoveryPointExpiryOn = DateTimeOffset.Parse("2025-01-02T00:00:00.0000000Z"), + }; + BackupRecoveryPointResource result = await backupRecoveryPoint.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + BackupRecoveryPointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task MoveRecoveryPoint_TriggerRPMoveOperation() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/TriggerRecoveryPointMove_Post.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/TriggerRecoveryPointMove_Post.json // this example is just showing the usage of "MoveRecoveryPoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +129,7 @@ public async Task MoveRecoveryPoint_TriggerRPMoveOperation() [Ignore("Only validating compilation of examples")] public async Task TriggerRestore_RestoreDisksWithIaasVMRestoreRequest() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest.json // this example is just showing the usage of "Restores_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +186,7 @@ public async Task TriggerRestore_RestoreDisksWithIaasVMRestoreRequest() [Ignore("Only validating compilation of examples")] public async Task TriggerRestore_RestoreDisksWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json // this example is just showing the usage of "Restores_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +241,7 @@ public async Task TriggerRestore_RestoreDisksWithIaasVMRestoreRequestWithIdentit [Ignore("Only validating compilation of examples")] public async Task TriggerRestore_RestoreDisksWithIaasVMRestoreWithRehydrationRequest() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreWithRehydrationRequest.json // this example is just showing the usage of "Restores_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -255,7 +293,7 @@ public async Task TriggerRestore_RestoreDisksWithIaasVMRestoreWithRehydrationReq [Ignore("Only validating compilation of examples")] public async Task TriggerRestore_RestoreToNewAzureIaasVmWithIaasVMRestoreRequest() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest.json // this example is just showing the usage of "Restores_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -310,7 +348,7 @@ public async Task TriggerRestore_RestoreToNewAzureIaasVmWithIaasVMRestoreRequest [Ignore("Only validating compilation of examples")] public async Task TriggerRestore_RestoreToNewAzureIaasVmWithIaasVMRestoreRequestWithIdentityBasedRestoreDetails() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json // this example is just showing the usage of "Restores_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -368,7 +406,7 @@ public async Task TriggerRestore_RestoreToNewAzureIaasVmWithIaasVMRestoreRequest [Ignore("Only validating compilation of examples")] public async Task TriggerRestore_RestoreToNewAzureIaasVmWithIaasVMRestoreWithRehydrationRequest() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreWithRehydrationRequest.json // this example is just showing the usage of "Restores_Trigger" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -420,11 +458,67 @@ public async Task TriggerRestore_RestoreToNewAzureIaasVmWithIaasVMRestoreWithReh Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task TriggerRestore_TriggerRestoreWithMUA() + { + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/TriggerRestore_ResourceGuardEnabled.json + // this example is just showing the usage of "Restores_Trigger" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BackupRecoveryPointResource created on azure + // for more information of creating BackupRecoveryPointResource, please refer to the document of BackupRecoveryPointResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "netsdktestrg"; + string vaultName = "testVault"; + string fabricName = "Azure"; + string containerName = "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"; + string protectedItemName = "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"; + string recoveryPointId = "348916168024334"; + ResourceIdentifier backupRecoveryPointResourceId = BackupRecoveryPointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId); + BackupRecoveryPointResource backupRecoveryPoint = client.GetBackupRecoveryPointResource(backupRecoveryPointResourceId); + + // invoke the operation + TriggerRestoreContent content = new TriggerRestoreContent(default) + { + Properties = new IaasVmRestoreContent + { + RecoveryPointId = "348916168024334", + RecoveryType = FileShareRecoveryType.RestoreDisks, + SourceResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"), + Region = new AzureLocation("southeastasia"), + DoesCreateNewCloudService = true, + OriginalStorageAccountOption = false, + EncryptionDetails = new VmEncryptionDetails + { + IsEncryptionEnabled = false, + }, + IdentityInfo = new BackupIdentityInfo + { + IsSystemAssignedIdentity = false, + ManagedIdentityResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asmaskarRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asmaskartestmsi"), + }, + IdentityBasedRestoreDetails = new IdentityBasedRestoreDetails + { + TargetStorageAccountId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testingRg/providers/Microsoft.Storage/storageAccounts/testAccount"), + }, + ResourceGuardOperationRequests = { "/subscriptions/063bf7bc-e4dc-4cde-8840-8416fbd7921e/resourcegroups/ankurRG1/providers/Microsoft.DataProtection/resourceGuards/RG341/triggerRestoreRequests/default" }, + }, + }; + await backupRecoveryPoint.TriggerRestoreAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task ProvisionItemLevelRecoveryConnection_ProvisionInstantItemLevelRecoveryForAzureVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/Provision_Ilr.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/Provision_Ilr.json // this example is just showing the usage of "ItemLevelRecoveryConnections_Provision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -464,7 +558,7 @@ public async Task ProvisionItemLevelRecoveryConnection_ProvisionInstantItemLevel [Ignore("Only validating compilation of examples")] public async Task RevokeItemLevelRecoveryConnection_RevokeInstantItemLevelRecoveryForAzureVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/Revoke_Ilr.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/Revoke_Ilr.json // this example is just showing the usage of "ItemLevelRecoveryConnections_Revoke" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigCollection.cs index 4a1d82d445de..6cf3e48de7f2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupResourceConfigCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateVaultStorageConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupStorageConfig_Put.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupStorageConfig_Put.json // this example is just showing the usage of "BackupResourceStorageConfigsNonCRR_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_UpdateVaultStorageConfiguration() [Ignore("Only validating compilation of examples")] public async Task Get_GetVaultStorageConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupStorageConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupStorageConfig_Get.json // this example is just showing the usage of "BackupResourceStorageConfigsNonCRR_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetVaultStorageConfiguration() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVaultStorageConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupStorageConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupStorageConfig_Get.json // this example is just showing the usage of "BackupResourceStorageConfigsNonCRR_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetVaultStorageConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVaultStorageConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupStorageConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupStorageConfig_Get.json // this example is just showing the usage of "BackupResourceStorageConfigsNonCRR_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigResource.cs index fe3dbdd3523e..44959619de34 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceConfigResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupResourceConfigResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVaultStorageConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupStorageConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupStorageConfig_Get.json // this example is just showing the usage of "BackupResourceStorageConfigsNonCRR_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetVaultStorageConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVaultStorageConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupStorageConfig_Patch.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupStorageConfig_Patch.json // this example is just showing the usage of "BackupResourceStorageConfigsNonCRR_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_UpdateVaultStorageConfiguration() [Ignore("Only validating compilation of examples")] public async Task PrepareDataMove_PrepareDataMove() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupDataMove/PrepareDataMove_Post.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupDataMove/PrepareDataMove_Post.json // this example is just showing the usage of "BMSPrepareDataMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task PrepareDataMove_PrepareDataMove() [Ignore("Only validating compilation of examples")] public async Task TriggerDataMove_TriggerDataMove() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupDataMove/TriggerDataMove_Post.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupDataMove/TriggerDataMove_Post.json // this example is just showing the usage of "BMSTriggerDataMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedCollection.cs index 6421edc870df..30ac31ba44e7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupResourceEncryptionConfigExtendedCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateVaultEncryptionConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupResourceEncryptionConfig_Put.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupResourceEncryptionConfig_Put.json // this example is just showing the usage of "BackupResourceEncryptionConfigs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_UpdateVaultEncryptionConfiguration() [Ignore("Only validating compilation of examples")] public async Task Get_GetVaultEncryptionConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupResourceEncryptionConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupResourceEncryptionConfig_Get.json // this example is just showing the usage of "BackupResourceEncryptionConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetVaultEncryptionConfiguration() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVaultEncryptionConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupResourceEncryptionConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupResourceEncryptionConfig_Get.json // this example is just showing the usage of "BackupResourceEncryptionConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetVaultEncryptionConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVaultEncryptionConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupResourceEncryptionConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupResourceEncryptionConfig_Get.json // this example is just showing the usage of "BackupResourceEncryptionConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedResource.cs index 2f48003e9d55..baa1d76b0b76 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceEncryptionConfigExtendedResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupResourceEncryptionConfigExtendedResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVaultEncryptionConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupResourceEncryptionConfig_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupResourceEncryptionConfig_Get.json // this example is just showing the usage of "BackupResourceEncryptionConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetVaultEncryptionConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVaultEncryptionConfiguration() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/BackupResourceEncryptionConfig_Put.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/BackupResourceEncryptionConfig_Put.json // this example is just showing the usage of "BackupResourceEncryptionConfigs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigCollection.cs index e74334e01849..d87a6a84c6e9 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BackupResourceVaultConfigCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateVaultSecurityConfig() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupResourceVaultConfigs_Put.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupResourceVaultConfigs_Put.json // this example is just showing the usage of "BackupResourceVaultConfigs_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_UpdateVaultSecurityConfig() [Ignore("Only validating compilation of examples")] public async Task Get_GetVaultSecurityConfig() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupResourceVaultConfigs_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupResourceVaultConfigs_Get.json // this example is just showing the usage of "BackupResourceVaultConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetVaultSecurityConfig() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVaultSecurityConfig() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupResourceVaultConfigs_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupResourceVaultConfigs_Get.json // this example is just showing the usage of "BackupResourceVaultConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetVaultSecurityConfig() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVaultSecurityConfig() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupResourceVaultConfigs_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupResourceVaultConfigs_Get.json // this example is just showing the usage of "BackupResourceVaultConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigResource.cs index 4464b8cd144c..34dbd8988adc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_BackupResourceVaultConfigResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupResourceVaultConfigResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVaultSecurityConfig() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupResourceVaultConfigs_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupResourceVaultConfigs_Get.json // this example is just showing the usage of "BackupResourceVaultConfigs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetVaultSecurityConfig() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVaultSecurityConfig() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupResourceVaultConfigs_Patch.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupResourceVaultConfigs_Patch.json // this example is just showing the usage of "BackupResourceVaultConfigs_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index e423e344b6fa..095411a8bafd 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetBackupProtectionIntents_ListProtectionIntentWithBackupManagementTypeFilter() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureWorkload/BackupProtectionIntent_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureWorkload/BackupProtectionIntent_List.json // this example is just showing the usage of "BackupProtectionIntent_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetBackupProtectionIntents_ListProtectionIntentWithBackupManag [Ignore("Only validating compilation of examples")] public async Task GetBackupUsageSummaries_GetProtectedContainersUsagesSummary() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupProtectionContainers_UsageSummary_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupProtectionContainers_UsageSummary_Get.json // this example is just showing the usage of "BackupUsageSummaries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task GetBackupUsageSummaries_GetProtectedContainersUsagesSummary() [Ignore("Only validating compilation of examples")] public async Task GetBackupUsageSummaries_GetProtectedItemsUsagesSummary() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupProtectedItem_UsageSummary_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupProtectedItem_UsageSummary_Get.json // this example is just showing the usage of "BackupUsageSummaries_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task GetBackupUsageSummaries_GetProtectedItemsUsagesSummary() [Ignore("Only validating compilation of examples")] public async Task ExportJob_ExportJobs() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/TriggerExportJobs.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/TriggerExportJobs.json // this example is just showing the usage of "Jobs_Export" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task ExportJob_ExportJobs() [Ignore("Only validating compilation of examples")] public async Task GetBackupProtectedItems_ListProtectedItemsWithBackupManagementTypeFilterAsAzureIaasVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/BackupProtectedItems_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/BackupProtectedItems_List.json // this example is just showing the usage of "BackupProtectedItems_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetBackupProtectedItems_ListProtectedItemsWithBackupManagement [Ignore("Only validating compilation of examples")] public async Task GetProtectableContainers_ListProtectableItemsWithBackupManagementTypeFilterAsAzureStorage() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectableContainers_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectableContainers_List.json // this example is just showing the usage of "ProtectableContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +205,7 @@ public async Task GetProtectableContainers_ListProtectableItemsWithBackupManagem [Ignore("Only validating compilation of examples")] public async Task RefreshProtectionContainer_TriggerAzureVmDiscovery() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/RefreshContainers.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/RefreshContainers.json // this example is just showing the usage of "ProtectionContainers_Refresh" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task RefreshProtectionContainer_TriggerAzureVmDiscovery() [Ignore("Only validating compilation of examples")] public async Task GetBackupProtectableItems_ListProtectableItemsWithBackupManagementTypeFilterAsAzureIaasVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/BackupProtectableItems_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/BackupProtectableItems_List.json // this example is just showing the usage of "BackupProtectableItems_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +262,7 @@ public async Task GetBackupProtectableItems_ListProtectableItemsWithBackupManage [Ignore("Only validating compilation of examples")] public async Task GetBackupProtectionContainers_ListBackupProtectionContainers() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/ProtectionContainers_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/ProtectionContainers_List.json // this example is just showing the usage of "BackupProtectionContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -296,7 +296,7 @@ public async Task GetBackupProtectionContainers_ListBackupProtectionContainers() [Ignore("Only validating compilation of examples")] public async Task GetSoftDeletedProtectionContainers_ListBackupProtectionContainers() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureStorage/SoftDeletedContainers_List.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureStorage/SoftDeletedContainers_List.json // this example is just showing the usage of "DeletedProtectionContainers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -330,7 +330,7 @@ public async Task GetSoftDeletedProtectionContainers_ListBackupProtectionContain [Ignore("Only validating compilation of examples")] public async Task GetSecurityPin_GetVaultSecurityPin() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/Common/BackupSecurityPin_Get.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/Common/BackupSecurityPin_Get.json // this example is just showing the usage of "SecurityPINs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -356,7 +356,7 @@ public async Task GetSecurityPin_GetVaultSecurityPin() [Ignore("Only validating compilation of examples")] public async Task PostFetchTieringCost_GetTheRehydrationCostForRecoveryPoint() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/TieringCost/FetchTieringCostForRehydrate.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/TieringCost/FetchTieringCostForRehydrate.json // this example is just showing the usage of "FetchTieringCost_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -390,7 +390,7 @@ public async Task PostFetchTieringCost_GetTheRehydrationCostForRecoveryPoint() [Ignore("Only validating compilation of examples")] public async Task PostFetchTieringCost_GetTheTieringSavingsCostInfoForPolicy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/TieringCost/FetchTieringCostForPolicy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/TieringCost/FetchTieringCostForPolicy.json // this example is just showing the usage of "FetchTieringCost_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -418,7 +418,7 @@ public async Task PostFetchTieringCost_GetTheTieringSavingsCostInfoForPolicy() [Ignore("Only validating compilation of examples")] public async Task PostFetchTieringCost_GetTheTieringSavingsCostInfoForProtectedItem() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/TieringCost/FetchTieringCostForProtectedItem.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/TieringCost/FetchTieringCostForProtectedItem.json // this example is just showing the usage of "FetchTieringCost_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -446,7 +446,7 @@ public async Task PostFetchTieringCost_GetTheTieringSavingsCostInfoForProtectedI [Ignore("Only validating compilation of examples")] public async Task PostFetchTieringCost_GetTheTieringSavingsCostInfoForVault() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/TieringCost/FetchTieringCostForVault.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/TieringCost/FetchTieringCostForVault.json // this example is just showing the usage of "FetchTieringCost_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -474,7 +474,7 @@ public async Task PostFetchTieringCost_GetTheTieringSavingsCostInfoForVault() [Ignore("Only validating compilation of examples")] public async Task GetGetTieringCostOperationResult_FetchTieringCostOperationResult() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/TieringCost/GetTieringCostOperationResult.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/TieringCost/GetTieringCostOperationResult.json // this example is just showing the usage of "GetTieringCostOperationResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyCollection.cs index 0901f8b971a2..9d87f28ff45a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGuardProxyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CreateResourceGuardProxy() [Ignore("Only validating compilation of examples")] public async Task Get_GetResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_GetResourceGuardProxy() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetVaultGuardProxies() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetAll_GetVaultGuardProxies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Exists_GetResourceGuardProxy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyResource.cs index 94ba195a1ba3..15d19d4de90f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_ResourceGuardProxyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceGuardProxyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetResourceGuardProxy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteResourceGuardProxy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_CreateResourceGuardProxy() [Ignore("Only validating compilation of examples")] public async Task UnlockDelete_UnlockDeleteResourceGuardProxy() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json // this example is just showing the usage of "ResourceGuardProxy_UnlockDelete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 8ce03fd7f740..f8148e065c9c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task ValidateProtectionIntent_ValidateEnableProtectionOnAzureVm() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/ProtectionIntent_Validate.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/ProtectionIntent_Validate.json // this example is just showing the usage of "ProtectionIntent_Validate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -39,7 +39,7 @@ public async Task ValidateProtectionIntent_ValidateEnableProtectionOnAzureVm() AzureLocation location = new AzureLocation("southeastasia"); PreValidateEnableBackupContent content = new PreValidateEnableBackupContent { - ResourceType = BackupDataSourceType.Vm, + ResourceType = DataSourceTypeAutoGenerated.Vm, ResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/arunaupgrade/providers/Microsoft.Compute/VirtualMachines/upgrade1"), VaultId = new ResourceIdentifier("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.RecoveryServices/Vaults/myVault"), Properties = "", @@ -53,7 +53,7 @@ public async Task ValidateProtectionIntent_ValidateEnableProtectionOnAzureVm() [Ignore("Only validating compilation of examples")] public async Task GetBackupStatus_GetAzureVirtualMachineBackupStatus() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/GetBackupStatus.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/GetBackupStatus.json // this example is just showing the usage of "BackupStatus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +71,7 @@ public async Task GetBackupStatus_GetAzureVirtualMachineBackupStatus() AzureLocation location = new AzureLocation("southeastasia"); BackupStatusContent content = new BackupStatusContent { - ResourceType = BackupDataSourceType.Vm, + ResourceType = DataSourceTypeAutoGenerated2.Vm, ResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Compute/VirtualMachines/testVm"), }; BackupStatusResult result = await subscriptionResource.GetBackupStatusAsync(location, content); @@ -83,7 +83,7 @@ public async Task GetBackupStatus_GetAzureVirtualMachineBackupStatus() [Ignore("Only validating compilation of examples")] public async Task ValidateFeatureSupport_CheckAzureVmBackupFeatureSupport() { - // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-06-01/examples/AzureIaasVm/BackupFeature_Validate.json + // Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/preview/2024-11-01-preview/examples/AzureIaasVm/BackupFeature_Validate.json // this example is just showing the usage of "FeatureSupport_Validate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ArmRecoveryServicesBackupModelFactory.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ArmRecoveryServicesBackupModelFactory.cs index a62d480dd80c..3bb8ce3ab50c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ArmRecoveryServicesBackupModelFactory.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ArmRecoveryServicesBackupModelFactory.cs @@ -322,7 +322,7 @@ public static TriggerDataMoveContent TriggerDataMoveContent(ResourceIdentifier s /// /// ProtectedItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// /// Optional ETag. /// A new instance for mocking. @@ -363,7 +363,7 @@ public static BackupProtectedItemData BackupProtectedItemData(ResourceIdentifier /// Soft delete retention period in days. /// ID of the vault which protects this item. /// A new instance for mocking. - public static BackupGenericProtectedItem BackupGenericProtectedItem(string protectedItemType = null, BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null) + public static BackupGenericProtectedItem BackupGenericProtectedItem(string protectedItemType = null, BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null) { resourceGuardOperationRequests ??= new List(); @@ -400,7 +400,7 @@ public static BackupGenericProtectedItem BackupGenericProtectedItem(string prote /// /// RecoveryPointResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// /// Optional ETag. /// A new instance for mocking. @@ -430,7 +430,7 @@ public static BackupRecoveryPointData BackupRecoveryPointData(ResourceIdentifier /// /// RestoreRequestResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , and . /// /// Optional ETag. /// A new instance for mocking. @@ -610,7 +610,7 @@ public static BackupProtectionContainerData BackupProtectionContainerData(Resour /// /// WorkloadItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// The available derived classes include , , , , , , , and . /// /// Optional ETag. /// A new instance for mocking. @@ -700,7 +700,7 @@ public static ProvisionIlrConnectionContent ProvisionIlrConnectionContent(Resour /// /// WorkloadProtectableItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , and . /// /// Optional ETag. /// A new instance for mocking. @@ -801,7 +801,7 @@ public static FetchTieringCostInfoContent FetchTieringCostInfoContent(RecoveryPo /// Health details of different KPIs. /// Additional information with this backup item. /// A new instance for mocking. - public static FileshareProtectedItem FileshareProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string protectionStatus = null, BackupProtectionState? protectionState = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, IDictionary kpisHealths = null, FileshareProtectedItemExtendedInfo extendedInfo = null) + public static FileshareProtectedItem FileshareProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string protectionStatus = null, BackupProtectionState? protectionState = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, IDictionary kpisHealths = null, FileshareProtectedItemExtendedInfo extendedInfo = null) { resourceGuardOperationRequests ??= new List(); kpisHealths ??= new Dictionary(); @@ -899,7 +899,7 @@ public static FileshareProtectedItemExtendedInfo FileshareProtectedItemExtendedI /// Additional information for this backup item. /// Extended Properties for Azure IaasVM Backup. /// A new instance for mocking. - public static IaasClassicComputeVmProtectedItem IaasClassicComputeVmProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, ResourceIdentifier virtualMachineId = null, string protectionStatus = null, BackupProtectionState? protectionState = null, IaasVmProtectedItemHealthStatus? healthStatus = null, IEnumerable healthDetails = null, IDictionary kpisHealths = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectedItemDataId = null, IaasVmProtectedItemExtendedInfo extendedInfo = null, IaasVmBackupExtendedProperties extendedProperties = null) + public static IaasClassicComputeVmProtectedItem IaasClassicComputeVmProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, ResourceIdentifier virtualMachineId = null, string protectionStatus = null, BackupProtectionState? protectionState = null, IaasVmProtectedItemHealthStatus? healthStatus = null, IEnumerable healthDetails = null, IDictionary kpisHealths = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectedItemDataId = null, IaasVmProtectedItemExtendedInfo extendedInfo = null, IaasVmBackupExtendedProperties extendedProperties = null) { resourceGuardOperationRequests ??= new List(); healthDetails ??= new List(); @@ -972,7 +972,7 @@ public static IaasClassicComputeVmProtectedItem IaasClassicComputeVmProtectedIte /// Additional information for this backup item. /// Extended Properties for Azure IaasVM Backup. /// A new instance for mocking. - public static IaasVmProtectedItem IaasVmProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, ResourceIdentifier virtualMachineId = null, string protectionStatus = null, BackupProtectionState? protectionState = null, IaasVmProtectedItemHealthStatus? healthStatus = null, IEnumerable healthDetails = null, IDictionary kpisHealths = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectedItemDataId = null, IaasVmProtectedItemExtendedInfo extendedInfo = null, IaasVmBackupExtendedProperties extendedProperties = null) + public static IaasVmProtectedItem IaasVmProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, ResourceIdentifier virtualMachineId = null, string protectionStatus = null, BackupProtectionState? protectionState = null, IaasVmProtectedItemHealthStatus? healthStatus = null, IEnumerable healthDetails = null, IDictionary kpisHealths = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectedItemDataId = null, IaasVmProtectedItemExtendedInfo extendedInfo = null, IaasVmBackupExtendedProperties extendedProperties = null) { resourceGuardOperationRequests ??= new List(); healthDetails ??= new List(); @@ -1058,7 +1058,7 @@ public static IaasVmHealthDetails IaasVmHealthDetails(int? code = null, string t /// Additional information for this backup item. /// Extended Properties for Azure IaasVM Backup. /// A new instance for mocking. - public static IaasComputeVmProtectedItem IaasComputeVmProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, ResourceIdentifier virtualMachineId = null, string protectionStatus = null, BackupProtectionState? protectionState = null, IaasVmProtectedItemHealthStatus? healthStatus = null, IEnumerable healthDetails = null, IDictionary kpisHealths = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectedItemDataId = null, IaasVmProtectedItemExtendedInfo extendedInfo = null, IaasVmBackupExtendedProperties extendedProperties = null) + public static IaasComputeVmProtectedItem IaasComputeVmProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, ResourceIdentifier virtualMachineId = null, string protectionStatus = null, BackupProtectionState? protectionState = null, IaasVmProtectedItemHealthStatus? healthStatus = null, IEnumerable healthDetails = null, IDictionary kpisHealths = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectedItemDataId = null, IaasVmProtectedItemExtendedInfo extendedInfo = null, IaasVmBackupExtendedProperties extendedProperties = null) { resourceGuardOperationRequests ??= new List(); healthDetails ??= new List(); @@ -1135,7 +1135,7 @@ public static IaasVmErrorInfo IaasVmErrorInfo(int? errorCode = null, string erro /// Backup state of the backed up item. /// Additional information for this backup item. /// A new instance for mocking. - public static SqlProtectedItem SqlProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string protectedItemDataId = null, ProtectedItemState? protectionState = null, SqlProtectedItemExtendedInfo extendedInfo = null) + public static SqlProtectedItem SqlProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string protectedItemDataId = null, ProtectedItemState? protectionState = null, SqlProtectedItemExtendedInfo extendedInfo = null) { resourceGuardOperationRequests ??= new List(); @@ -1199,7 +1199,7 @@ public static SqlProtectedItem SqlProtectedItem(BackupManagementType? backupMana /// Health details of different KPIs. /// List of the nodes in case of distributed container. /// A new instance for mocking. - public static VmWorkloadProtectedItem VmWorkloadProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) + public static VmWorkloadProtectedItem VmWorkloadProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) { resourceGuardOperationRequests ??= new List(); kpisHealths ??= new Dictionary(); @@ -1288,7 +1288,7 @@ public static BackupErrorDetail BackupErrorDetail(string code = null, string mes /// Health details of different KPIs. /// List of the nodes in case of distributed container. /// A new instance for mocking. - public static VmWorkloadSapAseDatabaseProtectedItem VmWorkloadSapAseDatabaseProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) + public static VmWorkloadSapAseDatabaseProtectedItem VmWorkloadSapAseDatabaseProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) { resourceGuardOperationRequests ??= new List(); kpisHealths ??= new Dictionary(); @@ -1331,6 +1331,160 @@ public static VmWorkloadSapAseDatabaseProtectedItem VmWorkloadSapAseDatabaseProt nodesList?.ToList()); } + /// Initializes a new instance of . + /// Type of backup management for the backed up item. + /// Type of workload this item represents. + /// Unique name of container. + /// ARM ID of the resource to be backed up. + /// ID of the backup policy with which this item is backed up. + /// Timestamp when the last (latest) backup copy was created for this backup item. + /// Name of the backup set the backup item belongs to. + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// Time for deferred deletion in UTC. + /// Flag to identify whether the DS is scheduled for deferred delete. + /// Time remaining before the DS marked for deferred delete is permanently deleted. + /// Flag to identify whether the deferred deleted DS is to be purged soon. + /// Flag to identify that deferred deleted DS is to be moved into Pause state. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Flag to identify whether datasource is protected in archive. + /// Name of the policy used for protection. + /// Soft delete retention period in days. + /// ID of the vault which protects this item. + /// Friendly name of the DB represented by this backup item. + /// Host/Cluster Name for instance or AG. + /// Parent name of the DB such as Instance or Availability Group. + /// Parent type of protected item, example: for a DB, standalone server or distributed. + /// Backup status of this backup item. + /// Backup state of this backup item. + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Timestamp of the last backup operation on this backup item. + /// Error details in last backup. + /// Data ID of the protected item. + /// Health status of the backup item, evaluated based on last heartbeat received. + /// Additional information for this backup item. + /// Health details of different KPIs. + /// List of the nodes in case of distributed container. + /// A new instance for mocking. + public static AzureVmWorkloadOracleDatabaseProtectedItem AzureVmWorkloadOracleDatabaseProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) + { + resourceGuardOperationRequests ??= new List(); + kpisHealths ??= new Dictionary(); + nodesList ??= new List(); + + return new AzureVmWorkloadOracleDatabaseProtectedItem( + "AzureVmWorkloadOracleDatabase", + backupManagementType, + workloadType, + containerName, + sourceResourceId, + policyId, + lastRecoverOn, + backupSetName, + createMode, + deferredDeletedOn, + isScheduledForDeferredDelete, + deferredDeleteTimeRemaining, + isDeferredDeleteScheduleUpcoming, + isRehydrate, + resourceGuardOperationRequests?.ToList(), + isArchiveEnabled, + policyName, + softDeleteRetentionPeriodInDays, + vaultId, + serializedAdditionalRawData: null, + friendlyName, + serverName, + parentName, + parentType, + protectionStatus, + protectionState, + lastBackupStatus, + lastBackupOn, + lastBackupErrorDetail, + protectedItemDataSourceId, + protectedItemHealthStatus, + extendedInfo, + kpisHealths, + nodesList?.ToList()); + } + + /// Initializes a new instance of . + /// Type of backup management for the backed up item. + /// Type of workload this item represents. + /// Unique name of container. + /// ARM ID of the resource to be backed up. + /// ID of the backup policy with which this item is backed up. + /// Timestamp when the last (latest) backup copy was created for this backup item. + /// Name of the backup set the backup item belongs to. + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// Time for deferred deletion in UTC. + /// Flag to identify whether the DS is scheduled for deferred delete. + /// Time remaining before the DS marked for deferred delete is permanently deleted. + /// Flag to identify whether the deferred deleted DS is to be purged soon. + /// Flag to identify that deferred deleted DS is to be moved into Pause state. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Flag to identify whether datasource is protected in archive. + /// Name of the policy used for protection. + /// Soft delete retention period in days. + /// ID of the vault which protects this item. + /// Friendly name of the DB represented by this backup item. + /// Host/Cluster Name for instance or AG. + /// Parent name of the DB such as Instance or Availability Group. + /// Parent type of protected item, example: for a DB, standalone server or distributed. + /// Backup status of this backup item. + /// Backup state of this backup item. + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Timestamp of the last backup operation on this backup item. + /// Error details in last backup. + /// Data ID of the protected item. + /// Health status of the backup item, evaluated based on last heartbeat received. + /// Additional information for this backup item. + /// Health details of different KPIs. + /// List of the nodes in case of distributed container. + /// A new instance for mocking. + public static AzureVmWorkloadAnyDatabaseProtectedItem AzureVmWorkloadAnyDatabaseProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) + { + resourceGuardOperationRequests ??= new List(); + kpisHealths ??= new Dictionary(); + nodesList ??= new List(); + + return new AzureVmWorkloadAnyDatabaseProtectedItem( + "AzureVmWorkloadAnyDatabase", + backupManagementType, + workloadType, + containerName, + sourceResourceId, + policyId, + lastRecoverOn, + backupSetName, + createMode, + deferredDeletedOn, + isScheduledForDeferredDelete, + deferredDeleteTimeRemaining, + isDeferredDeleteScheduleUpcoming, + isRehydrate, + resourceGuardOperationRequests?.ToList(), + isArchiveEnabled, + policyName, + softDeleteRetentionPeriodInDays, + vaultId, + serializedAdditionalRawData: null, + friendlyName, + serverName, + parentName, + parentType, + protectionStatus, + protectionState, + lastBackupStatus, + lastBackupOn, + lastBackupErrorDetail, + protectedItemDataSourceId, + protectedItemHealthStatus, + extendedInfo, + kpisHealths, + nodesList?.ToList()); + } + /// Initializes a new instance of . /// Type of backup management for the backed up item. /// Type of workload this item represents. @@ -1365,7 +1519,7 @@ public static VmWorkloadSapAseDatabaseProtectedItem VmWorkloadSapAseDatabaseProt /// Health details of different KPIs. /// List of the nodes in case of distributed container. /// A new instance for mocking. - public static VmWorkloadSapHanaDatabaseProtectedItem VmWorkloadSapHanaDatabaseProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) + public static VmWorkloadSapHanaDatabaseProtectedItem VmWorkloadSapHanaDatabaseProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) { resourceGuardOperationRequests ??= new List(); kpisHealths ??= new Dictionary(); @@ -1442,7 +1596,7 @@ public static VmWorkloadSapHanaDatabaseProtectedItem VmWorkloadSapHanaDatabasePr /// Health details of different KPIs. /// List of the nodes in case of distributed container. /// A new instance for mocking. - public static VmWorkloadSapHanaDBInstanceProtectedItem VmWorkloadSapHanaDBInstanceProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) + public static VmWorkloadSapHanaDBInstanceProtectedItem VmWorkloadSapHanaDBInstanceProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) { resourceGuardOperationRequests ??= new List(); kpisHealths ??= new Dictionary(); @@ -1519,7 +1673,7 @@ public static VmWorkloadSapHanaDBInstanceProtectedItem VmWorkloadSapHanaDBInstan /// Health details of different KPIs. /// List of the nodes in case of distributed container. /// A new instance for mocking. - public static VmWorkloadSqlDatabaseProtectedItem VmWorkloadSqlDatabaseProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) + public static VmWorkloadSqlDatabaseProtectedItem VmWorkloadSqlDatabaseProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string serverName = null, string parentName = null, string parentType = null, string protectionStatus = null, BackupProtectionState? protectionState = null, LastBackupStatus? lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, BackupErrorDetail lastBackupErrorDetail = null, string protectedItemDataSourceId = null, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = null, VmWorkloadProtectedItemExtendedInfo extendedInfo = null, IDictionary kpisHealths = null, IEnumerable nodesList = null) { resourceGuardOperationRequests ??= new List(); kpisHealths ??= new Dictionary(); @@ -1586,7 +1740,7 @@ public static VmWorkloadSqlDatabaseProtectedItem VmWorkloadSqlDatabaseProtectedI /// Protection state of the backup engine. /// Extended info of the backup item. /// A new instance for mocking. - public static DpmProtectedItem DpmProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string backupEngineName = null, ProtectedItemState? protectionState = null, DpmProtectedItemExtendedInfo extendedInfo = null) + public static DpmProtectedItem DpmProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string backupEngineName = null, ProtectedItemState? protectionState = null, DpmProtectedItemExtendedInfo extendedInfo = null) { resourceGuardOperationRequests ??= new List(); @@ -1643,7 +1797,7 @@ public static DpmProtectedItem DpmProtectedItem(BackupManagementType? backupMana /// Loosely coupled (type, value) associations (example - parent of a protected item). /// Name of this backup item's fabric. /// A new instance for mocking. - public static GenericProtectedItem GenericProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string policyState = null, BackupProtectionState? protectionState = null, long? protectedItemId = null, IDictionary sourceAssociations = null, string fabricName = null) + public static GenericProtectedItem GenericProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string policyState = null, BackupProtectionState? protectionState = null, long? protectedItemId = null, IDictionary sourceAssociations = null, string fabricName = null) { resourceGuardOperationRequests ??= new List(); sourceAssociations ??= new Dictionary(); @@ -1715,7 +1869,7 @@ public static MabErrorInfo MabErrorInfo(string errorString = null, IEnumerable Sync time for deferred deletion in UTC. /// Additional information with this backup item. /// A new instance for mocking. - public static MabFileFolderProtectedItem MabFileFolderProtectedItem(BackupManagementType? backupManagementType = null, BackupDataSourceType? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string computerName = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectionState = null, long? deferredDeleteSyncTimeInUTC = null, MabFileFolderProtectedItemExtendedInfo extendedInfo = null) + public static MabFileFolderProtectedItem MabFileFolderProtectedItem(BackupManagementType? backupManagementType = null, DataSourceTypeAutoGenerated3? workloadType = null, string containerName = null, ResourceIdentifier sourceResourceId = null, ResourceIdentifier policyId = null, DateTimeOffset? lastRecoverOn = null, string backupSetName = null, BackupCreateMode? createMode = null, DateTimeOffset? deferredDeletedOn = null, bool? isScheduledForDeferredDelete = null, string deferredDeleteTimeRemaining = null, bool? isDeferredDeleteScheduleUpcoming = null, bool? isRehydrate = null, IEnumerable resourceGuardOperationRequests = null, bool? isArchiveEnabled = null, string policyName = null, int? softDeleteRetentionPeriodInDays = null, string vaultId = null, string friendlyName = null, string computerName = null, string lastBackupStatus = null, DateTimeOffset? lastBackupOn = null, string protectionState = null, long? deferredDeleteSyncTimeInUTC = null, MabFileFolderProtectedItemExtendedInfo extendedInfo = null) { resourceGuardOperationRequests ??= new List(); @@ -1843,32 +1997,6 @@ public static FetchTieringCostSavingsInfoForVaultContent FetchTieringCostSavings return new FetchTieringCostSavingsInfoForVaultContent(sourceTierType, targetTierType, "FetchTieringCostSavingsInfoForVaultRequest", serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// backup item type. - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static BackupGenericProtectedItem BackupGenericProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays) - { - return BackupGenericProtectedItem(protectedItemType: protectedItemType, backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default); - } - /// Initializes a new instance of . /// Specifies whether the container is registered or not. /// Specifies the arm resource id of the vault. @@ -1885,463 +2013,5 @@ public static BackupStatusResult BackupStatusResult(BackupProtectionStatus? prot { return BackupStatusResult(protectionStatus: protectionStatus, vaultId: vaultId, fabricName: fabricName, containerName: containerName, protectedItemName: protectedItemName, errorCode: errorCode, errorMessage: errorMessage, policyName: policyName, registrationStatus: registrationStatus, protectedItemsCount: default, acquireStorageAccountLock: default); } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the managed item. - /// Backup Management server protecting this backup item. - /// Protection state of the backup engine. - /// Extended info of the backup item. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static DpmProtectedItem DpmProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string backupEngineName, ProtectedItemState? protectionState, DpmProtectedItemExtendedInfo extendedInfo) - { - return DpmProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, backupEngineName: backupEngineName, protectionState: protectionState, extendedInfo: extendedInfo); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the fileshare represented by this backup item. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Last backup operation status. Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation on this backup item. - /// Health details of different KPIs. - /// Additional information with this backup item. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static FileshareProtectedItem FileshareProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string protectionStatus, BackupProtectionState? protectionState, string lastBackupStatus, DateTimeOffset? lastBackupOn, IDictionary kpisHealths, FileshareProtectedItemExtendedInfo extendedInfo) - { - return FileshareProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, protectionStatus: protectionStatus, protectionState: protectionState, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, kpisHealths: kpisHealths, extendedInfo: extendedInfo); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the container. - /// Indicates consistency of policy object and policy applied to this backup item. - /// Backup state of this backup item. - /// Data Plane Service ID of the protected item. - /// Loosely coupled (type, value) associations (example - parent of a protected item). - /// Name of this backup item's fabric. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static GenericProtectedItem GenericProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string policyState, BackupProtectionState? protectionState, long? protectedItemId, IDictionary sourceAssociations, string fabricName) - { - return GenericProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, policyState: policyState, protectionState: protectionState, protectedItemId: protectedItemId, sourceAssociations: sourceAssociations, fabricName: fabricName); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the VM represented by this backup item. - /// Fully qualified ARM ID of the virtual machine represented by this item. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Health status of protected item. - /// Health details on this backup item. - /// Health details of different KPIs. - /// Last backup operation status. - /// Timestamp of the last backup operation on this backup item. - /// Data ID of the protected item. - /// Additional information for this backup item. - /// Extended Properties for Azure IaasVM Backup. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static IaasClassicComputeVmProtectedItem IaasClassicComputeVmProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IEnumerable healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) - { - return IaasClassicComputeVmProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, virtualMachineId: virtualMachineId, protectionStatus: protectionStatus, protectionState: protectionState, healthStatus: healthStatus, healthDetails: healthDetails, kpisHealths: kpisHealths, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, protectedItemDataId: protectedItemDataId, extendedInfo: extendedInfo, extendedProperties: extendedProperties); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the VM represented by this backup item. - /// Fully qualified ARM ID of the virtual machine represented by this item. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Health status of protected item. - /// Health details on this backup item. - /// Health details of different KPIs. - /// Last backup operation status. - /// Timestamp of the last backup operation on this backup item. - /// Data ID of the protected item. - /// Additional information for this backup item. - /// Extended Properties for Azure IaasVM Backup. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static IaasComputeVmProtectedItem IaasComputeVmProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IEnumerable healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) - { - return IaasComputeVmProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, virtualMachineId: virtualMachineId, protectionStatus: protectionStatus, protectionState: protectionState, healthStatus: healthStatus, healthDetails: healthDetails, kpisHealths: kpisHealths, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, protectedItemDataId: protectedItemDataId, extendedInfo: extendedInfo, extendedProperties: extendedProperties); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the VM represented by this backup item. - /// Fully qualified ARM ID of the virtual machine represented by this item. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Health status of protected item. - /// Health details on this backup item. - /// Health details of different KPIs. - /// Last backup operation status. - /// Timestamp of the last backup operation on this backup item. - /// Data ID of the protected item. - /// Additional information for this backup item. - /// Extended Properties for Azure IaasVM Backup. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static IaasVmProtectedItem IaasVmProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IEnumerable healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) - { - return IaasVmProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, virtualMachineId: virtualMachineId, protectionStatus: protectionStatus, protectionState: protectionState, healthStatus: healthStatus, healthDetails: healthDetails, kpisHealths: kpisHealths, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, protectedItemDataId: protectedItemDataId, extendedInfo: extendedInfo, extendedProperties: extendedProperties); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of this backup item. - /// Name of the computer associated with this backup item. - /// Status of last backup operation. - /// Timestamp of the last backup operation on this backup item. - /// Protected, ProtectionStopped, IRPending or ProtectionError. - /// Sync time for deferred deletion in UTC. - /// Additional information with this backup item. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static MabFileFolderProtectedItem MabFileFolderProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string computerName, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectionState, long? deferredDeleteSyncTimeInUTC, MabFileFolderProtectedItemExtendedInfo extendedInfo) - { - return MabFileFolderProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, computerName: computerName, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, protectionState: protectionState, deferredDeleteSyncTimeInUTC: deferredDeleteSyncTimeInUTC, extendedInfo: extendedInfo); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. - /// Backup state of the backed up item. - /// Additional information for this backup item. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static SqlProtectedItem SqlProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string protectedItemDataId, ProtectedItemState? protectionState, SqlProtectedItemExtendedInfo extendedInfo) - { - return SqlProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, protectedItemDataId: protectedItemDataId, protectionState: protectionState, extendedInfo: extendedInfo); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the DB represented by this backup item. - /// Host/Cluster Name for instance or AG. - /// Parent name of the DB such as Instance or Availability Group. - /// Parent type of protected item, example: for a DB, standalone server or distributed. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Last backup operation status. Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation on this backup item. - /// Error details in last backup. - /// Data ID of the protected item. - /// Health status of the backup item, evaluated based on last heartbeat received. - /// Additional information for this backup item. - /// Health details of different KPIs. - /// List of the nodes in case of distributed container. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static VmWorkloadProtectedItem VmWorkloadProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IEnumerable nodesList) - { - return VmWorkloadProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, serverName: serverName, parentName: parentName, parentType: parentType, protectionStatus: protectionStatus, protectionState: protectionState, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, lastBackupErrorDetail: lastBackupErrorDetail, protectedItemDataSourceId: protectedItemDataSourceId, protectedItemHealthStatus: protectedItemHealthStatus, extendedInfo: extendedInfo, kpisHealths: kpisHealths, nodesList: nodesList); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the DB represented by this backup item. - /// Host/Cluster Name for instance or AG. - /// Parent name of the DB such as Instance or Availability Group. - /// Parent type of protected item, example: for a DB, standalone server or distributed. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Last backup operation status. Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation on this backup item. - /// Error details in last backup. - /// Data ID of the protected item. - /// Health status of the backup item, evaluated based on last heartbeat received. - /// Additional information for this backup item. - /// Health details of different KPIs. - /// List of the nodes in case of distributed container. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static VmWorkloadSapAseDatabaseProtectedItem VmWorkloadSapAseDatabaseProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IEnumerable nodesList) - { - return VmWorkloadSapAseDatabaseProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, serverName: serverName, parentName: parentName, parentType: parentType, protectionStatus: protectionStatus, protectionState: protectionState, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, lastBackupErrorDetail: lastBackupErrorDetail, protectedItemDataSourceId: protectedItemDataSourceId, protectedItemHealthStatus: protectedItemHealthStatus, extendedInfo: extendedInfo, kpisHealths: kpisHealths, nodesList: nodesList); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the DB represented by this backup item. - /// Host/Cluster Name for instance or AG. - /// Parent name of the DB such as Instance or Availability Group. - /// Parent type of protected item, example: for a DB, standalone server or distributed. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Last backup operation status. Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation on this backup item. - /// Error details in last backup. - /// Data ID of the protected item. - /// Health status of the backup item, evaluated based on last heartbeat received. - /// Additional information for this backup item. - /// Health details of different KPIs. - /// List of the nodes in case of distributed container. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static VmWorkloadSapHanaDatabaseProtectedItem VmWorkloadSapHanaDatabaseProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IEnumerable nodesList) - { - return VmWorkloadSapHanaDatabaseProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, serverName: serverName, parentName: parentName, parentType: parentType, protectionStatus: protectionStatus, protectionState: protectionState, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, lastBackupErrorDetail: lastBackupErrorDetail, protectedItemDataSourceId: protectedItemDataSourceId, protectedItemHealthStatus: protectedItemHealthStatus, extendedInfo: extendedInfo, kpisHealths: kpisHealths, nodesList: nodesList); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the DB represented by this backup item. - /// Host/Cluster Name for instance or AG. - /// Parent name of the DB such as Instance or Availability Group. - /// Parent type of protected item, example: for a DB, standalone server or distributed. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Last backup operation status. Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation on this backup item. - /// Error details in last backup. - /// Data ID of the protected item. - /// Health status of the backup item, evaluated based on last heartbeat received. - /// Additional information for this backup item. - /// Health details of different KPIs. - /// List of the nodes in case of distributed container. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static VmWorkloadSapHanaDBInstanceProtectedItem VmWorkloadSapHanaDBInstanceProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IEnumerable nodesList) - { - return VmWorkloadSapHanaDBInstanceProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, serverName: serverName, parentName: parentName, parentType: parentType, protectionStatus: protectionStatus, protectionState: protectionState, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, lastBackupErrorDetail: lastBackupErrorDetail, protectedItemDataSourceId: protectedItemDataSourceId, protectedItemHealthStatus: protectedItemHealthStatus, extendedInfo: extendedInfo, kpisHealths: kpisHealths, nodesList: nodesList); - } - - /// Initializes a new instance of . - /// Type of backup management for the backed up item. - /// Type of workload this item represents. - /// Unique name of container. - /// ARM ID of the resource to be backed up. - /// ID of the backup policy with which this item is backed up. - /// Timestamp when the last (latest) backup copy was created for this backup item. - /// Name of the backup set the backup item belongs to. - /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. - /// Time for deferred deletion in UTC. - /// Flag to identify whether the DS is scheduled for deferred delete. - /// Time remaining before the DS marked for deferred delete is permanently deleted. - /// Flag to identify whether the deferred deleted DS is to be purged soon. - /// Flag to identify that deferred deleted DS is to be moved into Pause state. - /// ResourceGuardOperationRequests on which LAC check will be performed. - /// Flag to identify whether datasource is protected in archive. - /// Name of the policy used for protection. - /// Soft delete retention period in days. - /// Friendly name of the DB represented by this backup item. - /// Host/Cluster Name for instance or AG. - /// Parent name of the DB such as Instance or Availability Group. - /// Parent type of protected item, example: for a DB, standalone server or distributed. - /// Backup status of this backup item. - /// Backup state of this backup item. - /// Last backup operation status. Possible values: Healthy, Unhealthy. - /// Timestamp of the last backup operation on this backup item. - /// Error details in last backup. - /// Data ID of the protected item. - /// Health status of the backup item, evaluated based on last heartbeat received. - /// Additional information for this backup item. - /// Health details of different KPIs. - /// List of the nodes in case of distributed container. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static VmWorkloadSqlDatabaseProtectedItem VmWorkloadSqlDatabaseProtectedItem(BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IEnumerable resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IEnumerable nodesList) - { - return VmWorkloadSqlDatabaseProtectedItem(backupManagementType: backupManagementType, workloadType: workloadType, containerName: containerName, sourceResourceId: sourceResourceId, policyId: policyId, lastRecoverOn: lastRecoverOn, backupSetName: backupSetName, createMode: createMode, deferredDeletedOn: deferredDeletedOn, isScheduledForDeferredDelete: isScheduledForDeferredDelete, deferredDeleteTimeRemaining: deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming: isDeferredDeleteScheduleUpcoming, isRehydrate: isRehydrate, resourceGuardOperationRequests: resourceGuardOperationRequests, isArchiveEnabled: isArchiveEnabled, policyName: policyName, softDeleteRetentionPeriodInDays: softDeleteRetentionPeriodInDays, vaultId: default, friendlyName: friendlyName, serverName: serverName, parentName: parentName, parentType: parentType, protectionStatus: protectionStatus, protectionState: protectionState, lastBackupStatus: lastBackupStatus, lastBackupOn: lastBackupOn, lastBackupErrorDetail: lastBackupErrorDetail, protectedItemDataSourceId: protectedItemDataSourceId, protectedItemHealthStatus: protectedItemHealthStatus, extendedInfo: extendedInfo, kpisHealths: kpisHealths, nodesList: nodesList); - } } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineCollection.cs index e942adc9f039..46b5cf08fb44 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAsync(string backup /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -164,7 +164,7 @@ public virtual Response Get(string backupEngineName, strin /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -196,7 +196,7 @@ public virtual AsyncPageable GetAllAsync(string filter = n /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual Pageable GetAll(string filter = null, strin /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -273,7 +273,7 @@ public virtual async Task> ExistsAsync(string backupEngineName, s /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Response Exists(string backupEngineName, string filter = nu /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.cs index 12e8aa3ae709..3e6d3652dab5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string filter /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobCollection.cs index 1558ecdb51eb..428a73832c84 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobCollection.cs @@ -75,7 +75,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -120,7 +120,7 @@ public virtual async Task> GetAsync(string jobName, /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -165,7 +165,7 @@ public virtual Response Get(string jobName, CancellationToken /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -197,7 +197,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual Pageable GetAll(string filter = null, string s /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -272,7 +272,7 @@ public virtual async Task> ExistsAsync(string jobName, Cancellati /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Response Exists(string jobName, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.cs index 3ccb1bb1edf6..33b6c2f8302e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -222,7 +222,7 @@ public virtual async Task TriggerJobCancellationAsync(CancellationToke /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionCollection.cs index 4bece750e0f3..534737ea027f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string vaul /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -303,7 +303,7 @@ public virtual async Task> ExistsAsync(string vaultName, string p /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -348,7 +348,7 @@ public virtual Response Exists(string vaultName, string privateEndpointCon /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -395,7 +395,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.cs index 4e054a8dca9c..8f561ad61049 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -416,7 +416,7 @@ public virtual async Task> Add /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -473,7 +473,7 @@ public virtual Response AddTag(string k /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -529,7 +529,7 @@ public virtual async Task> Set /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -585,7 +585,7 @@ public virtual Response SetTags(IDictio /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -640,7 +640,7 @@ public virtual async Task> Rem /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemCollection.cs index 9eb4680cbc87..95834eeec25b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -73,10 +73,11 @@ 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. /// Item name to be backed up. /// resource backed up item. + /// The to use. /// 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, BackupProtectedItemData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string protectedItemName, BackupProtectedItemData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); Argument.AssertNotNull(data, nameof(data)); @@ -85,8 +86,8 @@ public virtual async Task> CreateOrUpd scope.Start(); try { - var response = await _backupProtectedItemProtectedItemsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); + var response = await _backupProtectedItemProtectedItemsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data, xMsAuthorizationAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -112,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -123,10 +124,11 @@ public virtual async Task> CreateOrUpd /// 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. /// Item name to be backed up. /// resource backed up item. + /// The to use. /// 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, BackupProtectedItemData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string protectedItemName, BackupProtectedItemData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); Argument.AssertNotNull(data, nameof(data)); @@ -135,8 +137,8 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti scope.Start(); try { - var response = _backupProtectedItemProtectedItemsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data, cancellationToken); - var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.Location); + var response = _backupProtectedItemProtectedItemsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data, xMsAuthorizationAuxiliary, cancellationToken); + var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, protectedItemName, data, xMsAuthorizationAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -209,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -255,7 +257,7 @@ public virtual Response Get(string protectedItemNam /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -299,7 +301,7 @@ public virtual async Task> ExistsAsync(string protectedItemName, /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -343,7 +345,7 @@ public virtual Response Exists(string protectedItemName, string filter = n /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -389,7 +391,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.cs index 74baa7e5b1cd..b6af19daaa9c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemData.cs @@ -67,7 +67,7 @@ public BackupProtectedItemData(AzureLocation location) : base(location) /// /// ProtectedItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// /// Optional ETag. /// Keeps track of any properties unknown to the library. @@ -86,7 +86,7 @@ internal BackupProtectedItemData() /// /// ProtectedItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// public BackupGenericProtectedItem Properties { get; set; } /// Optional ETag. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.cs index 1a66971fbd87..4fe4620b9bd7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.cs @@ -122,7 +122,7 @@ public virtual BackupRecoveryPointCollection GetBackupRecoveryPoints() /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual async Task> GetBackupRecove /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response GetBackupRecoveryPoint(stri /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual Response Get(string filter = null, C /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -370,9 +370,10 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// 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. /// resource backed up item. + /// The to use. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, BackupProtectedItemData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BackupProtectedItemData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -380,8 +381,8 @@ public virtual async Task> UpdateAsync scope.Start(); try { - var response = await _backupProtectedItemProtectedItemsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _backupProtectedItemProtectedItemsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -407,7 +408,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -417,9 +418,10 @@ public virtual async Task> UpdateAsync /// /// 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. /// resource backed up item. + /// The to use. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, BackupProtectedItemData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, BackupProtectedItemData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -427,8 +429,8 @@ public virtual ArmOperation Update(WaitUntil waitUn scope.Start(); try { - var response = _backupProtectedItemProtectedItemsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _backupProtectedItemProtectedItemsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary, cancellationToken); + var operation = new RecoveryServicesBackupArmOperation(new BackupProtectedItemOperationSource(Client), _backupProtectedItemProtectedItemsClientDiagnostics, Pipeline, _backupProtectedItemProtectedItemsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -454,7 +456,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -493,7 +495,7 @@ public virtual async Task TriggerBackupAsync(TriggerBackupContent cont /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -531,7 +533,7 @@ public virtual Response TriggerBackup(TriggerBackupContent content, Cancellation /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -561,7 +563,7 @@ public virtual AsyncPageable GetRecoveryPointsRecom /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -591,7 +593,7 @@ public virtual Pageable GetRecoveryPointsRecommende /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -648,7 +650,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -705,7 +707,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -761,7 +763,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -817,7 +819,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -872,7 +874,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerCollection.cs index f1380df6878a..1034354c94f2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -119,7 +119,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -221,7 +221,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual Response Get(string vaultName, /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> ExistsAsync(string vaultName, string f /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual Response Exists(string vaultName, string fabricName, string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.cs index af451bf54056..a0287c0ca45f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.cs @@ -118,7 +118,7 @@ public virtual BackupProtectedItemCollection GetBackupProtectedItems() /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -151,7 +151,7 @@ public virtual async Task> GetBackupProtec /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response GetBackupProtectedItem(stri /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -488,7 +488,7 @@ public virtual async Task InquireAsync(string filter = null, Cancellat /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -528,7 +528,7 @@ public virtual Response Inquire(string filter = null, CancellationToken cancella /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -557,7 +557,7 @@ public virtual AsyncPageable GetBackupWorkloadItemsAsync(s /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -585,7 +585,7 @@ public virtual Pageable GetBackupWorkloadItems(string filt /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -642,7 +642,7 @@ public virtual async Task> AddTagAsy /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -699,7 +699,7 @@ public virtual Response AddTag(string key, st /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -755,7 +755,7 @@ public virtual async Task> SetTagsAs /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -811,7 +811,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -866,7 +866,7 @@ public virtual async Task> RemoveTag /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentCollection.cs index bbde1aa358a4..c47a1e0b59bb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -173,7 +173,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -272,7 +272,7 @@ public virtual Response Get(string vaultName, st /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> ExistsAsync(string vaultName, string f /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -366,7 +366,7 @@ public virtual Response Exists(string vaultName, string fabricName, string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.cs index 777e07c73959..2c36ae978b73 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -427,7 +427,7 @@ public virtual async Task> AddTagAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -484,7 +484,7 @@ public virtual Response AddTag(string key, strin /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTagsAsync /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -596,7 +596,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsy /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyCollection.cs index a4e2dbd2dc60..9d4f464e77ac 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyCollection.cs @@ -76,7 +76,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -87,10 +87,11 @@ 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. /// Backup policy to be created. /// resource backup policy. + /// The to use. /// 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, BackupProtectionPolicyData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string policyName, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); Argument.AssertNotNull(data, nameof(data)); @@ -99,8 +100,8 @@ public virtual async Task> CreateOr scope.Start(); try { - var response = await _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data, cancellationToken).ConfigureAwait(false); - var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data); + var response = await _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); + var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data, xMsAuthorizationAuxiliary); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new RecoveryServicesBackupArmOperation(Response.FromValue(new BackupProtectionPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) @@ -128,7 +129,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -139,10 +140,11 @@ public virtual async Task> CreateOr /// 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. /// Backup policy to be created. /// resource backup policy. + /// The to use. /// 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, BackupProtectionPolicyData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string policyName, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); Argument.AssertNotNull(data, nameof(data)); @@ -151,8 +153,8 @@ public virtual ArmOperation CreateOrUpdate(WaitU scope.Start(); try { - var response = _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data, cancellationToken); - var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data); + var response = _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data, xMsAuthorizationAuxiliary, cancellationToken); + var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, _vaultName, policyName, data, xMsAuthorizationAuxiliary); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new RecoveryServicesBackupArmOperation(Response.FromValue(new BackupProtectionPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) @@ -180,7 +182,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -226,7 +228,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -272,7 +274,7 @@ public virtual Response Get(string policyName, C /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -304,7 +306,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -335,7 +337,7 @@ public virtual Pageable GetAll(string filter = n /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -378,7 +380,7 @@ public virtual async Task> ExistsAsync(string policyName, Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -421,7 +423,7 @@ public virtual Response Exists(string policyName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -466,7 +468,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.cs index c6a10344fe1b..de0d9a050f70 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -282,9 +282,10 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// 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. /// resource backup policy. + /// The to use. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, BackupProtectionPolicyData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -292,8 +293,8 @@ public virtual async Task> UpdateAs scope.Start(); try { - var response = await _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var response = await _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); + var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new RecoveryServicesBackupArmOperation(Response.FromValue(new BackupProtectionPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) @@ -321,7 +322,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -331,9 +332,10 @@ public virtual async Task> UpdateAs /// /// 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. /// resource backup policy. + /// The to use. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, BackupProtectionPolicyData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -341,8 +343,8 @@ public virtual ArmOperation Update(WaitUntil wai scope.Start(); try { - var response = _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var response = _backupProtectionPolicyProtectionPoliciesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary, cancellationToken); + var uri = _backupProtectionPolicyProtectionPoliciesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, xMsAuthorizationAuxiliary); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new RecoveryServicesBackupArmOperation(Response.FromValue(new BackupProtectionPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) @@ -369,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -426,7 +428,7 @@ public virtual async Task> AddTagAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -483,7 +485,7 @@ public virtual Response AddTag(string key, strin /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -539,7 +541,7 @@ public virtual async Task> SetTagsAsync /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -595,7 +597,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -650,7 +652,7 @@ public virtual async Task> RemoveTagAsy /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointCollection.cs index 878409884c79..b6448b2d752a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -156,7 +156,7 @@ public virtual Response Get(string recoveryPointId, /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(string fil /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(string filter = null /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string recoveryPointId, Ca /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string recoveryPointId, CancellationToken c /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.cs index 3d0e22cb4f52..f5d8a0563ba4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointData.cs @@ -67,7 +67,7 @@ public BackupRecoveryPointData(AzureLocation location) : base(location) /// /// RecoveryPointResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// /// Optional ETag. /// Keeps track of any properties unknown to the library. @@ -86,7 +86,7 @@ internal BackupRecoveryPointData() /// /// RecoveryPointResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// public BackupGenericRecoveryPoint Properties { get; set; } /// Optional ETag. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.cs index 12a16c0466ef..0d2d94b54ba7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.cs @@ -118,7 +118,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -186,6 +186,90 @@ public virtual Response Get(CancellationToken cance } } + /// + /// UpdateRecoveryPoint to update recovery point for given RecoveryPointID. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId} + /// + /// + /// Operation Id + /// RecoveryPoints_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Request body for operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(BackupRecoveryPointPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _backupRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("BackupRecoveryPointResource.Update"); + scope.Start(); + try + { + var response = await _backupRecoveryPointRecoveryPointsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new BackupRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// UpdateRecoveryPoint to update recovery point for given RecoveryPointID. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId} + /// + /// + /// Operation Id + /// RecoveryPoints_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Request body for operation. + /// The cancellation token to use. + /// is null. + public virtual Response Update(BackupRecoveryPointPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _backupRecoveryPointRecoveryPointsClientDiagnostics.CreateScope("BackupRecoveryPointResource.Update"); + scope.Start(); + try + { + var response = _backupRecoveryPointRecoveryPointsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new BackupRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Move recovery point from one datastore to another store. /// @@ -199,7 +283,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -241,7 +325,7 @@ public virtual async Task MoveRecoveryPointAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -284,15 +368,16 @@ public virtual ArmOperation MoveRecoveryPoint(WaitUntil waitUntil, MoveRPAcrossT /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// /// 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. /// resource restore request. + /// The to use. /// The cancellation token to use. /// is null. - public virtual async Task TriggerRestoreAsync(WaitUntil waitUntil, TriggerRestoreContent content, CancellationToken cancellationToken = default) + public virtual async Task TriggerRestoreAsync(WaitUntil waitUntil, TriggerRestoreContent content, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -300,8 +385,8 @@ public virtual async Task TriggerRestoreAsync(WaitUntil waitUntil, scope.Start(); try { - var response = await _restoresRestClient.TriggerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new RecoveryServicesBackupArmOperation(_restoresClientDiagnostics, Pipeline, _restoresRestClient.CreateTriggerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _restoresRestClient.TriggerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesBackupArmOperation(_restoresClientDiagnostics, Pipeline, _restoresRestClient.CreateTriggerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, xMsAuthorizationAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -327,15 +412,16 @@ public virtual async Task TriggerRestoreAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// /// 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. /// resource restore request. + /// The to use. /// The cancellation token to use. /// is null. - public virtual ArmOperation TriggerRestore(WaitUntil waitUntil, TriggerRestoreContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation TriggerRestore(WaitUntil waitUntil, TriggerRestoreContent content, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -343,8 +429,8 @@ public virtual ArmOperation TriggerRestore(WaitUntil waitUntil, TriggerRestoreCo scope.Start(); try { - var response = _restoresRestClient.Trigger(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new RecoveryServicesBackupArmOperation(_restoresClientDiagnostics, Pipeline, _restoresRestClient.CreateTriggerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _restoresRestClient.Trigger(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, xMsAuthorizationAuxiliary, cancellationToken); + var operation = new RecoveryServicesBackupArmOperation(_restoresClientDiagnostics, Pipeline, _restoresRestClient.CreateTriggerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, xMsAuthorizationAuxiliary).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -371,7 +457,7 @@ public virtual ArmOperation TriggerRestore(WaitUntil waitUntil, TriggerRestoreCo /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -411,7 +497,7 @@ public virtual async Task ProvisionItemLevelRecoveryConnectionAsync(Pr /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -450,7 +536,7 @@ public virtual Response ProvisionItemLevelRecoveryConnection(ProvisionIlrConnect /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -485,7 +571,7 @@ public virtual async Task RevokeItemLevelRecoveryConnectionAsync(Cance /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigCollection.cs index 1d86e90c648e..980144388fcd 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string vaultName, Canc /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -297,7 +297,7 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual Response Exists(string vaultName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.cs index 960b00ba8f18..fd11ca746d48 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(Ba /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual Response Update(BackupResourceConfi /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -313,7 +313,7 @@ public virtual async Task PrepareDataMoveAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -355,7 +355,7 @@ public virtual ArmOperation PrepareDataMove(WaitUntil waitUntil, PrepareDataMove /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -397,7 +397,7 @@ public virtual async Task TriggerDataMoveAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -439,7 +439,7 @@ public virtual ArmOperation TriggerDataMove(WaitUntil waitUntil, TriggerDataMove /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -501,7 +501,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -563,7 +563,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -620,7 +620,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -677,7 +677,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -737,7 +737,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedCollection.cs index 9a0ae3106b20..8da89c9b18de 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedCollection.cs @@ -63,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task CreateOrUpdateAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string vaultName /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -298,7 +298,7 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -341,7 +341,7 @@ public virtual Response Exists(string vaultName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.cs index e3baae89f447..9f0f24bdddfc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task UpdateAsync(WaitUntil waitUntil, BackupR /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, BackupResourceEncryption /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -341,7 +341,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response AddTag(s /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -517,7 +517,7 @@ public virtual Response SetTags( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -577,7 +577,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigCollection.cs index 7661cdbeb1fb..afb02d261448 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -73,10 +73,11 @@ 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. /// The name of the recovery services vault. /// resource config request. + /// The to use. /// 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, BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); Argument.AssertNotNull(data, nameof(data)); @@ -85,8 +86,8 @@ public virtual async Task> Creat scope.Start(); try { - var response = await _backupResourceVaultConfigRestClient.PutAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken).ConfigureAwait(false); - var uri = _backupResourceVaultConfigRestClient.CreatePutRequestUri(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data); + var response = await _backupResourceVaultConfigRestClient.PutAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); + var uri = _backupResourceVaultConfigRestClient.CreatePutRequestUri(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, xMsAuthorizationAuxiliary); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new RecoveryServicesBackupArmOperation(Response.FromValue(new BackupResourceVaultConfigResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) @@ -113,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -124,10 +125,11 @@ 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. /// The name of the recovery services vault. /// resource config request. + /// The to use. /// 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, BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); Argument.AssertNotNull(data, nameof(data)); @@ -136,8 +138,8 @@ public virtual ArmOperation CreateOrUpdate(Wa scope.Start(); try { - var response = _backupResourceVaultConfigRestClient.Put(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken); - var uri = _backupResourceVaultConfigRestClient.CreatePutRequestUri(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data); + var response = _backupResourceVaultConfigRestClient.Put(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, xMsAuthorizationAuxiliary, cancellationToken); + var uri = _backupResourceVaultConfigRestClient.CreatePutRequestUri(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, xMsAuthorizationAuxiliary); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); var operation = new RecoveryServicesBackupArmOperation(Response.FromValue(new BackupResourceVaultConfigResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) @@ -164,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -209,7 +211,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -254,7 +256,7 @@ public virtual Response Get(string vaultName, /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -297,7 +299,7 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -340,7 +342,7 @@ public virtual Response Exists(string vaultName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -385,7 +387,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.cs index 6bbc33d5f088..15148ba11ea0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -191,9 +191,10 @@ public virtual Response Get(CancellationToken /// /// /// resource config request. + /// The to use. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -201,7 +202,7 @@ public virtual async Task> UpdateAsy scope.Start(); try { - var response = await _backupResourceVaultConfigRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var response = await _backupResourceVaultConfigRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); return Response.FromValue(new BackupResourceVaultConfigResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -224,7 +225,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -233,9 +234,10 @@ public virtual async Task> UpdateAsy /// /// /// resource config request. + /// The to use. /// The cancellation token to use. /// is null. - public virtual Response Update(BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public virtual Response Update(BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); @@ -243,7 +245,7 @@ public virtual Response Update(BackupResource scope.Start(); try { - var response = _backupResourceVaultConfigRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var response = _backupResourceVaultConfigRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, xMsAuthorizationAuxiliary, cancellationToken); return Response.FromValue(new BackupResourceVaultConfigResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -266,7 +268,7 @@ public virtual Response Update(BackupResource /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -328,7 +330,7 @@ public virtual async Task> AddTagAsy /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -390,7 +392,7 @@ public virtual Response AddTag(string key, st /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -447,7 +449,7 @@ public virtual async Task> SetTagsAs /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -504,7 +506,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -564,7 +566,7 @@ public virtual async Task> RemoveTag /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupResourceGroupResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupResourceGroupResource.cs index 3d43681ba3ff..94c5ea52674b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupResourceGroupResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupResourceGroupResource.cs @@ -106,7 +106,7 @@ public virtual BackupResourceConfigCollection GetBackupResourceConfigs() /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -137,7 +137,7 @@ public virtual async Task> GetBackupResou /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -176,7 +176,7 @@ public virtual BackupProtectionIntentCollection GetBackupProtectionIntents() /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetBackupPro /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual BackupResourceVaultConfigCollection GetBackupResourceVaultConfigs /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetBackup /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual BackupResourceEncryptionConfigExtendedCollection GetBackupResourc /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -388,7 +388,7 @@ public virtual BackupPrivateEndpointConnectionCollection GetBackupPrivateEndpoin /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -463,7 +463,7 @@ public virtual BackupProtectionPolicyCollection GetBackupProtectionPolicies(stri /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -496,7 +496,7 @@ public virtual async Task> GetBackupPro /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -538,7 +538,7 @@ public virtual BackupJobCollection GetBackupJobs(string vaultName) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -570,7 +570,7 @@ public virtual async Task> GetBackupJobAsync(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -612,7 +612,7 @@ public virtual BackupEngineCollection GetBackupEngines(string vaultName) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -646,7 +646,7 @@ public virtual async Task> GetBackupEngineAsync(s /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -687,7 +687,7 @@ public virtual BackupProtectionContainerCollection GetBackupProtectionContainers /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> GetBackup /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -763,7 +763,7 @@ public virtual ResourceGuardProxyCollection GetResourceGuardProxies(string vault /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -795,7 +795,7 @@ public virtual async Task> GetResourceGuard /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -827,7 +827,7 @@ public virtual Response GetResourceGuardProxy(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -860,7 +860,7 @@ public virtual AsyncPageable GetBackupProtection /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -893,7 +893,7 @@ public virtual Pageable GetBackupProtectionInten /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -925,7 +925,7 @@ public virtual AsyncPageable GetBackupUsageSummariesAsync /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -957,7 +957,7 @@ public virtual Pageable GetBackupUsageSummaries(string va /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -997,7 +997,7 @@ public virtual async Task ExportJobAsync(string vaultName, string filt /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1037,7 +1037,7 @@ public virtual Response ExportJob(string vaultName, string filter = null, Cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1070,7 +1070,7 @@ public virtual AsyncPageable GetBackupProtectedItem /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1103,7 +1103,7 @@ public virtual Pageable GetBackupProtectedItems(str /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1137,7 +1137,7 @@ public virtual AsyncPageable GetProtectableContain /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1172,7 +1172,7 @@ public virtual Pageable GetProtectableContainers(s /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1219,7 +1219,7 @@ public virtual async Task RefreshProtectionContainerAsync(string vault /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1266,7 +1266,7 @@ public virtual Response RefreshProtectionContainer(string vaultName, string fabr /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1300,7 +1300,7 @@ public virtual AsyncPageable GetBackupProtectab /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1333,7 +1333,7 @@ public virtual Pageable GetBackupProtectableIte /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1365,7 +1365,7 @@ public virtual AsyncPageable GetBackupProtect /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1397,7 +1397,7 @@ public virtual Pageable GetBackupProtectionCo /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1429,7 +1429,7 @@ public virtual AsyncPageable GetSoftDeletedPr /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1461,16 +1461,17 @@ public virtual Pageable GetSoftDeletedProtect /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// /// The name of the recovery services vault. /// security pin request. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetSecurityPinAsync(string vaultName, SecurityPinContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> GetSecurityPinAsync(string vaultName, SecurityPinContent content = null, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); @@ -1478,7 +1479,7 @@ public virtual async Task> GetSecurityPinAsync(string scope.Start(); try { - var response = await SecurityPINsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, content, cancellationToken).ConfigureAwait(false); + var response = await SecurityPINsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, content, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -1501,16 +1502,17 @@ public virtual async Task> GetSecurityPinAsync(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// /// The name of the recovery services vault. /// security pin request. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response GetSecurityPin(string vaultName, SecurityPinContent content = null, CancellationToken cancellationToken = default) + public virtual Response GetSecurityPin(string vaultName, SecurityPinContent content = null, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); @@ -1518,7 +1520,7 @@ public virtual Response GetSecurityPin(string vaultName, Secur scope.Start(); try { - var response = SecurityPINsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, content, cancellationToken); + var response = SecurityPINsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, content, xMsAuthorizationAuxiliary, cancellationToken); return response; } catch (Exception e) @@ -1542,7 +1544,7 @@ public virtual Response GetSecurityPin(string vaultName, Secur /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1588,7 +1590,7 @@ public virtual async Task> PostFetchTieringCostAsy /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1633,7 +1635,7 @@ public virtual ArmOperation PostFetchTieringCost(WaitUntil wait /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1674,7 +1676,7 @@ public virtual async Task> GetGetTieringCostOperationR /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupSubscriptionResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupSubscriptionResource.cs index f48dbe4ad0f1..6e531cf0d7b5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupSubscriptionResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/MockableRecoveryServicesBackupSubscriptionResource.cs @@ -65,7 +65,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> ValidateProte /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response ValidateProtectionIntent( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -193,7 +193,7 @@ public virtual async Task> GetBackupStatusAsync(Azu /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -232,7 +232,7 @@ public virtual Response GetBackupStatus(AzureLocation locati /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -271,7 +271,7 @@ public virtual async Task> ValidateFeat /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/RecoveryServicesBackupExtensions.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/RecoveryServicesBackupExtensions.cs index 00a1fc1e1dc1..0ad0236b6da2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/RecoveryServicesBackupExtensions.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Extensions/RecoveryServicesBackupExtensions.cs @@ -291,7 +291,7 @@ public static BackupResourceConfigCollection GetBackupResourceConfigs(this Resou /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -329,7 +329,7 @@ public static async Task> GetBackupResour /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -385,7 +385,7 @@ public static BackupProtectionIntentCollection GetBackupProtectionIntents(this R /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -426,7 +426,7 @@ public static async Task> GetBackupProt /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -483,7 +483,7 @@ public static BackupResourceVaultConfigCollection GetBackupResourceVaultConfigs( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -521,7 +521,7 @@ public static async Task> GetBackupR /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -576,7 +576,7 @@ public static BackupResourceEncryptionConfigExtendedCollection GetBackupResource /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -614,7 +614,7 @@ public static async Task /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -669,7 +669,7 @@ public static BackupPrivateEndpointConnectionCollection GetBackupPrivateEndpoint /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -708,7 +708,7 @@ public static async Task> GetB /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -767,7 +767,7 @@ public static BackupProtectionPolicyCollection GetBackupProtectionPolicies(this /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -807,7 +807,7 @@ public static async Task> GetBackupProt /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -865,7 +865,7 @@ public static BackupJobCollection GetBackupJobs(this ResourceGroupResource resou /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -904,7 +904,7 @@ public static async Task> GetBackupJobAsync(this Res /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -962,7 +962,7 @@ public static BackupEngineCollection GetBackupEngines(this ResourceGroupResource /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1003,7 +1003,7 @@ public static async Task> GetBackupEngineAsync(th /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1061,7 +1061,7 @@ public static BackupProtectionContainerCollection GetBackupProtectionContainers( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1101,7 +1101,7 @@ public static async Task> GetBackupP /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1160,7 +1160,7 @@ public static ResourceGuardProxyCollection GetResourceGuardProxies(this Resource /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1199,7 +1199,7 @@ public static async Task> GetResourceGuardP /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1238,7 +1238,7 @@ public static Response GetResourceGuardProxy(this Re /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1274,7 +1274,7 @@ public static AsyncPageable GetBackupProtectionI /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1310,7 +1310,7 @@ public static Pageable GetBackupProtectionIntent /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1346,7 +1346,7 @@ public static AsyncPageable GetBackupUsageSummariesAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1382,7 +1382,7 @@ public static Pageable GetBackupUsageSummaries(this Resou /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1416,7 +1416,7 @@ public static async Task ExportJobAsync(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1450,7 +1450,7 @@ public static Response ExportJob(this ResourceGroupResource resourceGroupResourc /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1486,7 +1486,7 @@ public static AsyncPageable GetBackupProtectedItems /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1522,7 +1522,7 @@ public static Pageable GetBackupProtectedItems(this /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1558,7 +1558,7 @@ public static AsyncPageable GetProtectableContaine /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1595,7 +1595,7 @@ public static Pageable GetProtectableContainers(th /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1635,7 +1635,7 @@ public static async Task RefreshProtectionContainerAsync(this Resource /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -1675,7 +1675,7 @@ public static Response RefreshProtectionContainer(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1712,7 +1712,7 @@ public static AsyncPageable GetBackupProtectabl /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1748,7 +1748,7 @@ public static Pageable GetBackupProtectableItem /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1783,7 +1783,7 @@ public static AsyncPageable GetBackupProtecti /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1818,7 +1818,7 @@ public static Pageable GetBackupProtectionCon /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1853,7 +1853,7 @@ public static AsyncPageable GetSoftDeletedPro /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1888,25 +1888,26 @@ public static Pageable GetSoftDeletedProtecti /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The name of the recovery services vault. /// security pin request. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public static async Task> GetSecurityPinAsync(this ResourceGroupResource resourceGroupResource, string vaultName, SecurityPinContent content = null, CancellationToken cancellationToken = default) + public static async Task> GetSecurityPinAsync(this ResourceGroupResource resourceGroupResource, string vaultName, SecurityPinContent content = null, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableRecoveryServicesBackupResourceGroupResource(resourceGroupResource).GetSecurityPinAsync(vaultName, content, cancellationToken).ConfigureAwait(false); + return await GetMockableRecoveryServicesBackupResourceGroupResource(resourceGroupResource).GetSecurityPinAsync(vaultName, content, xMsAuthorizationAuxiliary, cancellationToken).ConfigureAwait(false); } /// @@ -1922,25 +1923,26 @@ public static async Task> GetSecurityPinAsync(this Re /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The name of the recovery services vault. /// security pin request. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public static Response GetSecurityPin(this ResourceGroupResource resourceGroupResource, string vaultName, SecurityPinContent content = null, CancellationToken cancellationToken = default) + public static Response GetSecurityPin(this ResourceGroupResource resourceGroupResource, string vaultName, SecurityPinContent content = null, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableRecoveryServicesBackupResourceGroupResource(resourceGroupResource).GetSecurityPin(vaultName, content, cancellationToken); + return GetMockableRecoveryServicesBackupResourceGroupResource(resourceGroupResource).GetSecurityPin(vaultName, content, xMsAuthorizationAuxiliary, cancellationToken); } /// @@ -1957,7 +1959,7 @@ public static Response GetSecurityPin(this ResourceGroupResour /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -1993,7 +1995,7 @@ public static async Task> PostFetchTieringCostAsyn /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -2028,7 +2030,7 @@ public static ArmOperation PostFetchTieringCost(this ResourceGr /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -2062,7 +2064,7 @@ public static async Task> GetGetTieringCostOperationRe /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -2099,7 +2101,7 @@ public static Response GetGetTieringCostOperationResult(this Re /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -2139,7 +2141,7 @@ public static async Task> ValidateProtec /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -2176,7 +2178,7 @@ public static Response ValidateProtectionIntent(t /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -2209,7 +2211,7 @@ public static async Task> GetBackupStatusAsync(this /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -2242,7 +2244,7 @@ public static Response GetBackupStatus(this SubscriptionReso /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// @@ -2275,7 +2277,7 @@ public static async Task> ValidateFeatu /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectableItem.Serialization.cs new file mode 100644 index 000000000000..b8a84f3c3ed7 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectableItem.Serialization.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureVmWorkloadAnyDatabaseProtectableItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectableItem)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureVmWorkloadAnyDatabaseProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectableItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureVmWorkloadAnyDatabaseProtectableItem(document.RootElement, options); + } + + internal static AzureVmWorkloadAnyDatabaseProtectableItem DeserializeAzureVmWorkloadAnyDatabaseProtectableItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string parentName = default; + string parentUniqueName = default; + string serverName = default; + bool? isAutoProtectable = default; + bool? isAutoProtected = default; + int? subinquireditemcount = default; + int? subprotectableitemcount = default; + PreBackupValidation prebackupvalidation = default; + bool? isProtectable = default; + string backupManagementType = default; + string workloadType = default; + string protectableItemType = default; + string friendlyName = default; + BackupProtectionStatus? protectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parentName"u8)) + { + parentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentUniqueName"u8)) + { + parentUniqueName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoProtected"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtected = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("subinquireditemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subinquireditemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subprotectableitemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subprotectableitemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("prebackupvalidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prebackupvalidation = PreBackupValidation.DeserializePreBackupValidation(property.Value, options); + continue; + } + if (property.NameEquals("isProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("backupManagementType"u8)) + { + backupManagementType = property.Value.GetString(); + continue; + } + if (property.NameEquals("workloadType"u8)) + { + workloadType = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectableItemType"u8)) + { + protectableItemType = property.Value.GetString(); + continue; + } + if (property.NameEquals("friendlyName"u8)) + { + friendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new BackupProtectionStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureVmWorkloadAnyDatabaseProtectableItem( + backupManagementType, + workloadType, + protectableItemType, + friendlyName, + protectionState, + serializedAdditionalRawData, + parentName, + parentUniqueName, + serverName, + isAutoProtectable, + isAutoProtected, + subinquireditemcount, + subprotectableitemcount, + prebackupvalidation, + isProtectable); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectableItem)} does not support writing '{options.Format}' format."); + } + } + + AzureVmWorkloadAnyDatabaseProtectableItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureVmWorkloadAnyDatabaseProtectableItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectableItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectableItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectableItem.cs new file mode 100644 index 000000000000..aa8f0ef0e53d --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectableItem.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Azure VM workload-specific protectable item representing AnyDatabase DB. + public partial class AzureVmWorkloadAnyDatabaseProtectableItem : VmWorkloadProtectableItem + { + /// Initializes a new instance of . + public AzureVmWorkloadAnyDatabaseProtectableItem() + { + ProtectableItemType = "AnyDatabase"; + } + + /// Initializes a new instance of . + /// Type of backup management to backup an item. + /// Type of workload for the backup management. + /// Type of the backup item. + /// Friendly name of the backup item. + /// State of the back up item. + /// Keeps track of any properties unknown to the library. + /// Name for instance or AG. + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + /// Host/Cluster Name for instance or AG. + /// Indicates if protectable item is auto-protectable. + /// Indicates if protectable item is auto-protected. + /// For instance or AG, indicates number of DB's present. + /// For instance or AG, indicates number of DB's to be protected. + /// Pre-backup validation for protectable objects. + /// Indicates if item is protectable. + internal AzureVmWorkloadAnyDatabaseProtectableItem(string backupManagementType, string workloadType, string protectableItemType, string friendlyName, BackupProtectionStatus? protectionState, IDictionary serializedAdditionalRawData, string parentName, string parentUniqueName, string serverName, bool? isAutoProtectable, bool? isAutoProtected, int? subInquiredItemCount, int? subProtectableItemCount, PreBackupValidation preBackupValidation, bool? isProtectable) : base(backupManagementType, workloadType, protectableItemType, friendlyName, protectionState, serializedAdditionalRawData, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subInquiredItemCount, subProtectableItemCount, preBackupValidation, isProtectable) + { + ProtectableItemType = protectableItemType ?? "AnyDatabase"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectedItem.Serialization.cs new file mode 100644 index 000000000000..96bd29a99a4e --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectedItem.Serialization.cs @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureVmWorkloadAnyDatabaseProtectedItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectedItem)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureVmWorkloadAnyDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectedItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureVmWorkloadAnyDatabaseProtectedItem(document.RootElement, options); + } + + internal static AzureVmWorkloadAnyDatabaseProtectedItem DeserializeAzureVmWorkloadAnyDatabaseProtectedItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string friendlyName = default; + string serverName = default; + string parentName = default; + string parentType = default; + string protectionStatus = default; + BackupProtectionState? protectionState = default; + LastBackupStatus? lastBackupStatus = default; + DateTimeOffset? lastBackupTime = default; + BackupErrorDetail lastBackupErrorDetail = default; + string protectedItemDataSourceId = default; + VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = default; + VmWorkloadProtectedItemExtendedInfo extendedInfo = default; + IDictionary kpisHealths = default; + IList nodesList = default; + string protectedItemType = default; + BackupManagementType? backupManagementType = default; + DataSourceTypeAutoGenerated3? workloadType = default; + string containerName = default; + ResourceIdentifier sourceResourceId = default; + ResourceIdentifier policyId = default; + DateTimeOffset? lastRecoveryPoint = default; + string backupSetName = default; + BackupCreateMode? createMode = default; + DateTimeOffset? deferredDeleteTimeInUTC = default; + bool? isScheduledForDeferredDelete = default; + string deferredDeleteTimeRemaining = default; + bool? isDeferredDeleteScheduleUpcoming = default; + bool? isRehydrate = default; + IList resourceGuardOperationRequests = default; + bool? isArchiveEnabled = default; + string policyName = default; + int? softDeleteRetentionPeriodInDays = default; + string vaultId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("friendlyName"u8)) + { + friendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentName"u8)) + { + parentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentType"u8)) + { + parentType = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionStatus"u8)) + { + protectionStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new BackupProtectionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastBackupStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBackupStatus = new LastBackupStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastBackupTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBackupTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastBackupErrorDetail"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBackupErrorDetail = BackupErrorDetail.DeserializeBackupErrorDetail(property.Value, options); + continue; + } + if (property.NameEquals("protectedItemDataSourceId"u8)) + { + protectedItemDataSourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectedItemHealthStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectedItemHealthStatus = new VmWorkloadProtectedItemHealthStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("extendedInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedInfo = VmWorkloadProtectedItemExtendedInfo.DeserializeVmWorkloadProtectedItemExtendedInfo(property.Value, options); + continue; + } + if (property.NameEquals("kpisHealths"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, KpiResourceHealthDetails.DeserializeKpiResourceHealthDetails(property0.Value, options)); + } + kpisHealths = dictionary; + continue; + } + if (property.NameEquals("nodesList"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DistributedNodesInfo.DeserializeDistributedNodesInfo(item, options)); + } + nodesList = array; + continue; + } + if (property.NameEquals("protectedItemType"u8)) + { + protectedItemType = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupManagementType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupManagementType = new BackupManagementType(property.Value.GetString()); + continue; + } + if (property.NameEquals("workloadType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); + continue; + } + if (property.NameEquals("containerName"u8)) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("policyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastRecoveryPoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRecoveryPoint = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("backupSetName"u8)) + { + backupSetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createMode = new BackupCreateMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("deferredDeleteTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deferredDeleteTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isScheduledForDeferredDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isScheduledForDeferredDelete = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("deferredDeleteTimeRemaining"u8)) + { + deferredDeleteTimeRemaining = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDeferredDeleteScheduleUpcoming"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDeferredDeleteScheduleUpcoming = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRehydrate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRehydrate = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (property.NameEquals("isArchiveEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchiveEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("policyName"u8)) + { + policyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("softDeleteRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softDeleteRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("vaultId"u8)) + { + vaultId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureVmWorkloadAnyDatabaseProtectedItem( + protectedItemType, + backupManagementType, + workloadType, + containerName, + sourceResourceId, + policyId, + lastRecoveryPoint, + backupSetName, + createMode, + deferredDeleteTimeInUTC, + isScheduledForDeferredDelete, + deferredDeleteTimeRemaining, + isDeferredDeleteScheduleUpcoming, + isRehydrate, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + isArchiveEnabled, + policyName, + softDeleteRetentionPeriodInDays, + vaultId, + serializedAdditionalRawData, + friendlyName, + serverName, + parentName, + parentType, + protectionStatus, + protectionState, + lastBackupStatus, + lastBackupTime, + lastBackupErrorDetail, + protectedItemDataSourceId, + protectedItemHealthStatus, + extendedInfo, + kpisHealths ?? new ChangeTrackingDictionary(), + nodesList ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectedItem)} does not support writing '{options.Format}' format."); + } + } + + AzureVmWorkloadAnyDatabaseProtectedItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureVmWorkloadAnyDatabaseProtectedItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseProtectedItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectedItem.cs new file mode 100644 index 000000000000..4ea9b5ffac44 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseProtectedItem.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Azure VM workload-specific protected item representing Any Database. + public partial class AzureVmWorkloadAnyDatabaseProtectedItem : VmWorkloadProtectedItem + { + /// Initializes a new instance of . + public AzureVmWorkloadAnyDatabaseProtectedItem() + { + ProtectedItemType = "AzureVmWorkloadAnyDatabase"; + } + + /// Initializes a new instance of . + /// backup item type. + /// Type of backup management for the backed up item. + /// Type of workload this item represents. + /// Unique name of container. + /// ARM ID of the resource to be backed up. + /// ID of the backup policy with which this item is backed up. + /// Timestamp when the last (latest) backup copy was created for this backup item. + /// Name of the backup set the backup item belongs to. + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// Time for deferred deletion in UTC. + /// Flag to identify whether the DS is scheduled for deferred delete. + /// Time remaining before the DS marked for deferred delete is permanently deleted. + /// Flag to identify whether the deferred deleted DS is to be purged soon. + /// Flag to identify that deferred deleted DS is to be moved into Pause state. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Flag to identify whether datasource is protected in archive. + /// Name of the policy used for protection. + /// Soft delete retention period in days. + /// ID of the vault which protects this item. + /// Keeps track of any properties unknown to the library. + /// Friendly name of the DB represented by this backup item. + /// Host/Cluster Name for instance or AG. + /// Parent name of the DB such as Instance or Availability Group. + /// Parent type of protected item, example: for a DB, standalone server or distributed. + /// Backup status of this backup item. + /// Backup state of this backup item. + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Timestamp of the last backup operation on this backup item. + /// Error details in last backup. + /// Data ID of the protected item. + /// Health status of the backup item, evaluated based on last heartbeat received. + /// Additional information for this backup item. + /// Health details of different KPIs. + /// List of the nodes in case of distributed container. + internal AzureVmWorkloadAnyDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) + { + ProtectedItemType = protectedItemType ?? "AzureVmWorkloadAnyDatabase"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseWorkloadItem.Serialization.cs new file mode 100644 index 000000000000..d1b733081baf --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseWorkloadItem.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureVmWorkloadAnyDatabaseWorkloadItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseWorkloadItem)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureVmWorkloadAnyDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseWorkloadItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureVmWorkloadAnyDatabaseWorkloadItem(document.RootElement, options); + } + + internal static AzureVmWorkloadAnyDatabaseWorkloadItem DeserializeAzureVmWorkloadAnyDatabaseWorkloadItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string parentName = default; + string serverName = default; + bool? isAutoProtectable = default; + int? subinquireditemcount = default; + int? subWorkloadItemCount = default; + string backupManagementType = default; + string workloadType = default; + string workloadItemType = default; + string friendlyName = default; + BackupProtectionStatus? protectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parentName"u8)) + { + parentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("subinquireditemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subinquireditemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subWorkloadItemCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subWorkloadItemCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("backupManagementType"u8)) + { + backupManagementType = property.Value.GetString(); + continue; + } + if (property.NameEquals("workloadType"u8)) + { + workloadType = property.Value.GetString(); + continue; + } + if (property.NameEquals("workloadItemType"u8)) + { + workloadItemType = property.Value.GetString(); + continue; + } + if (property.NameEquals("friendlyName"u8)) + { + friendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new BackupProtectionStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureVmWorkloadAnyDatabaseWorkloadItem( + backupManagementType, + workloadType, + workloadItemType, + friendlyName, + protectionState, + serializedAdditionalRawData, + parentName, + serverName, + isAutoProtectable, + subinquireditemcount, + subWorkloadItemCount); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseWorkloadItem)} does not support writing '{options.Format}' format."); + } + } + + AzureVmWorkloadAnyDatabaseWorkloadItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureVmWorkloadAnyDatabaseWorkloadItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadAnyDatabaseWorkloadItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseWorkloadItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseWorkloadItem.cs new file mode 100644 index 000000000000..272f2727dcec --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadAnyDatabaseWorkloadItem.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Azure VM workload-specific workload item representing Any Database. + public partial class AzureVmWorkloadAnyDatabaseWorkloadItem : VmWorkloadItem + { + /// Initializes a new instance of . + public AzureVmWorkloadAnyDatabaseWorkloadItem() + { + WorkloadItemType = "AnyDataBase"; + } + + /// Initializes a new instance of . + /// Type of backup management to backup an item. + /// Type of workload for the backup management. + /// Type of the backup item. + /// Friendly name of the backup item. + /// State of the back up item. + /// Keeps track of any properties unknown to the library. + /// Name for instance or AG. + /// Host/Cluster Name for instance or AG. + /// Indicates if workload item is auto-protectable. + /// For instance or AG, indicates number of DB's present. + /// For instance or AG, indicates number of DB's to be protected. + internal AzureVmWorkloadAnyDatabaseWorkloadItem(string backupManagementType, string workloadType, string workloadItemType, string friendlyName, BackupProtectionStatus? protectionState, IDictionary serializedAdditionalRawData, string parentName, string serverName, bool? isAutoProtectable, int? subInquiredItemCount, int? subWorkloadItemCount) : base(backupManagementType, workloadType, workloadItemType, friendlyName, protectionState, serializedAdditionalRawData, parentName, serverName, isAutoProtectable, subInquiredItemCount, subWorkloadItemCount) + { + WorkloadItemType = workloadItemType ?? "AnyDataBase"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectableItem.Serialization.cs new file mode 100644 index 000000000000..0bac80f79d69 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectableItem.Serialization.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureVmWorkloadOracleDatabaseProtectableItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectableItem)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureVmWorkloadOracleDatabaseProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectableItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureVmWorkloadOracleDatabaseProtectableItem(document.RootElement, options); + } + + internal static AzureVmWorkloadOracleDatabaseProtectableItem DeserializeAzureVmWorkloadOracleDatabaseProtectableItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string parentName = default; + string parentUniqueName = default; + string serverName = default; + bool? isAutoProtectable = default; + bool? isAutoProtected = default; + int? subinquireditemcount = default; + int? subprotectableitemcount = default; + PreBackupValidation prebackupvalidation = default; + bool? isProtectable = default; + string backupManagementType = default; + string workloadType = default; + string protectableItemType = default; + string friendlyName = default; + BackupProtectionStatus? protectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parentName"u8)) + { + parentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentUniqueName"u8)) + { + parentUniqueName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoProtected"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtected = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("subinquireditemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subinquireditemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subprotectableitemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subprotectableitemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("prebackupvalidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prebackupvalidation = PreBackupValidation.DeserializePreBackupValidation(property.Value, options); + continue; + } + if (property.NameEquals("isProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("backupManagementType"u8)) + { + backupManagementType = property.Value.GetString(); + continue; + } + if (property.NameEquals("workloadType"u8)) + { + workloadType = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectableItemType"u8)) + { + protectableItemType = property.Value.GetString(); + continue; + } + if (property.NameEquals("friendlyName"u8)) + { + friendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new BackupProtectionStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureVmWorkloadOracleDatabaseProtectableItem( + backupManagementType, + workloadType, + protectableItemType, + friendlyName, + protectionState, + serializedAdditionalRawData, + parentName, + parentUniqueName, + serverName, + isAutoProtectable, + isAutoProtected, + subinquireditemcount, + subprotectableitemcount, + prebackupvalidation, + isProtectable); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectableItem)} does not support writing '{options.Format}' format."); + } + } + + AzureVmWorkloadOracleDatabaseProtectableItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureVmWorkloadOracleDatabaseProtectableItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectableItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectableItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectableItem.cs new file mode 100644 index 000000000000..fb06c95b066c --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectableItem.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Azure VM workload-specific protectable item representing Oracle DB. + public partial class AzureVmWorkloadOracleDatabaseProtectableItem : VmWorkloadProtectableItem + { + /// Initializes a new instance of . + public AzureVmWorkloadOracleDatabaseProtectableItem() + { + ProtectableItemType = "OracleDatabase"; + } + + /// Initializes a new instance of . + /// Type of backup management to backup an item. + /// Type of workload for the backup management. + /// Type of the backup item. + /// Friendly name of the backup item. + /// State of the back up item. + /// Keeps track of any properties unknown to the library. + /// Name for instance or AG. + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + /// Host/Cluster Name for instance or AG. + /// Indicates if protectable item is auto-protectable. + /// Indicates if protectable item is auto-protected. + /// For instance or AG, indicates number of DB's present. + /// For instance or AG, indicates number of DB's to be protected. + /// Pre-backup validation for protectable objects. + /// Indicates if item is protectable. + internal AzureVmWorkloadOracleDatabaseProtectableItem(string backupManagementType, string workloadType, string protectableItemType, string friendlyName, BackupProtectionStatus? protectionState, IDictionary serializedAdditionalRawData, string parentName, string parentUniqueName, string serverName, bool? isAutoProtectable, bool? isAutoProtected, int? subInquiredItemCount, int? subProtectableItemCount, PreBackupValidation preBackupValidation, bool? isProtectable) : base(backupManagementType, workloadType, protectableItemType, friendlyName, protectionState, serializedAdditionalRawData, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subInquiredItemCount, subProtectableItemCount, preBackupValidation, isProtectable) + { + ProtectableItemType = protectableItemType ?? "OracleDatabase"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectedItem.Serialization.cs new file mode 100644 index 000000000000..ab85c060bf69 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectedItem.Serialization.cs @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureVmWorkloadOracleDatabaseProtectedItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectedItem)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureVmWorkloadOracleDatabaseProtectedItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectedItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureVmWorkloadOracleDatabaseProtectedItem(document.RootElement, options); + } + + internal static AzureVmWorkloadOracleDatabaseProtectedItem DeserializeAzureVmWorkloadOracleDatabaseProtectedItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string friendlyName = default; + string serverName = default; + string parentName = default; + string parentType = default; + string protectionStatus = default; + BackupProtectionState? protectionState = default; + LastBackupStatus? lastBackupStatus = default; + DateTimeOffset? lastBackupTime = default; + BackupErrorDetail lastBackupErrorDetail = default; + string protectedItemDataSourceId = default; + VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus = default; + VmWorkloadProtectedItemExtendedInfo extendedInfo = default; + IDictionary kpisHealths = default; + IList nodesList = default; + string protectedItemType = default; + BackupManagementType? backupManagementType = default; + DataSourceTypeAutoGenerated3? workloadType = default; + string containerName = default; + ResourceIdentifier sourceResourceId = default; + ResourceIdentifier policyId = default; + DateTimeOffset? lastRecoveryPoint = default; + string backupSetName = default; + BackupCreateMode? createMode = default; + DateTimeOffset? deferredDeleteTimeInUTC = default; + bool? isScheduledForDeferredDelete = default; + string deferredDeleteTimeRemaining = default; + bool? isDeferredDeleteScheduleUpcoming = default; + bool? isRehydrate = default; + IList resourceGuardOperationRequests = default; + bool? isArchiveEnabled = default; + string policyName = default; + int? softDeleteRetentionPeriodInDays = default; + string vaultId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("friendlyName"u8)) + { + friendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentName"u8)) + { + parentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentType"u8)) + { + parentType = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionStatus"u8)) + { + protectionStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new BackupProtectionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastBackupStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBackupStatus = new LastBackupStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastBackupTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBackupTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastBackupErrorDetail"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBackupErrorDetail = BackupErrorDetail.DeserializeBackupErrorDetail(property.Value, options); + continue; + } + if (property.NameEquals("protectedItemDataSourceId"u8)) + { + protectedItemDataSourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectedItemHealthStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectedItemHealthStatus = new VmWorkloadProtectedItemHealthStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("extendedInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedInfo = VmWorkloadProtectedItemExtendedInfo.DeserializeVmWorkloadProtectedItemExtendedInfo(property.Value, options); + continue; + } + if (property.NameEquals("kpisHealths"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, KpiResourceHealthDetails.DeserializeKpiResourceHealthDetails(property0.Value, options)); + } + kpisHealths = dictionary; + continue; + } + if (property.NameEquals("nodesList"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DistributedNodesInfo.DeserializeDistributedNodesInfo(item, options)); + } + nodesList = array; + continue; + } + if (property.NameEquals("protectedItemType"u8)) + { + protectedItemType = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupManagementType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupManagementType = new BackupManagementType(property.Value.GetString()); + continue; + } + if (property.NameEquals("workloadType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); + continue; + } + if (property.NameEquals("containerName"u8)) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("policyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastRecoveryPoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRecoveryPoint = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("backupSetName"u8)) + { + backupSetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createMode = new BackupCreateMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("deferredDeleteTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deferredDeleteTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isScheduledForDeferredDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isScheduledForDeferredDelete = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("deferredDeleteTimeRemaining"u8)) + { + deferredDeleteTimeRemaining = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDeferredDeleteScheduleUpcoming"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDeferredDeleteScheduleUpcoming = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRehydrate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRehydrate = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (property.NameEquals("isArchiveEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchiveEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("policyName"u8)) + { + policyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("softDeleteRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softDeleteRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("vaultId"u8)) + { + vaultId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureVmWorkloadOracleDatabaseProtectedItem( + protectedItemType, + backupManagementType, + workloadType, + containerName, + sourceResourceId, + policyId, + lastRecoveryPoint, + backupSetName, + createMode, + deferredDeleteTimeInUTC, + isScheduledForDeferredDelete, + deferredDeleteTimeRemaining, + isDeferredDeleteScheduleUpcoming, + isRehydrate, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + isArchiveEnabled, + policyName, + softDeleteRetentionPeriodInDays, + vaultId, + serializedAdditionalRawData, + friendlyName, + serverName, + parentName, + parentType, + protectionStatus, + protectionState, + lastBackupStatus, + lastBackupTime, + lastBackupErrorDetail, + protectedItemDataSourceId, + protectedItemHealthStatus, + extendedInfo, + kpisHealths ?? new ChangeTrackingDictionary(), + nodesList ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectedItem)} does not support writing '{options.Format}' format."); + } + } + + AzureVmWorkloadOracleDatabaseProtectedItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureVmWorkloadOracleDatabaseProtectedItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseProtectedItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectedItem.cs new file mode 100644 index 000000000000..02c28a81bcb0 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseProtectedItem.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Azure VM workload-specific protected item representing Oracle Database. + public partial class AzureVmWorkloadOracleDatabaseProtectedItem : VmWorkloadProtectedItem + { + /// Initializes a new instance of . + public AzureVmWorkloadOracleDatabaseProtectedItem() + { + ProtectedItemType = "AzureVmWorkloadOracleDatabase"; + } + + /// Initializes a new instance of . + /// backup item type. + /// Type of backup management for the backed up item. + /// Type of workload this item represents. + /// Unique name of container. + /// ARM ID of the resource to be backed up. + /// ID of the backup policy with which this item is backed up. + /// Timestamp when the last (latest) backup copy was created for this backup item. + /// Name of the backup set the backup item belongs to. + /// Create mode to indicate recovery of existing soft deleted data source or creation of new data source. + /// Time for deferred deletion in UTC. + /// Flag to identify whether the DS is scheduled for deferred delete. + /// Time remaining before the DS marked for deferred delete is permanently deleted. + /// Flag to identify whether the deferred deleted DS is to be purged soon. + /// Flag to identify that deferred deleted DS is to be moved into Pause state. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Flag to identify whether datasource is protected in archive. + /// Name of the policy used for protection. + /// Soft delete retention period in days. + /// ID of the vault which protects this item. + /// Keeps track of any properties unknown to the library. + /// Friendly name of the DB represented by this backup item. + /// Host/Cluster Name for instance or AG. + /// Parent name of the DB such as Instance or Availability Group. + /// Parent type of protected item, example: for a DB, standalone server or distributed. + /// Backup status of this backup item. + /// Backup state of this backup item. + /// Last backup operation status. Possible values: Healthy, Unhealthy. + /// Timestamp of the last backup operation on this backup item. + /// Error details in last backup. + /// Data ID of the protected item. + /// Health status of the backup item, evaluated based on last heartbeat received. + /// Additional information for this backup item. + /// Health details of different KPIs. + /// List of the nodes in case of distributed container. + internal AzureVmWorkloadOracleDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) + { + ProtectedItemType = protectedItemType ?? "AzureVmWorkloadOracleDatabase"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseWorkloadItem.Serialization.cs new file mode 100644 index 000000000000..80dd0546e4a6 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseWorkloadItem.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureVmWorkloadOracleDatabaseWorkloadItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseWorkloadItem)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureVmWorkloadOracleDatabaseWorkloadItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseWorkloadItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureVmWorkloadOracleDatabaseWorkloadItem(document.RootElement, options); + } + + internal static AzureVmWorkloadOracleDatabaseWorkloadItem DeserializeAzureVmWorkloadOracleDatabaseWorkloadItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string parentName = default; + string serverName = default; + bool? isAutoProtectable = default; + int? subinquireditemcount = default; + int? subWorkloadItemCount = default; + string backupManagementType = default; + string workloadType = default; + string workloadItemType = default; + string friendlyName = default; + BackupProtectionStatus? protectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parentName"u8)) + { + parentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("subinquireditemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subinquireditemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subWorkloadItemCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subWorkloadItemCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("backupManagementType"u8)) + { + backupManagementType = property.Value.GetString(); + continue; + } + if (property.NameEquals("workloadType"u8)) + { + workloadType = property.Value.GetString(); + continue; + } + if (property.NameEquals("workloadItemType"u8)) + { + workloadItemType = property.Value.GetString(); + continue; + } + if (property.NameEquals("friendlyName"u8)) + { + friendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new BackupProtectionStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureVmWorkloadOracleDatabaseWorkloadItem( + backupManagementType, + workloadType, + workloadItemType, + friendlyName, + protectionState, + serializedAdditionalRawData, + parentName, + serverName, + isAutoProtectable, + subinquireditemcount, + subWorkloadItemCount); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseWorkloadItem)} does not support writing '{options.Format}' format."); + } + } + + AzureVmWorkloadOracleDatabaseWorkloadItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureVmWorkloadOracleDatabaseWorkloadItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadOracleDatabaseWorkloadItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseWorkloadItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseWorkloadItem.cs new file mode 100644 index 000000000000..37b79ae18db0 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadOracleDatabaseWorkloadItem.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Azure VM workload-specific workload item representing Oracle Database. + public partial class AzureVmWorkloadOracleDatabaseWorkloadItem : VmWorkloadItem + { + /// Initializes a new instance of . + public AzureVmWorkloadOracleDatabaseWorkloadItem() + { + WorkloadItemType = "OracleDataBase"; + } + + /// Initializes a new instance of . + /// Type of backup management to backup an item. + /// Type of workload for the backup management. + /// Type of the backup item. + /// Friendly name of the backup item. + /// State of the back up item. + /// Keeps track of any properties unknown to the library. + /// Name for instance or AG. + /// Host/Cluster Name for instance or AG. + /// Indicates if workload item is auto-protectable. + /// For instance or AG, indicates number of DB's present. + /// For instance or AG, indicates number of DB's to be protected. + internal AzureVmWorkloadOracleDatabaseWorkloadItem(string backupManagementType, string workloadType, string workloadItemType, string friendlyName, BackupProtectionStatus? protectionState, IDictionary serializedAdditionalRawData, string parentName, string serverName, bool? isAutoProtectable, int? subInquiredItemCount, int? subWorkloadItemCount) : base(backupManagementType, workloadType, workloadItemType, friendlyName, protectionState, serializedAdditionalRawData, parentName, serverName, isAutoProtectable, subInquiredItemCount, subWorkloadItemCount) + { + WorkloadItemType = workloadItemType ?? "OracleDataBase"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadSapHanaScaleoutProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadSapHanaScaleoutProtectableItem.Serialization.cs new file mode 100644 index 000000000000..1d967c31ec88 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadSapHanaScaleoutProtectableItem.Serialization.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureVmWorkloadSapHanaScaleoutProtectableItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadSapHanaScaleoutProtectableItem)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureVmWorkloadSapHanaScaleoutProtectableItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureVmWorkloadSapHanaScaleoutProtectableItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureVmWorkloadSapHanaScaleoutProtectableItem(document.RootElement, options); + } + + internal static AzureVmWorkloadSapHanaScaleoutProtectableItem DeserializeAzureVmWorkloadSapHanaScaleoutProtectableItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string parentName = default; + string parentUniqueName = default; + string serverName = default; + bool? isAutoProtectable = default; + bool? isAutoProtected = default; + int? subinquireditemcount = default; + int? subprotectableitemcount = default; + PreBackupValidation prebackupvalidation = default; + bool? isProtectable = default; + string backupManagementType = default; + string workloadType = default; + string protectableItemType = default; + string friendlyName = default; + BackupProtectionStatus? protectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parentName"u8)) + { + parentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentUniqueName"u8)) + { + parentUniqueName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverName"u8)) + { + serverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoProtected"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoProtected = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("subinquireditemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subinquireditemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subprotectableitemcount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subprotectableitemcount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("prebackupvalidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prebackupvalidation = PreBackupValidation.DeserializePreBackupValidation(property.Value, options); + continue; + } + if (property.NameEquals("isProtectable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isProtectable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("backupManagementType"u8)) + { + backupManagementType = property.Value.GetString(); + continue; + } + if (property.NameEquals("workloadType"u8)) + { + workloadType = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectableItemType"u8)) + { + protectableItemType = property.Value.GetString(); + continue; + } + if (property.NameEquals("friendlyName"u8)) + { + friendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new BackupProtectionStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureVmWorkloadSapHanaScaleoutProtectableItem( + backupManagementType, + workloadType, + protectableItemType, + friendlyName, + protectionState, + serializedAdditionalRawData, + parentName, + parentUniqueName, + serverName, + isAutoProtectable, + isAutoProtected, + subinquireditemcount, + subprotectableitemcount, + prebackupvalidation, + isProtectable); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadSapHanaScaleoutProtectableItem)} does not support writing '{options.Format}' format."); + } + } + + AzureVmWorkloadSapHanaScaleoutProtectableItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureVmWorkloadSapHanaScaleoutProtectableItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureVmWorkloadSapHanaScaleoutProtectableItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadSapHanaScaleoutProtectableItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadSapHanaScaleoutProtectableItem.cs new file mode 100644 index 000000000000..968c1fe266dc --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureVmWorkloadSapHanaScaleoutProtectableItem.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Azure VM workload-specific protectable item representing HANA scale out. + public partial class AzureVmWorkloadSapHanaScaleoutProtectableItem : VmWorkloadProtectableItem + { + /// Initializes a new instance of . + public AzureVmWorkloadSapHanaScaleoutProtectableItem() + { + ProtectableItemType = "HanaScaleoutContainer"; + } + + /// Initializes a new instance of . + /// Type of backup management to backup an item. + /// Type of workload for the backup management. + /// Type of the backup item. + /// Friendly name of the backup item. + /// State of the back up item. + /// Keeps track of any properties unknown to the library. + /// Name for instance or AG. + /// + /// Parent Unique Name is added to provide the service formatted URI Name of the Parent + /// Only Applicable for data bases where the parent would be either Instance or a SQL AG. + /// + /// Host/Cluster Name for instance or AG. + /// Indicates if protectable item is auto-protectable. + /// Indicates if protectable item is auto-protected. + /// For instance or AG, indicates number of DB's present. + /// For instance or AG, indicates number of DB's to be protected. + /// Pre-backup validation for protectable objects. + /// Indicates if item is protectable. + internal AzureVmWorkloadSapHanaScaleoutProtectableItem(string backupManagementType, string workloadType, string protectableItemType, string friendlyName, BackupProtectionStatus? protectionState, IDictionary serializedAdditionalRawData, string parentName, string parentUniqueName, string serverName, bool? isAutoProtectable, bool? isAutoProtected, int? subInquiredItemCount, int? subProtectableItemCount, PreBackupValidation preBackupValidation, bool? isProtectable) : base(backupManagementType, workloadType, protectableItemType, friendlyName, protectionState, serializedAdditionalRawData, parentName, parentUniqueName, serverName, isAutoProtectable, isAutoProtected, subInquiredItemCount, subProtectableItemCount, preBackupValidation, isProtectable) + { + ProtectableItemType = protectableItemType ?? "HanaScaleoutContainer"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.Serialization.cs new file mode 100644 index 000000000000..04bba834fb2f --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadAnyDatabasePointInTimeRecoveryPoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRecoveryPoint)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadAnyDatabasePointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRecoveryPoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadAnyDatabasePointInTimeRecoveryPoint(document.RootElement, options); + } + + internal static AzureWorkloadAnyDatabasePointInTimeRecoveryPoint DeserializeAzureWorkloadAnyDatabasePointInTimeRecoveryPoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList timeRanges = default; + DateTimeOffset? recoveryPointTimeInUTC = default; + RestorePointType? type = default; + IList recoveryPointTierDetails = default; + IDictionary recoveryPointMoveReadinessInfo = default; + RecoveryPointProperties recoveryPointProperties = default; + string objectType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeRanges"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PointInTimeRange.DeserializePointInTimeRange(item, options)); + } + timeRanges = array; + continue; + } + if (property.NameEquals("recoveryPointTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RestorePointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("recoveryPointTierDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecoveryPointTierInformationV2.DeserializeRecoveryPointTierInformationV2(item, options)); + } + recoveryPointTierDetails = array; + continue; + } + if (property.NameEquals("recoveryPointMoveReadinessInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, Models.RecoveryPointMoveReadinessInfo.DeserializeRecoveryPointMoveReadinessInfo(property0.Value, options)); + } + recoveryPointMoveReadinessInfo = dictionary; + continue; + } + if (property.NameEquals("recoveryPointProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointProperties = RecoveryPointProperties.DeserializeRecoveryPointProperties(property.Value, options); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadAnyDatabasePointInTimeRecoveryPoint( + objectType, + serializedAdditionalRawData, + recoveryPointTimeInUTC, + type, + recoveryPointTierDetails ?? new ChangeTrackingList(), + recoveryPointMoveReadinessInfo ?? new ChangeTrackingDictionary(), + recoveryPointProperties, + timeRanges ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRecoveryPoint)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadAnyDatabasePointInTimeRecoveryPoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadAnyDatabasePointInTimeRecoveryPoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRecoveryPoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.cs new file mode 100644 index 000000000000..c78947bb2ef9 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Recovery point specific to PointInTime for generic any database. + public partial class AzureWorkloadAnyDatabasePointInTimeRecoveryPoint : WorkloadPointInTimeRecoveryPoint + { + /// Initializes a new instance of . + public AzureWorkloadAnyDatabasePointInTimeRecoveryPoint() + { + ObjectType = "AzureWorkloadAnyDatabasePointInTimeRecoveryPoint"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// Keeps track of any properties unknown to the library. + /// UTC time at which recovery point was created. + /// Type of restore point. + /// Recovery point tier information. + /// Eligibility of RP to be moved to another tier. + /// Properties of Recovery Point. + /// List of log ranges. + internal AzureWorkloadAnyDatabasePointInTimeRecoveryPoint(string objectType, IDictionary serializedAdditionalRawData, DateTimeOffset? recoveryPointCreatedOn, RestorePointType? restorePointType, IList recoveryPointTierDetails, IDictionary recoveryPointMoveReadinessInfo, RecoveryPointProperties recoveryPointProperties, IList timeRanges) : base(objectType, serializedAdditionalRawData, recoveryPointCreatedOn, restorePointType, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties, timeRanges) + { + ObjectType = objectType ?? "AzureWorkloadAnyDatabasePointInTimeRecoveryPoint"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreRequest.Serialization.cs new file mode 100644 index 000000000000..413eb1556cb7 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreRequest.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadAnyDatabasePointInTimeRestoreRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(PointInTime)) + { + writer.WritePropertyName("pointInTime"u8); + writer.WriteStringValue(PointInTime.Value, "O"); + } + } + + AzureWorkloadAnyDatabasePointInTimeRestoreRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreRequest(document.RootElement, options); + } + + internal static AzureWorkloadAnyDatabasePointInTimeRestoreRequest DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("objectType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(element, options); + } + } + DateTimeOffset? pointInTime = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = "AzureWorkloadAnyDatabasePointInTimeRestoreRequest"; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pointInTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pointInTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadAnyDatabasePointInTimeRestoreRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + pointInTime); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadAnyDatabasePointInTimeRestoreRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreRequest.cs new file mode 100644 index 000000000000..b839d23dcabc --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreRequest.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// + /// AzureWorkload AnyDatabase -specific restore. Specifically for PointInTime/Log restore + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public partial class AzureWorkloadAnyDatabasePointInTimeRestoreRequest : AzureWorkloadAnyDatabaseRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadAnyDatabasePointInTimeRestoreRequest() + { + ObjectType = "AzureWorkloadAnyDatabasePointInTimeRestoreRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// PointInTime value. + internal AzureWorkloadAnyDatabasePointInTimeRestoreRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + PointInTime = pointInTime; + ObjectType = objectType ?? "AzureWorkloadAnyDatabasePointInTimeRestoreRequest"; + } + + /// PointInTime value. + public DateTimeOffset? PointInTime { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.Serialization.cs new file mode 100644 index 000000000000..3331ddb85e09 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RecoveryPointRehydrationInfo)) + { + writer.WritePropertyName("recoveryPointRehydrationInfo"u8); + writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); + } + } + + AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(document.RootElement, options); + } + + internal static AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default; + DateTimeOffset? pointInTime = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = default; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointRehydrationInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointRehydrationInfo = RecoveryPointRehydrationInfo.DeserializeRecoveryPointRehydrationInfo(property.Value, options); + continue; + } + if (property.NameEquals("pointInTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pointInTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + pointInTime, + recoveryPointRehydrationInfo); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..9624c253d3d6 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// AzureWorkload AnyDatabase-specific restore with integrated rehydration of recovery point. + public partial class AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest : AzureWorkloadAnyDatabasePointInTimeRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest() + { + ObjectType = "AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// PointInTime value. + /// RP Rehydration Info. + internal AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, pointInTime) + { + RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + ObjectType = objectType ?? "AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest"; + } + + /// RP Rehydration Info. + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRecoveryPoint.Serialization.cs new file mode 100644 index 000000000000..f9318c897691 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRecoveryPoint.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadAnyDatabaseRecoveryPoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRecoveryPoint)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadAnyDatabaseRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRecoveryPoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadAnyDatabaseRecoveryPoint(document.RootElement, options); + } + + internal static AzureWorkloadAnyDatabaseRecoveryPoint DeserializeAzureWorkloadAnyDatabaseRecoveryPoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? recoveryPointTimeInUTC = default; + RestorePointType? type = default; + IList recoveryPointTierDetails = default; + IDictionary recoveryPointMoveReadinessInfo = default; + RecoveryPointProperties recoveryPointProperties = default; + string objectType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RestorePointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("recoveryPointTierDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecoveryPointTierInformationV2.DeserializeRecoveryPointTierInformationV2(item, options)); + } + recoveryPointTierDetails = array; + continue; + } + if (property.NameEquals("recoveryPointMoveReadinessInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, Models.RecoveryPointMoveReadinessInfo.DeserializeRecoveryPointMoveReadinessInfo(property0.Value, options)); + } + recoveryPointMoveReadinessInfo = dictionary; + continue; + } + if (property.NameEquals("recoveryPointProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointProperties = RecoveryPointProperties.DeserializeRecoveryPointProperties(property.Value, options); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadAnyDatabaseRecoveryPoint( + objectType, + serializedAdditionalRawData, + recoveryPointTimeInUTC, + type, + recoveryPointTierDetails ?? new ChangeTrackingList(), + recoveryPointMoveReadinessInfo ?? new ChangeTrackingDictionary(), + recoveryPointProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRecoveryPoint)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadAnyDatabaseRecoveryPoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadAnyDatabaseRecoveryPoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRecoveryPoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRecoveryPoint.cs new file mode 100644 index 000000000000..80dbd00c7e2e --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRecoveryPoint.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Generic any database specific recoverypoint, specifically encapsulates full/diff recoverypoints. + public partial class AzureWorkloadAnyDatabaseRecoveryPoint : WorkloadRecoveryPoint + { + /// Initializes a new instance of . + public AzureWorkloadAnyDatabaseRecoveryPoint() + { + ObjectType = "AzureWorkloadAnyDatabaseRecoveryPoint"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// Keeps track of any properties unknown to the library. + /// UTC time at which recovery point was created. + /// Type of restore point. + /// Recovery point tier information. + /// Eligibility of RP to be moved to another tier. + /// Properties of Recovery Point. + internal AzureWorkloadAnyDatabaseRecoveryPoint(string objectType, IDictionary serializedAdditionalRawData, DateTimeOffset? recoveryPointCreatedOn, RestorePointType? restorePointType, IList recoveryPointTierDetails, IDictionary recoveryPointMoveReadinessInfo, RecoveryPointProperties recoveryPointProperties) : base(objectType, serializedAdditionalRawData, recoveryPointCreatedOn, restorePointType, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) + { + ObjectType = objectType ?? "AzureWorkloadAnyDatabaseRecoveryPoint"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreRequest.Serialization.cs new file mode 100644 index 000000000000..112d9fdee741 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreRequest.Serialization.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadAnyDatabaseRestoreRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadAnyDatabaseRestoreRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadAnyDatabaseRestoreRequest(document.RootElement, options); + } + + internal static AzureWorkloadAnyDatabaseRestoreRequest DeserializeAzureWorkloadAnyDatabaseRestoreRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("objectType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureWorkloadAnyDatabasePointInTimeRestoreRequest": return AzureWorkloadAnyDatabasePointInTimeRestoreRequest.DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreRequest(element, options); + case "AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest": return AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.DeserializeAzureWorkloadAnyDatabaseRestoreWithRehydrateRequest(element, options); + } + } + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = "AzureWorkloadAnyDatabaseRestoreRequest"; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadAnyDatabaseRestoreRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadAnyDatabaseRestoreRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadAnyDatabaseRestoreRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreRequest.cs new file mode 100644 index 000000000000..1c9345a77379 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// + /// AzureWorkload AnyDatabase-specific restore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public partial class AzureWorkloadAnyDatabaseRestoreRequest : WorkloadRestoreContent + { + /// Initializes a new instance of . + public AzureWorkloadAnyDatabaseRestoreRequest() + { + ObjectType = "AzureWorkloadAnyDatabaseRestoreRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + internal AzureWorkloadAnyDatabaseRestoreRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + ObjectType = objectType ?? "AzureWorkloadAnyDatabaseRestoreRequest"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.Serialization.cs new file mode 100644 index 000000000000..0e0f208a6b1d --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RecoveryPointRehydrationInfo)) + { + writer.WritePropertyName("recoveryPointRehydrationInfo"u8); + writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); + } + } + + AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadAnyDatabaseRestoreWithRehydrateRequest(document.RootElement, options); + } + + internal static AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest DeserializeAzureWorkloadAnyDatabaseRestoreWithRehydrateRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = default; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointRehydrationInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointRehydrationInfo = RecoveryPointRehydrationInfo.DeserializeRecoveryPointRehydrationInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + recoveryPointRehydrationInfo); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadAnyDatabaseRestoreWithRehydrateRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..81c281961534 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// AzureWorkload AnyDatabase-specific restore with integrated rehydration of recovery point. + public partial class AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest : AzureWorkloadAnyDatabaseRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest() + { + ObjectType = "AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// RP Rehydration Info. + internal AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + ObjectType = objectType ?? "AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest"; + } + + /// RP Rehydration Info. + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRecoveryPoint.Serialization.cs new file mode 100644 index 000000000000..c56067098b35 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRecoveryPoint.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadOraclePointInTimeRecoveryPoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRecoveryPoint)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadOraclePointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRecoveryPoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadOraclePointInTimeRecoveryPoint(document.RootElement, options); + } + + internal static AzureWorkloadOraclePointInTimeRecoveryPoint DeserializeAzureWorkloadOraclePointInTimeRecoveryPoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList timeRanges = default; + DateTimeOffset? recoveryPointTimeInUTC = default; + RestorePointType? type = default; + IList recoveryPointTierDetails = default; + IDictionary recoveryPointMoveReadinessInfo = default; + RecoveryPointProperties recoveryPointProperties = default; + string objectType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeRanges"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PointInTimeRange.DeserializePointInTimeRange(item, options)); + } + timeRanges = array; + continue; + } + if (property.NameEquals("recoveryPointTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RestorePointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("recoveryPointTierDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecoveryPointTierInformationV2.DeserializeRecoveryPointTierInformationV2(item, options)); + } + recoveryPointTierDetails = array; + continue; + } + if (property.NameEquals("recoveryPointMoveReadinessInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, Models.RecoveryPointMoveReadinessInfo.DeserializeRecoveryPointMoveReadinessInfo(property0.Value, options)); + } + recoveryPointMoveReadinessInfo = dictionary; + continue; + } + if (property.NameEquals("recoveryPointProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointProperties = RecoveryPointProperties.DeserializeRecoveryPointProperties(property.Value, options); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadOraclePointInTimeRecoveryPoint( + objectType, + serializedAdditionalRawData, + recoveryPointTimeInUTC, + type, + recoveryPointTierDetails ?? new ChangeTrackingList(), + recoveryPointMoveReadinessInfo ?? new ChangeTrackingDictionary(), + recoveryPointProperties, + timeRanges ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRecoveryPoint)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadOraclePointInTimeRecoveryPoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadOraclePointInTimeRecoveryPoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRecoveryPoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRecoveryPoint.cs new file mode 100644 index 000000000000..b589609c2781 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRecoveryPoint.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Recovery point specific to PointInTime for Oracle. + public partial class AzureWorkloadOraclePointInTimeRecoveryPoint : WorkloadPointInTimeRecoveryPoint + { + /// Initializes a new instance of . + public AzureWorkloadOraclePointInTimeRecoveryPoint() + { + ObjectType = "AzureWorkloadOraclePointInTimeRecoveryPoint"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// Keeps track of any properties unknown to the library. + /// UTC time at which recovery point was created. + /// Type of restore point. + /// Recovery point tier information. + /// Eligibility of RP to be moved to another tier. + /// Properties of Recovery Point. + /// List of log ranges. + internal AzureWorkloadOraclePointInTimeRecoveryPoint(string objectType, IDictionary serializedAdditionalRawData, DateTimeOffset? recoveryPointCreatedOn, RestorePointType? restorePointType, IList recoveryPointTierDetails, IDictionary recoveryPointMoveReadinessInfo, RecoveryPointProperties recoveryPointProperties, IList timeRanges) : base(objectType, serializedAdditionalRawData, recoveryPointCreatedOn, restorePointType, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties, timeRanges) + { + ObjectType = objectType ?? "AzureWorkloadOraclePointInTimeRecoveryPoint"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreRequest.Serialization.cs new file mode 100644 index 000000000000..efaae0b82936 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreRequest.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadOraclePointInTimeRestoreRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(PointInTime)) + { + writer.WritePropertyName("pointInTime"u8); + writer.WriteStringValue(PointInTime.Value, "O"); + } + } + + AzureWorkloadOraclePointInTimeRestoreRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadOraclePointInTimeRestoreRequest(document.RootElement, options); + } + + internal static AzureWorkloadOraclePointInTimeRestoreRequest DeserializeAzureWorkloadOraclePointInTimeRestoreRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("objectType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(element, options); + } + } + DateTimeOffset? pointInTime = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = "AzureWorkloadOraclePointInTimeRestoreRequest"; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pointInTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pointInTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadOraclePointInTimeRestoreRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + pointInTime); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadOraclePointInTimeRestoreRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadOraclePointInTimeRestoreRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreRequest.cs new file mode 100644 index 000000000000..92514bf7071c --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreRequest.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// + /// AzureWorkload Oracle -specific restore. Specifically for PointInTime/Log restore + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public partial class AzureWorkloadOraclePointInTimeRestoreRequest : AzureWorkloadOracleRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadOraclePointInTimeRestoreRequest() + { + ObjectType = "AzureWorkloadOraclePointInTimeRestoreRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// PointInTime value. + internal AzureWorkloadOraclePointInTimeRestoreRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + PointInTime = pointInTime; + ObjectType = objectType ?? "AzureWorkloadOraclePointInTimeRestoreRequest"; + } + + /// PointInTime value. + public DateTimeOffset? PointInTime { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.Serialization.cs new file mode 100644 index 000000000000..bb38bb04ab0b --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RecoveryPointRehydrationInfo)) + { + writer.WritePropertyName("recoveryPointRehydrationInfo"u8); + writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); + } + } + + AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(document.RootElement, options); + } + + internal static AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest DeserializeAzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default; + DateTimeOffset? pointInTime = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = default; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointRehydrationInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointRehydrationInfo = RecoveryPointRehydrationInfo.DeserializeRecoveryPointRehydrationInfo(property.Value, options); + continue; + } + if (property.NameEquals("pointInTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pointInTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + pointInTime, + recoveryPointRehydrationInfo); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..77fc2d605109 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// AzureWorkload Oracle-specific restore with integrated rehydration of recovery point. + public partial class AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest : AzureWorkloadOraclePointInTimeRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest() + { + ObjectType = "AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// PointInTime value. + /// RP Rehydration Info. + internal AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, pointInTime) + { + RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + ObjectType = objectType ?? "AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest"; + } + + /// RP Rehydration Info. + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRecoveryPoint.Serialization.cs new file mode 100644 index 000000000000..a99e5e6ee273 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRecoveryPoint.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadOracleRecoveryPoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOracleRecoveryPoint)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadOracleRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOracleRecoveryPoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadOracleRecoveryPoint(document.RootElement, options); + } + + internal static AzureWorkloadOracleRecoveryPoint DeserializeAzureWorkloadOracleRecoveryPoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? recoveryPointTimeInUTC = default; + RestorePointType? type = default; + IList recoveryPointTierDetails = default; + IDictionary recoveryPointMoveReadinessInfo = default; + RecoveryPointProperties recoveryPointProperties = default; + string objectType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RestorePointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("recoveryPointTierDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecoveryPointTierInformationV2.DeserializeRecoveryPointTierInformationV2(item, options)); + } + recoveryPointTierDetails = array; + continue; + } + if (property.NameEquals("recoveryPointMoveReadinessInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, Models.RecoveryPointMoveReadinessInfo.DeserializeRecoveryPointMoveReadinessInfo(property0.Value, options)); + } + recoveryPointMoveReadinessInfo = dictionary; + continue; + } + if (property.NameEquals("recoveryPointProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointProperties = RecoveryPointProperties.DeserializeRecoveryPointProperties(property.Value, options); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadOracleRecoveryPoint( + objectType, + serializedAdditionalRawData, + recoveryPointTimeInUTC, + type, + recoveryPointTierDetails ?? new ChangeTrackingList(), + recoveryPointMoveReadinessInfo ?? new ChangeTrackingDictionary(), + recoveryPointProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadOracleRecoveryPoint)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadOracleRecoveryPoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadOracleRecoveryPoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadOracleRecoveryPoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRecoveryPoint.cs new file mode 100644 index 000000000000..ab89316d3038 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRecoveryPoint.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Oracle specific recoverypoint, specifically encapsulates full/diff recoverypoints. + public partial class AzureWorkloadOracleRecoveryPoint : WorkloadRecoveryPoint + { + /// Initializes a new instance of . + public AzureWorkloadOracleRecoveryPoint() + { + ObjectType = "AzureWorkloadOracleRecoveryPoint"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// Keeps track of any properties unknown to the library. + /// UTC time at which recovery point was created. + /// Type of restore point. + /// Recovery point tier information. + /// Eligibility of RP to be moved to another tier. + /// Properties of Recovery Point. + internal AzureWorkloadOracleRecoveryPoint(string objectType, IDictionary serializedAdditionalRawData, DateTimeOffset? recoveryPointCreatedOn, RestorePointType? restorePointType, IList recoveryPointTierDetails, IDictionary recoveryPointMoveReadinessInfo, RecoveryPointProperties recoveryPointProperties) : base(objectType, serializedAdditionalRawData, recoveryPointCreatedOn, restorePointType, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) + { + ObjectType = objectType ?? "AzureWorkloadOracleRecoveryPoint"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreRequest.Serialization.cs new file mode 100644 index 000000000000..6fb77328a47d --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreRequest.Serialization.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadOracleRestoreRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadOracleRestoreRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadOracleRestoreRequest(document.RootElement, options); + } + + internal static AzureWorkloadOracleRestoreRequest DeserializeAzureWorkloadOracleRestoreRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("objectType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureWorkloadOraclePointInTimeRestoreRequest": return AzureWorkloadOraclePointInTimeRestoreRequest.DeserializeAzureWorkloadOraclePointInTimeRestoreRequest(element, options); + case "AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadOracleRestoreWithRehydrateRequest": return AzureWorkloadOracleRestoreWithRehydrateRequest.DeserializeAzureWorkloadOracleRestoreWithRehydrateRequest(element, options); + } + } + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = "AzureWorkloadOracleRestoreRequest"; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadOracleRestoreRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadOracleRestoreRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadOracleRestoreRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreRequest.cs new file mode 100644 index 000000000000..f53c95421e98 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// + /// AzureWorkload Oracle-specific restore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public partial class AzureWorkloadOracleRestoreRequest : WorkloadRestoreContent + { + /// Initializes a new instance of . + public AzureWorkloadOracleRestoreRequest() + { + ObjectType = "AzureWorkloadOracleRestoreRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + internal AzureWorkloadOracleRestoreRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + ObjectType = objectType ?? "AzureWorkloadOracleRestoreRequest"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreWithRehydrateRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreWithRehydrateRequest.Serialization.cs new file mode 100644 index 000000000000..6231de78925c --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreWithRehydrateRequest.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadOracleRestoreWithRehydrateRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreWithRehydrateRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RecoveryPointRehydrationInfo)) + { + writer.WritePropertyName("recoveryPointRehydrationInfo"u8); + writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); + } + } + + AzureWorkloadOracleRestoreWithRehydrateRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreWithRehydrateRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadOracleRestoreWithRehydrateRequest(document.RootElement, options); + } + + internal static AzureWorkloadOracleRestoreWithRehydrateRequest DeserializeAzureWorkloadOracleRestoreWithRehydrateRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = default; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointRehydrationInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointRehydrationInfo = RecoveryPointRehydrationInfo.DeserializeRecoveryPointRehydrationInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadOracleRestoreWithRehydrateRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + recoveryPointRehydrationInfo); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreWithRehydrateRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadOracleRestoreWithRehydrateRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadOracleRestoreWithRehydrateRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadOracleRestoreWithRehydrateRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreWithRehydrateRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..62ea8efdca44 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadOracleRestoreWithRehydrateRequest.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// AzureWorkload Oracle-specific restore with integrated rehydration of recovery point. + public partial class AzureWorkloadOracleRestoreWithRehydrateRequest : AzureWorkloadOracleRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadOracleRestoreWithRehydrateRequest() + { + ObjectType = "AzureWorkloadOracleRestoreWithRehydrateRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// RP Rehydration Info. + internal AzureWorkloadOracleRestoreWithRehydrateRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + ObjectType = objectType ?? "AzureWorkloadOracleRestoreWithRehydrateRequest"; + } + + /// RP Rehydration Info. + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRecoveryPoint.Serialization.cs new file mode 100644 index 000000000000..48b6950e07bb --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRecoveryPoint.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadSapAsePointInTimeRecoveryPoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRecoveryPoint)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadSapAsePointInTimeRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRecoveryPoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadSapAsePointInTimeRecoveryPoint(document.RootElement, options); + } + + internal static AzureWorkloadSapAsePointInTimeRecoveryPoint DeserializeAzureWorkloadSapAsePointInTimeRecoveryPoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList timeRanges = default; + DateTimeOffset? recoveryPointTimeInUTC = default; + RestorePointType? type = default; + IList recoveryPointTierDetails = default; + IDictionary recoveryPointMoveReadinessInfo = default; + RecoveryPointProperties recoveryPointProperties = default; + string objectType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeRanges"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PointInTimeRange.DeserializePointInTimeRange(item, options)); + } + timeRanges = array; + continue; + } + if (property.NameEquals("recoveryPointTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RestorePointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("recoveryPointTierDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecoveryPointTierInformationV2.DeserializeRecoveryPointTierInformationV2(item, options)); + } + recoveryPointTierDetails = array; + continue; + } + if (property.NameEquals("recoveryPointMoveReadinessInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, Models.RecoveryPointMoveReadinessInfo.DeserializeRecoveryPointMoveReadinessInfo(property0.Value, options)); + } + recoveryPointMoveReadinessInfo = dictionary; + continue; + } + if (property.NameEquals("recoveryPointProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointProperties = RecoveryPointProperties.DeserializeRecoveryPointProperties(property.Value, options); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadSapAsePointInTimeRecoveryPoint( + objectType, + serializedAdditionalRawData, + recoveryPointTimeInUTC, + type, + recoveryPointTierDetails ?? new ChangeTrackingList(), + recoveryPointMoveReadinessInfo ?? new ChangeTrackingDictionary(), + recoveryPointProperties, + timeRanges ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRecoveryPoint)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadSapAsePointInTimeRecoveryPoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadSapAsePointInTimeRecoveryPoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRecoveryPoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRecoveryPoint.cs new file mode 100644 index 000000000000..b71b6fe4ee03 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRecoveryPoint.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Recovery point specific to PointInTime in SAPAse. + public partial class AzureWorkloadSapAsePointInTimeRecoveryPoint : WorkloadPointInTimeRecoveryPoint + { + /// Initializes a new instance of . + public AzureWorkloadSapAsePointInTimeRecoveryPoint() + { + ObjectType = "AzureWorkloadSAPAsePointInTimeRecoveryPoint"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// Keeps track of any properties unknown to the library. + /// UTC time at which recovery point was created. + /// Type of restore point. + /// Recovery point tier information. + /// Eligibility of RP to be moved to another tier. + /// Properties of Recovery Point. + /// List of log ranges. + internal AzureWorkloadSapAsePointInTimeRecoveryPoint(string objectType, IDictionary serializedAdditionalRawData, DateTimeOffset? recoveryPointCreatedOn, RestorePointType? restorePointType, IList recoveryPointTierDetails, IDictionary recoveryPointMoveReadinessInfo, RecoveryPointProperties recoveryPointProperties, IList timeRanges) : base(objectType, serializedAdditionalRawData, recoveryPointCreatedOn, restorePointType, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties, timeRanges) + { + ObjectType = objectType ?? "AzureWorkloadSAPAsePointInTimeRecoveryPoint"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreRequest.Serialization.cs new file mode 100644 index 000000000000..c13ae710c5be --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreRequest.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadSapAsePointInTimeRestoreRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(PointInTime)) + { + writer.WritePropertyName("pointInTime"u8); + writer.WriteStringValue(PointInTime.Value, "O"); + } + } + + AzureWorkloadSapAsePointInTimeRestoreRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadSapAsePointInTimeRestoreRequest(document.RootElement, options); + } + + internal static AzureWorkloadSapAsePointInTimeRestoreRequest DeserializeAzureWorkloadSapAsePointInTimeRestoreRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("objectType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureWorkloadSAPAsePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(element, options); + } + } + DateTimeOffset? pointInTime = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = "AzureWorkloadSAPAsePointInTimeRestoreRequest"; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pointInTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pointInTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadSapAsePointInTimeRestoreRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + pointInTime); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadSapAsePointInTimeRestoreRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadSapAsePointInTimeRestoreRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreRequest.cs new file mode 100644 index 000000000000..dcb282af0ca4 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreRequest.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// + /// AzureWorkload SAP Ase -specific restore. Specifically for PointInTime/Log restore + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public partial class AzureWorkloadSapAsePointInTimeRestoreRequest : AzureWorkloadSapAseRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadSapAsePointInTimeRestoreRequest() + { + ObjectType = "AzureWorkloadSAPAsePointInTimeRestoreRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// PointInTime value. + internal AzureWorkloadSapAsePointInTimeRestoreRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + PointInTime = pointInTime; + ObjectType = objectType ?? "AzureWorkloadSAPAsePointInTimeRestoreRequest"; + } + + /// PointInTime value. + public DateTimeOffset? PointInTime { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.Serialization.cs new file mode 100644 index 000000000000..ed21eb7f6752 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RecoveryPointRehydrationInfo)) + { + writer.WritePropertyName("recoveryPointRehydrationInfo"u8); + writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); + } + } + + AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(document.RootElement, options); + } + + internal static AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest DeserializeAzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default; + DateTimeOffset? pointInTime = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = default; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointRehydrationInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointRehydrationInfo = RecoveryPointRehydrationInfo.DeserializeRecoveryPointRehydrationInfo(property.Value, options); + continue; + } + if (property.NameEquals("pointInTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pointInTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + pointInTime, + recoveryPointRehydrationInfo); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..cab87933fec3 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// AzureWorkload SAP Ase-specific restore with integrated rehydration of recovery point. + public partial class AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest : AzureWorkloadSapAsePointInTimeRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest() + { + ObjectType = "AzureWorkloadSAPAsePointInTimeRestoreWithRehydrateRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// PointInTime value. + /// RP Rehydration Info. + internal AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, pointInTime) + { + RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + ObjectType = objectType ?? "AzureWorkloadSAPAsePointInTimeRestoreWithRehydrateRequest"; + } + + /// RP Rehydration Info. + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRecoveryPoint.Serialization.cs new file mode 100644 index 000000000000..b9e85d16b8c9 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRecoveryPoint.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadSapAseRecoveryPoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRecoveryPoint)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadSapAseRecoveryPoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRecoveryPoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadSapAseRecoveryPoint(document.RootElement, options); + } + + internal static AzureWorkloadSapAseRecoveryPoint DeserializeAzureWorkloadSapAseRecoveryPoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? recoveryPointTimeInUTC = default; + RestorePointType? type = default; + IList recoveryPointTierDetails = default; + IDictionary recoveryPointMoveReadinessInfo = default; + RecoveryPointProperties recoveryPointProperties = default; + string objectType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointTimeInUTC"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTimeInUTC = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RestorePointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("recoveryPointTierDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecoveryPointTierInformationV2.DeserializeRecoveryPointTierInformationV2(item, options)); + } + recoveryPointTierDetails = array; + continue; + } + if (property.NameEquals("recoveryPointMoveReadinessInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, Models.RecoveryPointMoveReadinessInfo.DeserializeRecoveryPointMoveReadinessInfo(property0.Value, options)); + } + recoveryPointMoveReadinessInfo = dictionary; + continue; + } + if (property.NameEquals("recoveryPointProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointProperties = RecoveryPointProperties.DeserializeRecoveryPointProperties(property.Value, options); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadSapAseRecoveryPoint( + objectType, + serializedAdditionalRawData, + recoveryPointTimeInUTC, + type, + recoveryPointTierDetails ?? new ChangeTrackingList(), + recoveryPointMoveReadinessInfo ?? new ChangeTrackingDictionary(), + recoveryPointProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRecoveryPoint)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadSapAseRecoveryPoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadSapAseRecoveryPoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRecoveryPoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRecoveryPoint.cs new file mode 100644 index 000000000000..0e13aa8017aa --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRecoveryPoint.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// SAPAse specific recoverypoint, specifically encapsulates full/diff recoverypoints. + public partial class AzureWorkloadSapAseRecoveryPoint : WorkloadRecoveryPoint + { + /// Initializes a new instance of . + public AzureWorkloadSapAseRecoveryPoint() + { + ObjectType = "AzureWorkloadSAPAseRecoveryPoint"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// Keeps track of any properties unknown to the library. + /// UTC time at which recovery point was created. + /// Type of restore point. + /// Recovery point tier information. + /// Eligibility of RP to be moved to another tier. + /// Properties of Recovery Point. + internal AzureWorkloadSapAseRecoveryPoint(string objectType, IDictionary serializedAdditionalRawData, DateTimeOffset? recoveryPointCreatedOn, RestorePointType? restorePointType, IList recoveryPointTierDetails, IDictionary recoveryPointMoveReadinessInfo, RecoveryPointProperties recoveryPointProperties) : base(objectType, serializedAdditionalRawData, recoveryPointCreatedOn, restorePointType, recoveryPointTierDetails, recoveryPointMoveReadinessInfo, recoveryPointProperties) + { + ObjectType = objectType ?? "AzureWorkloadSAPAseRecoveryPoint"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreRequest.Serialization.cs new file mode 100644 index 000000000000..9a5cfde21a12 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreRequest.Serialization.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadSapAseRestoreRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AzureWorkloadSapAseRestoreRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadSapAseRestoreRequest(document.RootElement, options); + } + + internal static AzureWorkloadSapAseRestoreRequest DeserializeAzureWorkloadSapAseRestoreRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("objectType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureWorkloadSAPAsePointInTimeRestoreRequest": return AzureWorkloadSapAsePointInTimeRestoreRequest.DeserializeAzureWorkloadSapAsePointInTimeRestoreRequest(element, options); + case "AzureWorkloadSAPAsePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadSAPAseRestoreWithRehydrateRequest": return AzureWorkloadSapAseRestoreWithRehydrateRequest.DeserializeAzureWorkloadSapAseRestoreWithRehydrateRequest(element, options); + } + } + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = "AzureWorkloadSAPAseRestoreRequest"; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadSapAseRestoreRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadSapAseRestoreRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadSapAseRestoreRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreRequest.cs new file mode 100644 index 000000000000..9454f40bcbb4 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreRequest.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// + /// AzureWorkload SAP Ase-specific restore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public partial class AzureWorkloadSapAseRestoreRequest : WorkloadRestoreContent + { + /// Initializes a new instance of . + public AzureWorkloadSapAseRestoreRequest() + { + ObjectType = "AzureWorkloadSAPAseRestoreRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + internal AzureWorkloadSapAseRestoreRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + ObjectType = objectType ?? "AzureWorkloadSAPAseRestoreRequest"; + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreWithRehydrateRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreWithRehydrateRequest.Serialization.cs new file mode 100644 index 000000000000..3fd0ef7ddaf0 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreWithRehydrateRequest.Serialization.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class AzureWorkloadSapAseRestoreWithRehydrateRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreWithRehydrateRequest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(RecoveryPointRehydrationInfo)) + { + writer.WritePropertyName("recoveryPointRehydrationInfo"u8); + writer.WriteObjectValue(RecoveryPointRehydrationInfo, options); + } + } + + AzureWorkloadSapAseRestoreWithRehydrateRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreWithRehydrateRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureWorkloadSapAseRestoreWithRehydrateRequest(document.RootElement, options); + } + + internal static AzureWorkloadSapAseRestoreWithRehydrateRequest DeserializeAzureWorkloadSapAseRestoreWithRehydrateRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RecoveryPointRehydrationInfo recoveryPointRehydrationInfo = default; + FileShareRecoveryType? recoveryType = default; + ResourceIdentifier sourceResourceId = default; + IDictionary propertyBag = default; + TargetRestoreInfo targetInfo = default; + RecoveryMode? recoveryMode = default; + string targetResourceGroupName = default; + UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails = default; + SnapshotRestoreContent snapshotRestoreParameters = default; + ResourceIdentifier targetVirtualMachineId = default; + string objectType = default; + IList resourceGuardOperationRequests = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointRehydrationInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointRehydrationInfo = RecoveryPointRehydrationInfo.DeserializeRecoveryPointRehydrationInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryType = new FileShareRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("propertyBag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + propertyBag = dictionary; + continue; + } + if (property.NameEquals("targetInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetInfo = TargetRestoreInfo.DeserializeTargetRestoreInfo(property.Value, options); + continue; + } + if (property.NameEquals("recoveryMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryMode = new RecoveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupName"u8)) + { + targetResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedManagedIdentityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedManagedIdentityDetails = UserAssignedManagedIdentityDetails.DeserializeUserAssignedManagedIdentityDetails(property.Value, options); + continue; + } + if (property.NameEquals("snapshotRestoreParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotRestoreParameters = SnapshotRestoreContent.DeserializeSnapshotRestoreContent(property.Value, options); + continue; + } + if (property.NameEquals("targetVirtualMachineId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetVirtualMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("objectType"u8)) + { + objectType = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureWorkloadSapAseRestoreWithRehydrateRequest( + objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), + serializedAdditionalRawData, + recoveryType, + sourceResourceId, + propertyBag ?? new ChangeTrackingDictionary(), + targetInfo, + recoveryMode, + targetResourceGroupName, + userAssignedManagedIdentityDetails, + snapshotRestoreParameters, + targetVirtualMachineId, + recoveryPointRehydrationInfo); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreWithRehydrateRequest)} does not support writing '{options.Format}' format."); + } + } + + AzureWorkloadSapAseRestoreWithRehydrateRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureWorkloadSapAseRestoreWithRehydrateRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureWorkloadSapAseRestoreWithRehydrateRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreWithRehydrateRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreWithRehydrateRequest.cs new file mode 100644 index 000000000000..e8079088506d --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/AzureWorkloadSapAseRestoreWithRehydrateRequest.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// AzureWorkload SAP Ase-specific restore with integrated rehydration of recovery point. + public partial class AzureWorkloadSapAseRestoreWithRehydrateRequest : AzureWorkloadSapAseRestoreRequest + { + /// Initializes a new instance of . + public AzureWorkloadSapAseRestoreWithRehydrateRequest() + { + ObjectType = "AzureWorkloadSAPAseRestoreWithRehydrateRequest"; + } + + /// Initializes a new instance of . + /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. + /// Keeps track of any properties unknown to the library. + /// Type of this recovery. + /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. + /// Workload specific property bag. + /// Details of target database. + /// Defines whether the current recovery mode is file restore or database restore. + /// Defines the Resource group of the Target VM. + /// + /// User Assigned managed identity details + /// Currently used for snapshot. + /// + /// + /// Additional details for snapshot recovery + /// Currently used for snapshot for SAP Hana. + /// + /// + /// This is the complete ARM Id of the target VM + /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} + /// + /// RP Rehydration Info. + internal AzureWorkloadSapAseRestoreWithRehydrateRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + { + RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; + ObjectType = objectType ?? "AzureWorkloadSAPAseRestoreWithRehydrateRequest"; + } + + /// RP Rehydration Info. + public RecoveryPointRehydrationInfo RecoveryPointRehydrationInfo { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDataSourceType.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDataSourceType.cs deleted file mode 100644 index 94847d3e1707..000000000000 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupDataSourceType.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.RecoveryServicesBackup.Models -{ - /// Type of workload this item represents. - public readonly partial struct BackupDataSourceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BackupDataSourceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InvalidValue = "Invalid"; - private const string VmValue = "VM"; - private const string FileFolderValue = "FileFolder"; - private const string AzureSqlDBValue = "AzureSqlDb"; - private const string SqlDBValue = "SQLDB"; - private const string ExchangeValue = "Exchange"; - private const string SharepointValue = "Sharepoint"; - private const string VMwareVmValue = "VMwareVM"; - private const string SystemStateValue = "SystemState"; - private const string ClientValue = "Client"; - private const string GenericDataSourceValue = "GenericDataSource"; - private const string SqlDatabaseValue = "SQLDataBase"; - private const string AzureFileShareValue = "AzureFileShare"; - private const string SapHanaDatabaseValue = "SAPHanaDatabase"; - private const string SapAseDatabaseValue = "SAPAseDatabase"; - private const string SapHanaDBInstanceValue = "SAPHanaDBInstance"; - - /// Invalid. - public static BackupDataSourceType Invalid { get; } = new BackupDataSourceType(InvalidValue); - /// VM. - public static BackupDataSourceType Vm { get; } = new BackupDataSourceType(VmValue); - /// FileFolder. - public static BackupDataSourceType FileFolder { get; } = new BackupDataSourceType(FileFolderValue); - /// AzureSqlDb. - public static BackupDataSourceType AzureSqlDB { get; } = new BackupDataSourceType(AzureSqlDBValue); - /// SQLDB. - public static BackupDataSourceType SqlDB { get; } = new BackupDataSourceType(SqlDBValue); - /// Exchange. - public static BackupDataSourceType Exchange { get; } = new BackupDataSourceType(ExchangeValue); - /// Sharepoint. - public static BackupDataSourceType Sharepoint { get; } = new BackupDataSourceType(SharepointValue); - /// VMwareVM. - public static BackupDataSourceType VMwareVm { get; } = new BackupDataSourceType(VMwareVmValue); - /// SystemState. - public static BackupDataSourceType SystemState { get; } = new BackupDataSourceType(SystemStateValue); - /// Client. - public static BackupDataSourceType Client { get; } = new BackupDataSourceType(ClientValue); - /// GenericDataSource. - public static BackupDataSourceType GenericDataSource { get; } = new BackupDataSourceType(GenericDataSourceValue); - /// SQLDataBase. - public static BackupDataSourceType SqlDatabase { get; } = new BackupDataSourceType(SqlDatabaseValue); - /// AzureFileShare. - public static BackupDataSourceType AzureFileShare { get; } = new BackupDataSourceType(AzureFileShareValue); - /// SAPHanaDatabase. - public static BackupDataSourceType SapHanaDatabase { get; } = new BackupDataSourceType(SapHanaDatabaseValue); - /// SAPAseDatabase. - public static BackupDataSourceType SapAseDatabase { get; } = new BackupDataSourceType(SapAseDatabaseValue); - /// SAPHanaDBInstance. - public static BackupDataSourceType SapHanaDBInstance { get; } = new BackupDataSourceType(SapHanaDBInstanceValue); - /// Determines if two values are the same. - public static bool operator ==(BackupDataSourceType left, BackupDataSourceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BackupDataSourceType left, BackupDataSourceType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator BackupDataSourceType(string value) => new BackupDataSourceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BackupDataSourceType other && Equals(other); - /// - public bool Equals(BackupDataSourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs index 33c18bb7a058..3f02ca160315 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.Serialization.cs @@ -174,6 +174,8 @@ internal static BackupGenericProtectedItem DeserializeBackupGenericProtectedItem { case "AzureFileShareProtectedItem": return FileshareProtectedItem.DeserializeFileshareProtectedItem(element, options); case "AzureIaaSVMProtectedItem": return IaasVmProtectedItem.DeserializeIaasVmProtectedItem(element, options); + case "AzureVmWorkloadAnyDatabase": return AzureVmWorkloadAnyDatabaseProtectedItem.DeserializeAzureVmWorkloadAnyDatabaseProtectedItem(element, options); + case "AzureVmWorkloadOracleDatabase": return AzureVmWorkloadOracleDatabaseProtectedItem.DeserializeAzureVmWorkloadOracleDatabaseProtectedItem(element, options); case "AzureVmWorkloadProtectedItem": return VmWorkloadProtectedItem.DeserializeVmWorkloadProtectedItem(element, options); case "AzureVmWorkloadSAPAseDatabase": return VmWorkloadSapAseDatabaseProtectedItem.DeserializeVmWorkloadSapAseDatabaseProtectedItem(element, options); case "AzureVmWorkloadSAPHanaDatabase": return VmWorkloadSapHanaDatabaseProtectedItem.DeserializeVmWorkloadSapHanaDatabaseProtectedItem(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.cs index 01944609f343..05c90d62c43f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericProtectedItem.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Base class for backup items. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// public abstract partial class BackupGenericProtectedItem { @@ -77,7 +77,7 @@ protected BackupGenericProtectedItem() /// Soft delete retention period in days. /// ID of the vault which protects this item. /// Keeps track of any properties unknown to the library. - internal BackupGenericProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData) + internal BackupGenericProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData) { ProtectedItemType = protectedItemType; BackupManagementType = backupManagementType; @@ -106,7 +106,7 @@ internal BackupGenericProtectedItem(string protectedItemType, BackupManagementTy /// Type of backup management for the backed up item. public BackupManagementType? BackupManagementType { get; } /// Type of workload this item represents. - public BackupDataSourceType? WorkloadType { get; } + public DataSourceTypeAutoGenerated3? WorkloadType { get; } /// Unique name of container. public string ContainerName { get; set; } /// ARM ID of the resource to be backed up. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs index a114b5f658f6..d1cb8afecc65 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.Serialization.cs @@ -78,8 +78,14 @@ internal static BackupGenericRecoveryPoint DeserializeBackupGenericRecoveryPoint switch (discriminator.GetString()) { case "AzureFileShareRecoveryPoint": return FileShareRecoveryPoint.DeserializeFileShareRecoveryPoint(element, options); + case "AzureWorkloadAnyDatabasePointInTimeRecoveryPoint": return AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.DeserializeAzureWorkloadAnyDatabasePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadAnyDatabaseRecoveryPoint": return AzureWorkloadAnyDatabaseRecoveryPoint.DeserializeAzureWorkloadAnyDatabaseRecoveryPoint(element, options); + case "AzureWorkloadOraclePointInTimeRecoveryPoint": return AzureWorkloadOraclePointInTimeRecoveryPoint.DeserializeAzureWorkloadOraclePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadOracleRecoveryPoint": return AzureWorkloadOracleRecoveryPoint.DeserializeAzureWorkloadOracleRecoveryPoint(element, options); case "AzureWorkloadPointInTimeRecoveryPoint": return WorkloadPointInTimeRecoveryPoint.DeserializeWorkloadPointInTimeRecoveryPoint(element, options); case "AzureWorkloadRecoveryPoint": return WorkloadRecoveryPoint.DeserializeWorkloadRecoveryPoint(element, options); + case "AzureWorkloadSAPAsePointInTimeRecoveryPoint": return AzureWorkloadSapAsePointInTimeRecoveryPoint.DeserializeAzureWorkloadSapAsePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadSAPAseRecoveryPoint": return AzureWorkloadSapAseRecoveryPoint.DeserializeAzureWorkloadSapAseRecoveryPoint(element, options); case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": return WorkloadSapHanaPointInTimeRecoveryPoint.DeserializeWorkloadSapHanaPointInTimeRecoveryPoint(element, options); case "AzureWorkloadSAPHanaRecoveryPoint": return WorkloadSapHanaRecoveryPoint.DeserializeWorkloadSapHanaRecoveryPoint(element, options); case "AzureWorkloadSQLPointInTimeRecoveryPoint": return WorkloadSqlPointInTimeRecoveryPoint.DeserializeWorkloadSqlPointInTimeRecoveryPoint(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.cs index 6c863371f893..249ef47eebd5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupGenericRecoveryPoint.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Base class for backup copies. Workload-specific backup copies are derived from this class. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , and . /// public abstract partial class BackupGenericRecoveryPoint { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRecoveryPointPatch.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRecoveryPointPatch.Serialization.cs new file mode 100644 index 000000000000..fb45e582606a --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRecoveryPointPatch.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + public partial class BackupRecoveryPointPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BackupRecoveryPointPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BackupRecoveryPointPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BackupRecoveryPointPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBackupRecoveryPointPatch(document.RootElement, options); + } + + internal static BackupRecoveryPointPatch DeserializeBackupRecoveryPointPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PatchRecoveryPointInput properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = PatchRecoveryPointInput.DeserializePatchRecoveryPointInput(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BackupRecoveryPointPatch(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BackupRecoveryPointPatch)} does not support writing '{options.Format}' format."); + } + } + + BackupRecoveryPointPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBackupRecoveryPointPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BackupRecoveryPointPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRecoveryPointPatch.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRecoveryPointPatch.cs new file mode 100644 index 000000000000..4936e4d7f377 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupRecoveryPointPatch.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Patch Request content to update recovery point for given RecoveryPointId. + public partial class BackupRecoveryPointPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BackupRecoveryPointPatch() + { + } + + /// Initializes a new instance of . + /// Resource properties. + /// Keeps track of any properties unknown to the library. + internal BackupRecoveryPointPatch(PatchRecoveryPointInput properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource properties. + internal PatchRecoveryPointInput Properties { get; set; } + /// Expiry time of Recovery Point in UTC. + public DateTimeOffset? RecoveryPointExpiryOn + { + get => Properties is null ? default : Properties.RecoveryPointExpiryOn; + set + { + if (Properties is null) + Properties = new PatchRecoveryPointInput(); + Properties.RecoveryPointExpiryOn = value; + } + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs index bc258f3c184f..c0284096bb5b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.Serialization.cs @@ -86,7 +86,7 @@ internal static BackupStatusContent DeserializeBackupStatusContent(JsonElement e { return null; } - BackupDataSourceType? resourceType = default; + DataSourceTypeAutoGenerated2? resourceType = default; ResourceIdentifier resourceId = default; string poLogicalName = default; IDictionary serializedAdditionalRawData = default; @@ -99,7 +99,7 @@ internal static BackupStatusContent DeserializeBackupStatusContent(JsonElement e { continue; } - resourceType = new BackupDataSourceType(property.Value.GetString()); + resourceType = new DataSourceTypeAutoGenerated2(property.Value.GetString()); continue; } if (property.NameEquals("resourceId"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.cs index 38e7dc8f7e0c..a276ab7389a9 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/BackupStatusContent.cs @@ -56,7 +56,7 @@ public BackupStatusContent() /// Entire ARM resource id of the resource. /// Protectable Item Logical Name. /// Keeps track of any properties unknown to the library. - internal BackupStatusContent(BackupDataSourceType? resourceType, ResourceIdentifier resourceId, string poLogicalName, IDictionary serializedAdditionalRawData) + internal BackupStatusContent(DataSourceTypeAutoGenerated2? resourceType, ResourceIdentifier resourceId, string poLogicalName, IDictionary serializedAdditionalRawData) { ResourceType = resourceType; ResourceId = resourceId; @@ -65,7 +65,7 @@ internal BackupStatusContent(BackupDataSourceType? resourceType, ResourceIdentif } /// Container Type - VM, SQLPaaS, DPM, AzureFileShare... - public BackupDataSourceType? ResourceType { get; set; } + public DataSourceTypeAutoGenerated2? ResourceType { get; set; } /// Entire ARM resource id of the resource. public ResourceIdentifier ResourceId { get; set; } /// Protectable Item Logical Name. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated.cs new file mode 100644 index 000000000000..2b0dc5d83f51 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. + public readonly partial struct DataSourceTypeAutoGenerated : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataSourceTypeAutoGenerated(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string VmValue = "VM"; + private const string FileFolderValue = "FileFolder"; + private const string AzureSqlDBValue = "AzureSqlDb"; + private const string SqlDBValue = "SQLDB"; + private const string ExchangeValue = "Exchange"; + private const string SharepointValue = "Sharepoint"; + private const string VMwareVmValue = "VMwareVM"; + private const string SystemStateValue = "SystemState"; + private const string ClientValue = "Client"; + private const string GenericDataSourceValue = "GenericDataSource"; + private const string SqlDataBaseValue = "SQLDataBase"; + private const string AzureFileShareValue = "AzureFileShare"; + private const string SapHanaDatabaseValue = "SAPHanaDatabase"; + private const string SapAseDatabaseValue = "SAPAseDatabase"; + private const string SapHanaDBInstanceValue = "SAPHanaDBInstance"; + private const string OracleDatabaseValue = "OracleDatabase"; + private const string AnyDatabaseValue = "AnyDatabase"; + + /// Invalid. + public static DataSourceTypeAutoGenerated Invalid { get; } = new DataSourceTypeAutoGenerated(InvalidValue); + /// VM. + public static DataSourceTypeAutoGenerated Vm { get; } = new DataSourceTypeAutoGenerated(VmValue); + /// FileFolder. + public static DataSourceTypeAutoGenerated FileFolder { get; } = new DataSourceTypeAutoGenerated(FileFolderValue); + /// AzureSqlDb. + public static DataSourceTypeAutoGenerated AzureSqlDB { get; } = new DataSourceTypeAutoGenerated(AzureSqlDBValue); + /// SQLDB. + public static DataSourceTypeAutoGenerated SqlDB { get; } = new DataSourceTypeAutoGenerated(SqlDBValue); + /// Exchange. + public static DataSourceTypeAutoGenerated Exchange { get; } = new DataSourceTypeAutoGenerated(ExchangeValue); + /// Sharepoint. + public static DataSourceTypeAutoGenerated Sharepoint { get; } = new DataSourceTypeAutoGenerated(SharepointValue); + /// VMwareVM. + public static DataSourceTypeAutoGenerated VMwareVm { get; } = new DataSourceTypeAutoGenerated(VMwareVmValue); + /// SystemState. + public static DataSourceTypeAutoGenerated SystemState { get; } = new DataSourceTypeAutoGenerated(SystemStateValue); + /// Client. + public static DataSourceTypeAutoGenerated Client { get; } = new DataSourceTypeAutoGenerated(ClientValue); + /// GenericDataSource. + public static DataSourceTypeAutoGenerated GenericDataSource { get; } = new DataSourceTypeAutoGenerated(GenericDataSourceValue); + /// SQLDataBase. + public static DataSourceTypeAutoGenerated SqlDataBase { get; } = new DataSourceTypeAutoGenerated(SqlDataBaseValue); + /// AzureFileShare. + public static DataSourceTypeAutoGenerated AzureFileShare { get; } = new DataSourceTypeAutoGenerated(AzureFileShareValue); + /// SAPHanaDatabase. + public static DataSourceTypeAutoGenerated SapHanaDatabase { get; } = new DataSourceTypeAutoGenerated(SapHanaDatabaseValue); + /// SAPAseDatabase. + public static DataSourceTypeAutoGenerated SapAseDatabase { get; } = new DataSourceTypeAutoGenerated(SapAseDatabaseValue); + /// SAPHanaDBInstance. + public static DataSourceTypeAutoGenerated SapHanaDBInstance { get; } = new DataSourceTypeAutoGenerated(SapHanaDBInstanceValue); + /// OracleDatabase. + public static DataSourceTypeAutoGenerated OracleDatabase { get; } = new DataSourceTypeAutoGenerated(OracleDatabaseValue); + /// AnyDatabase. + public static DataSourceTypeAutoGenerated AnyDatabase { get; } = new DataSourceTypeAutoGenerated(AnyDatabaseValue); + /// Determines if two values are the same. + public static bool operator ==(DataSourceTypeAutoGenerated left, DataSourceTypeAutoGenerated right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataSourceTypeAutoGenerated left, DataSourceTypeAutoGenerated right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataSourceTypeAutoGenerated(string value) => new DataSourceTypeAutoGenerated(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataSourceTypeAutoGenerated other && Equals(other); + /// + public bool Equals(DataSourceTypeAutoGenerated other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated2.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated2.cs new file mode 100644 index 000000000000..07c251a8b7b5 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated2.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Container Type - VM, SQLPaaS, DPM, AzureFileShare... + public readonly partial struct DataSourceTypeAutoGenerated2 : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataSourceTypeAutoGenerated2(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string VmValue = "VM"; + private const string FileFolderValue = "FileFolder"; + private const string AzureSqlDBValue = "AzureSqlDb"; + private const string SqlDBValue = "SQLDB"; + private const string ExchangeValue = "Exchange"; + private const string SharepointValue = "Sharepoint"; + private const string VMwareVmValue = "VMwareVM"; + private const string SystemStateValue = "SystemState"; + private const string ClientValue = "Client"; + private const string GenericDataSourceValue = "GenericDataSource"; + private const string SqlDataBaseValue = "SQLDataBase"; + private const string AzureFileShareValue = "AzureFileShare"; + private const string SapHanaDatabaseValue = "SAPHanaDatabase"; + private const string SapAseDatabaseValue = "SAPAseDatabase"; + private const string SapHanaDBInstanceValue = "SAPHanaDBInstance"; + private const string OracleDatabaseValue = "OracleDatabase"; + private const string AnyDatabaseValue = "AnyDatabase"; + + /// Invalid. + public static DataSourceTypeAutoGenerated2 Invalid { get; } = new DataSourceTypeAutoGenerated2(InvalidValue); + /// VM. + public static DataSourceTypeAutoGenerated2 Vm { get; } = new DataSourceTypeAutoGenerated2(VmValue); + /// FileFolder. + public static DataSourceTypeAutoGenerated2 FileFolder { get; } = new DataSourceTypeAutoGenerated2(FileFolderValue); + /// AzureSqlDb. + public static DataSourceTypeAutoGenerated2 AzureSqlDB { get; } = new DataSourceTypeAutoGenerated2(AzureSqlDBValue); + /// SQLDB. + public static DataSourceTypeAutoGenerated2 SqlDB { get; } = new DataSourceTypeAutoGenerated2(SqlDBValue); + /// Exchange. + public static DataSourceTypeAutoGenerated2 Exchange { get; } = new DataSourceTypeAutoGenerated2(ExchangeValue); + /// Sharepoint. + public static DataSourceTypeAutoGenerated2 Sharepoint { get; } = new DataSourceTypeAutoGenerated2(SharepointValue); + /// VMwareVM. + public static DataSourceTypeAutoGenerated2 VMwareVm { get; } = new DataSourceTypeAutoGenerated2(VMwareVmValue); + /// SystemState. + public static DataSourceTypeAutoGenerated2 SystemState { get; } = new DataSourceTypeAutoGenerated2(SystemStateValue); + /// Client. + public static DataSourceTypeAutoGenerated2 Client { get; } = new DataSourceTypeAutoGenerated2(ClientValue); + /// GenericDataSource. + public static DataSourceTypeAutoGenerated2 GenericDataSource { get; } = new DataSourceTypeAutoGenerated2(GenericDataSourceValue); + /// SQLDataBase. + public static DataSourceTypeAutoGenerated2 SqlDataBase { get; } = new DataSourceTypeAutoGenerated2(SqlDataBaseValue); + /// AzureFileShare. + public static DataSourceTypeAutoGenerated2 AzureFileShare { get; } = new DataSourceTypeAutoGenerated2(AzureFileShareValue); + /// SAPHanaDatabase. + public static DataSourceTypeAutoGenerated2 SapHanaDatabase { get; } = new DataSourceTypeAutoGenerated2(SapHanaDatabaseValue); + /// SAPAseDatabase. + public static DataSourceTypeAutoGenerated2 SapAseDatabase { get; } = new DataSourceTypeAutoGenerated2(SapAseDatabaseValue); + /// SAPHanaDBInstance. + public static DataSourceTypeAutoGenerated2 SapHanaDBInstance { get; } = new DataSourceTypeAutoGenerated2(SapHanaDBInstanceValue); + /// OracleDatabase. + public static DataSourceTypeAutoGenerated2 OracleDatabase { get; } = new DataSourceTypeAutoGenerated2(OracleDatabaseValue); + /// AnyDatabase. + public static DataSourceTypeAutoGenerated2 AnyDatabase { get; } = new DataSourceTypeAutoGenerated2(AnyDatabaseValue); + /// Determines if two values are the same. + public static bool operator ==(DataSourceTypeAutoGenerated2 left, DataSourceTypeAutoGenerated2 right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataSourceTypeAutoGenerated2 left, DataSourceTypeAutoGenerated2 right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataSourceTypeAutoGenerated2(string value) => new DataSourceTypeAutoGenerated2(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataSourceTypeAutoGenerated2 other && Equals(other); + /// + public bool Equals(DataSourceTypeAutoGenerated2 other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated3.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated3.cs new file mode 100644 index 000000000000..e0e9e9155fd7 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DataSourceTypeAutoGenerated3.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Type of workload this item represents. + public readonly partial struct DataSourceTypeAutoGenerated3 : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataSourceTypeAutoGenerated3(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string VmValue = "VM"; + private const string FileFolderValue = "FileFolder"; + private const string AzureSqlDBValue = "AzureSqlDb"; + private const string SqlDBValue = "SQLDB"; + private const string ExchangeValue = "Exchange"; + private const string SharepointValue = "Sharepoint"; + private const string VMwareVmValue = "VMwareVM"; + private const string SystemStateValue = "SystemState"; + private const string ClientValue = "Client"; + private const string GenericDataSourceValue = "GenericDataSource"; + private const string SqlDataBaseValue = "SQLDataBase"; + private const string AzureFileShareValue = "AzureFileShare"; + private const string SapHanaDatabaseValue = "SAPHanaDatabase"; + private const string SapAseDatabaseValue = "SAPAseDatabase"; + private const string SapHanaDBInstanceValue = "SAPHanaDBInstance"; + private const string OracleDatabaseValue = "OracleDatabase"; + private const string AnyDatabaseValue = "AnyDatabase"; + + /// Invalid. + public static DataSourceTypeAutoGenerated3 Invalid { get; } = new DataSourceTypeAutoGenerated3(InvalidValue); + /// VM. + public static DataSourceTypeAutoGenerated3 Vm { get; } = new DataSourceTypeAutoGenerated3(VmValue); + /// FileFolder. + public static DataSourceTypeAutoGenerated3 FileFolder { get; } = new DataSourceTypeAutoGenerated3(FileFolderValue); + /// AzureSqlDb. + public static DataSourceTypeAutoGenerated3 AzureSqlDB { get; } = new DataSourceTypeAutoGenerated3(AzureSqlDBValue); + /// SQLDB. + public static DataSourceTypeAutoGenerated3 SqlDB { get; } = new DataSourceTypeAutoGenerated3(SqlDBValue); + /// Exchange. + public static DataSourceTypeAutoGenerated3 Exchange { get; } = new DataSourceTypeAutoGenerated3(ExchangeValue); + /// Sharepoint. + public static DataSourceTypeAutoGenerated3 Sharepoint { get; } = new DataSourceTypeAutoGenerated3(SharepointValue); + /// VMwareVM. + public static DataSourceTypeAutoGenerated3 VMwareVm { get; } = new DataSourceTypeAutoGenerated3(VMwareVmValue); + /// SystemState. + public static DataSourceTypeAutoGenerated3 SystemState { get; } = new DataSourceTypeAutoGenerated3(SystemStateValue); + /// Client. + public static DataSourceTypeAutoGenerated3 Client { get; } = new DataSourceTypeAutoGenerated3(ClientValue); + /// GenericDataSource. + public static DataSourceTypeAutoGenerated3 GenericDataSource { get; } = new DataSourceTypeAutoGenerated3(GenericDataSourceValue); + /// SQLDataBase. + public static DataSourceTypeAutoGenerated3 SqlDataBase { get; } = new DataSourceTypeAutoGenerated3(SqlDataBaseValue); + /// AzureFileShare. + public static DataSourceTypeAutoGenerated3 AzureFileShare { get; } = new DataSourceTypeAutoGenerated3(AzureFileShareValue); + /// SAPHanaDatabase. + public static DataSourceTypeAutoGenerated3 SapHanaDatabase { get; } = new DataSourceTypeAutoGenerated3(SapHanaDatabaseValue); + /// SAPAseDatabase. + public static DataSourceTypeAutoGenerated3 SapAseDatabase { get; } = new DataSourceTypeAutoGenerated3(SapAseDatabaseValue); + /// SAPHanaDBInstance. + public static DataSourceTypeAutoGenerated3 SapHanaDBInstance { get; } = new DataSourceTypeAutoGenerated3(SapHanaDBInstanceValue); + /// OracleDatabase. + public static DataSourceTypeAutoGenerated3 OracleDatabase { get; } = new DataSourceTypeAutoGenerated3(OracleDatabaseValue); + /// AnyDatabase. + public static DataSourceTypeAutoGenerated3 AnyDatabase { get; } = new DataSourceTypeAutoGenerated3(AnyDatabaseValue); + /// Determines if two values are the same. + public static bool operator ==(DataSourceTypeAutoGenerated3 left, DataSourceTypeAutoGenerated3 right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataSourceTypeAutoGenerated3 left, DataSourceTypeAutoGenerated3 right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataSourceTypeAutoGenerated3(string value) => new DataSourceTypeAutoGenerated3(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataSourceTypeAutoGenerated3 other && Equals(other); + /// + public bool Equals(DataSourceTypeAutoGenerated3 other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs index e83e1f16fe54..bbcdeacec88f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.Serialization.cs @@ -83,7 +83,7 @@ internal static DpmProtectedItem DeserializeDpmProtectedItem(JsonElement element DpmProtectedItemExtendedInfo extendedInfo = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -152,7 +152,7 @@ internal static DpmProtectedItem DeserializeDpmProtectedItem(JsonElement element { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.cs index 6f8a3383ca57..39b155c42ae3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/DpmProtectedItem.cs @@ -45,7 +45,7 @@ public DpmProtectedItem() /// Backup Management server protecting this backup item. /// Protection state of the backup engine. /// Extended info of the backup item. - internal DpmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string backupEngineName, ProtectedItemState? protectionState, DpmProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal DpmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string backupEngineName, ProtectedItemState? protectionState, DpmProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { FriendlyName = friendlyName; BackupEngineName = backupEngineName; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs index b748e7842c41..4db4fe50878c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.Serialization.cs @@ -99,6 +99,7 @@ internal static FileShareRestoreContent DeserializeFileShareRestoreContent(JsonE IList restoreFileSpecs = default; TargetAfsRestoreInfo targetDetails = default; string objectType = default; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -167,6 +168,20 @@ internal static FileShareRestoreContent DeserializeFileShareRestoreContent(JsonE objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -175,6 +190,7 @@ internal static FileShareRestoreContent DeserializeFileShareRestoreContent(JsonE serializedAdditionalRawData = rawDataDictionary; return new FileShareRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.cs index 2914e71ce68b..ea7ad25be56f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileShareRestoreContent.cs @@ -23,6 +23,7 @@ public FileShareRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Source storage account ARM Id. @@ -30,7 +31,7 @@ public FileShareRestoreContent() /// Restore Type (FullShareRestore or ItemLevelRestore). /// List of Source Files/Folders(which need to recover) and TargetFolderPath details. /// Target File Share Details. - internal FileShareRestoreContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, FileShareCopyOption? copyOptions, FileShareRestoreType? restoreRequestType, IList restoreFileSpecs, TargetAfsRestoreInfo targetDetails) : base(objectType, serializedAdditionalRawData) + internal FileShareRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, FileShareCopyOption? copyOptions, FileShareRestoreType? restoreRequestType, IList restoreFileSpecs, TargetAfsRestoreInfo targetDetails) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData) { RecoveryType = recoveryType; SourceResourceId = sourceResourceId; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs index 638a46668c23..5976252932e5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.Serialization.cs @@ -107,7 +107,7 @@ internal static FileshareProtectedItem DeserializeFileshareProtectedItem(JsonEle FileshareProtectedItemExtendedInfo extendedInfo = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -204,7 +204,7 @@ internal static FileshareProtectedItem DeserializeFileshareProtectedItem(JsonEle { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.cs index 192309bb5aab..81c5d6d50e64 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/FileshareProtectedItem.cs @@ -49,7 +49,7 @@ public FileshareProtectedItem() /// Timestamp of the last backup operation on this backup item. /// Health details of different KPIs. /// Additional information with this backup item. - internal FileshareProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string protectionStatus, BackupProtectionState? protectionState, string lastBackupStatus, DateTimeOffset? lastBackupOn, IDictionary kpisHealths, FileshareProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal FileshareProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string protectionStatus, BackupProtectionState? protectionState, string lastBackupStatus, DateTimeOffset? lastBackupOn, IDictionary kpisHealths, FileshareProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { FriendlyName = friendlyName; ProtectionStatus = protectionStatus; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs index e35ce800ad12..3aca6f9dde95 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.Serialization.cs @@ -101,7 +101,7 @@ internal static GenericProtectedItem DeserializeGenericProtectedItem(JsonElement string fabricName = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -189,7 +189,7 @@ internal static GenericProtectedItem DeserializeGenericProtectedItem(JsonElement { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.cs index 9d858fefd945..48abacade5f8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/GenericProtectedItem.cs @@ -48,7 +48,7 @@ public GenericProtectedItem() /// Data Plane Service ID of the protected item. /// Loosely coupled (type, value) associations (example - parent of a protected item). /// Name of this backup item's fabric. - internal GenericProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string policyState, BackupProtectionState? protectionState, long? protectedItemId, IDictionary sourceAssociations, string fabricName) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal GenericProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string policyState, BackupProtectionState? protectionState, long? protectedItemId, IDictionary sourceAssociations, string fabricName) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { FriendlyName = friendlyName; PolicyState = policyState; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs index 148ce3879383..85aa115baba7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.Serialization.cs @@ -71,7 +71,7 @@ internal static IaasClassicComputeVmProtectedItem DeserializeIaasClassicComputeV IaasVmBackupExtendedProperties extendedProperties = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -214,7 +214,7 @@ internal static IaasClassicComputeVmProtectedItem DeserializeIaasClassicComputeV { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.cs index e7be41085e3e..3fabb2b3657a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasClassicComputeVmProtectedItem.cs @@ -53,7 +53,7 @@ public IaasClassicComputeVmProtectedItem() /// Data ID of the protected item. /// Additional information for this backup item. /// Extended Properties for Azure IaasVM Backup. - internal IaasClassicComputeVmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IList healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupOn, protectedItemDataId, extendedInfo, extendedProperties) + internal IaasClassicComputeVmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IList healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupOn, protectedItemDataId, extendedInfo, extendedProperties) { ProtectedItemType = protectedItemType ?? "Microsoft.ClassicCompute/virtualMachines"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs index 8dadf33db927..1ed63e85d340 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.Serialization.cs @@ -71,7 +71,7 @@ internal static IaasComputeVmProtectedItem DeserializeIaasComputeVmProtectedItem IaasVmBackupExtendedProperties extendedProperties = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -214,7 +214,7 @@ internal static IaasComputeVmProtectedItem DeserializeIaasComputeVmProtectedItem { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.cs index b125a90d1f1e..23b3f7358d08 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasComputeVmProtectedItem.cs @@ -53,7 +53,7 @@ public IaasComputeVmProtectedItem() /// Data ID of the protected item. /// Additional information for this backup item. /// Extended Properties for Azure IaasVM Backup. - internal IaasComputeVmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IList healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupOn, protectedItemDataId, extendedInfo, extendedProperties) + internal IaasComputeVmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IList healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupOn, protectedItemDataId, extendedInfo, extendedProperties) { ProtectedItemType = protectedItemType ?? "Microsoft.Compute/virtualMachines"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs index 3b3fe319666b..3ddcfe94ee92 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.Serialization.cs @@ -150,7 +150,7 @@ internal static IaasVmProtectedItem DeserializeIaasVmProtectedItem(JsonElement e IaasVmBackupExtendedProperties extendedProperties = default; string protectedItemType = "AzureIaaSVMProtectedItem"; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -293,7 +293,7 @@ internal static IaasVmProtectedItem DeserializeIaasVmProtectedItem(JsonElement e { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.cs index 69f322da24ea..7a6f8a6d404a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectedItem.cs @@ -59,7 +59,7 @@ public IaasVmProtectedItem() /// Data ID of the protected item. /// Additional information for this backup item. /// Extended Properties for Azure IaasVM Backup. - internal IaasVmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IList healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal IaasVmProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, ResourceIdentifier virtualMachineId, string protectionStatus, BackupProtectionState? protectionState, IaasVmProtectedItemHealthStatus? healthStatus, IList healthDetails, IDictionary kpisHealths, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectedItemDataId, IaasVmProtectedItemExtendedInfo extendedInfo, IaasVmBackupExtendedProperties extendedProperties) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { FriendlyName = friendlyName; VirtualMachineId = virtualMachineId; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs index 527b212dc21f..d8cc689a7c5b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.Serialization.cs @@ -76,6 +76,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("policyType"u8); writer.WriteStringValue(PolicyType.Value.ToString()); } + if (Optional.IsDefined(SnapshotConsistencyType)) + { + writer.WritePropertyName("snapshotConsistencyType"u8); + writer.WriteStringValue(SnapshotConsistencyType.Value.ToString()); + } } IaasVmProtectionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -105,6 +110,7 @@ internal static IaasVmProtectionPolicy DeserializeIaasVmProtectionPolicy(JsonEle int? instantRpRetentionRangeInDays = default; string timeZone = default; IaasVmPolicyType? policyType = default; + IaasVmSnapshotConsistencyType? snapshotConsistencyType = default; int? protectedItemsCount = default; string backupManagementType = default; IList resourceGuardOperationRequests = default; @@ -176,6 +182,15 @@ internal static IaasVmProtectionPolicy DeserializeIaasVmProtectionPolicy(JsonEle policyType = new IaasVmPolicyType(property.Value.GetString()); continue; } + if (property.NameEquals("snapshotConsistencyType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotConsistencyType = new IaasVmSnapshotConsistencyType(property.Value.GetString()); + continue; + } if (property.NameEquals("protectedItemsCount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -221,7 +236,8 @@ internal static IaasVmProtectionPolicy DeserializeIaasVmProtectionPolicy(JsonEle tieringPolicy ?? new ChangeTrackingDictionary(), instantRpRetentionRangeInDays, timeZone, - policyType); + policyType, + snapshotConsistencyType); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.cs index 34b09ad22f41..11c460bb5aea 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmProtectionPolicy.cs @@ -44,7 +44,8 @@ public IaasVmProtectionPolicy() /// Instant RP retention policy range in days. /// TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". /// - internal IaasVmProtectionPolicy(int? protectedItemsCount, string backupManagementType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, InstantRPAdditionalDetails instantRPDetails, BackupSchedulePolicy schedulePolicy, BackupRetentionPolicy retentionPolicy, IDictionary tieringPolicy, int? instantRPRetentionRangeInDays, string timeZone, IaasVmPolicyType? policyType) : base(protectedItemsCount, backupManagementType, resourceGuardOperationRequests, serializedAdditionalRawData) + /// + internal IaasVmProtectionPolicy(int? protectedItemsCount, string backupManagementType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, InstantRPAdditionalDetails instantRPDetails, BackupSchedulePolicy schedulePolicy, BackupRetentionPolicy retentionPolicy, IDictionary tieringPolicy, int? instantRPRetentionRangeInDays, string timeZone, IaasVmPolicyType? policyType, IaasVmSnapshotConsistencyType? snapshotConsistencyType) : base(protectedItemsCount, backupManagementType, resourceGuardOperationRequests, serializedAdditionalRawData) { InstantRPDetails = instantRPDetails; SchedulePolicy = schedulePolicy; @@ -53,6 +54,7 @@ internal IaasVmProtectionPolicy(int? protectedItemsCount, string backupManagemen InstantRPRetentionRangeInDays = instantRPRetentionRangeInDays; TimeZone = timeZone; PolicyType = policyType; + SnapshotConsistencyType = snapshotConsistencyType; BackupManagementType = backupManagementType ?? "AzureIaasVM"; } @@ -82,5 +84,7 @@ internal IaasVmProtectionPolicy(int? protectedItemsCount, string backupManagemen public string TimeZone { get; set; } /// Gets or sets the policy type. public IaasVmPolicyType? PolicyType { get; set; } + /// Gets or sets the snapshot consistency type. + public IaasVmSnapshotConsistencyType? SnapshotConsistencyType { get; set; } } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs index c03fcc93673a..3ac06116c70f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.Serialization.cs @@ -214,6 +214,7 @@ internal static IaasVmRestoreContent DeserializeIaasVmRestoreContent(JsonElement SecuredVmDetails securedVmDetails = default; BackupTargetDiskNetworkAccessSettings targetDiskNetworkAccessSettings = default; string objectType = "IaasVMRestoreRequest"; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -428,6 +429,20 @@ internal static IaasVmRestoreContent DeserializeIaasVmRestoreContent(JsonElement objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -436,6 +451,7 @@ internal static IaasVmRestoreContent DeserializeIaasVmRestoreContent(JsonElement serializedAdditionalRawData = rawDataDictionary; return new IaasVmRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryPointId, recoveryType, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.cs index e1b01dcfc3a9..2bfc41fd95a1 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreContent.cs @@ -29,6 +29,7 @@ public IaasVmRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// ID of the backup copy to be recovered. /// Type of this recovery. @@ -75,7 +76,7 @@ public IaasVmRestoreContent() /// /// Stores Secured VM Details. /// Specifies target network access settings for disks of VM to be restored,. - internal IaasVmRestoreContent(string objectType, IDictionary serializedAdditionalRawData, string recoveryPointId, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, ResourceIdentifier targetVirtualMachineId, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageAccountId, ResourceIdentifier virtualNetworkId, ResourceIdentifier subnetId, ResourceIdentifier targetDomainNameId, AzureLocation? region, string affinityGroup, bool? doesCreateNewCloudService, bool? originalStorageAccountOption, VmEncryptionDetails encryptionDetails, IList restoreDiskLunList, bool? doesRestoreWithManagedDisks, string diskEncryptionSetId, IList zones, BackupIdentityInfo identityInfo, IdentityBasedRestoreDetails identityBasedRestoreDetails, ExtendedLocation extendedLocation, SecuredVmDetails securedVmDetails, BackupTargetDiskNetworkAccessSettings targetDiskNetworkAccessSettings) : base(objectType, serializedAdditionalRawData) + internal IaasVmRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, string recoveryPointId, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, ResourceIdentifier targetVirtualMachineId, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageAccountId, ResourceIdentifier virtualNetworkId, ResourceIdentifier subnetId, ResourceIdentifier targetDomainNameId, AzureLocation? region, string affinityGroup, bool? doesCreateNewCloudService, bool? originalStorageAccountOption, VmEncryptionDetails encryptionDetails, IList restoreDiskLunList, bool? doesRestoreWithManagedDisks, string diskEncryptionSetId, IList zones, BackupIdentityInfo identityInfo, IdentityBasedRestoreDetails identityBasedRestoreDetails, ExtendedLocation extendedLocation, SecuredVmDetails securedVmDetails, BackupTargetDiskNetworkAccessSettings targetDiskNetworkAccessSettings) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData) { RecoveryPointId = recoveryPointId; RecoveryType = recoveryType; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs index f4edc6c6cf9d..61e7c51e2fe8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.Serialization.cs @@ -88,6 +88,7 @@ internal static IaasVmRestoreWithRehydrationContent DeserializeIaasVmRestoreWith SecuredVmDetails securedVmDetails = default; BackupTargetDiskNetworkAccessSettings targetDiskNetworkAccessSettings = default; string objectType = default; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -311,6 +312,20 @@ internal static IaasVmRestoreWithRehydrationContent DeserializeIaasVmRestoreWith objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -319,6 +334,7 @@ internal static IaasVmRestoreWithRehydrationContent DeserializeIaasVmRestoreWith serializedAdditionalRawData = rawDataDictionary; return new IaasVmRestoreWithRehydrationContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryPointId, recoveryType, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.cs index 078ad7102b50..4712d961648c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmRestoreWithRehydrationContent.cs @@ -23,6 +23,7 @@ public IaasVmRestoreWithRehydrationContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// ID of the backup copy to be recovered. /// Type of this recovery. @@ -70,7 +71,7 @@ public IaasVmRestoreWithRehydrationContent() /// Stores Secured VM Details. /// Specifies target network access settings for disks of VM to be restored,. /// RP Rehydration Info. - internal IaasVmRestoreWithRehydrationContent(string objectType, IDictionary serializedAdditionalRawData, string recoveryPointId, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, ResourceIdentifier targetVirtualMachineId, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageAccountId, ResourceIdentifier virtualNetworkId, ResourceIdentifier subnetId, ResourceIdentifier targetDomainNameId, AzureLocation? region, string affinityGroup, bool? doesCreateNewCloudService, bool? originalStorageAccountOption, VmEncryptionDetails encryptionDetails, IList restoreDiskLunList, bool? doesRestoreWithManagedDisks, string diskEncryptionSetId, IList zones, BackupIdentityInfo identityInfo, IdentityBasedRestoreDetails identityBasedRestoreDetails, ExtendedLocation extendedLocation, SecuredVmDetails securedVmDetails, BackupTargetDiskNetworkAccessSettings targetDiskNetworkAccessSettings, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, serializedAdditionalRawData, recoveryPointId, recoveryType, sourceResourceId, targetVirtualMachineId, targetResourceGroupId, storageAccountId, virtualNetworkId, subnetId, targetDomainNameId, region, affinityGroup, doesCreateNewCloudService, originalStorageAccountOption, encryptionDetails, restoreDiskLunList, doesRestoreWithManagedDisks, diskEncryptionSetId, zones, identityInfo, identityBasedRestoreDetails, extendedLocation, securedVmDetails, targetDiskNetworkAccessSettings) + internal IaasVmRestoreWithRehydrationContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, string recoveryPointId, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, ResourceIdentifier targetVirtualMachineId, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageAccountId, ResourceIdentifier virtualNetworkId, ResourceIdentifier subnetId, ResourceIdentifier targetDomainNameId, AzureLocation? region, string affinityGroup, bool? doesCreateNewCloudService, bool? originalStorageAccountOption, VmEncryptionDetails encryptionDetails, IList restoreDiskLunList, bool? doesRestoreWithManagedDisks, string diskEncryptionSetId, IList zones, BackupIdentityInfo identityInfo, IdentityBasedRestoreDetails identityBasedRestoreDetails, ExtendedLocation extendedLocation, SecuredVmDetails securedVmDetails, BackupTargetDiskNetworkAccessSettings targetDiskNetworkAccessSettings, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryPointId, recoveryType, sourceResourceId, targetVirtualMachineId, targetResourceGroupId, storageAccountId, virtualNetworkId, subnetId, targetDomainNameId, region, affinityGroup, doesCreateNewCloudService, originalStorageAccountOption, encryptionDetails, restoreDiskLunList, doesRestoreWithManagedDisks, diskEncryptionSetId, zones, identityInfo, identityBasedRestoreDetails, extendedLocation, securedVmDetails, targetDiskNetworkAccessSettings) { RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; ObjectType = objectType ?? "IaasVMRestoreWithRehydrationRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmSnapshotConsistencyType.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmSnapshotConsistencyType.cs new file mode 100644 index 000000000000..850febbf8e25 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/IaasVmSnapshotConsistencyType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// The IaasVmSnapshotConsistencyType. + public readonly partial struct IaasVmSnapshotConsistencyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IaasVmSnapshotConsistencyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OnlyCrashConsistentValue = "OnlyCrashConsistent"; + + /// OnlyCrashConsistent. + public static IaasVmSnapshotConsistencyType OnlyCrashConsistent { get; } = new IaasVmSnapshotConsistencyType(OnlyCrashConsistentValue); + /// Determines if two values are the same. + public static bool operator ==(IaasVmSnapshotConsistencyType left, IaasVmSnapshotConsistencyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IaasVmSnapshotConsistencyType left, IaasVmSnapshotConsistencyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IaasVmSnapshotConsistencyType(string value) => new IaasVmSnapshotConsistencyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IaasVmSnapshotConsistencyType other && Equals(other); + /// + public bool Equals(IaasVmSnapshotConsistencyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs index beac11d2fc1a..894b1e724b6f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.Serialization.cs @@ -101,7 +101,7 @@ internal static MabFileFolderProtectedItem DeserializeMabFileFolderProtectedItem MabFileFolderProtectedItemExtendedInfo extendedInfo = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -189,7 +189,7 @@ internal static MabFileFolderProtectedItem DeserializeMabFileFolderProtectedItem { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.cs index 0f8664fbda8b..3540443b85c5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/MabFileFolderProtectedItem.cs @@ -48,7 +48,7 @@ public MabFileFolderProtectedItem() /// Protected, ProtectionStopped, IRPending or ProtectionError. /// Sync time for deferred deletion in UTC. /// Additional information with this backup item. - internal MabFileFolderProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string computerName, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectionState, long? deferredDeleteSyncTimeInUTC, MabFileFolderProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal MabFileFolderProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string computerName, string lastBackupStatus, DateTimeOffset? lastBackupOn, string protectionState, long? deferredDeleteSyncTimeInUTC, MabFileFolderProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { FriendlyName = friendlyName; ComputerName = computerName; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointInput.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointInput.Serialization.cs new file mode 100644 index 000000000000..608d21096028 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointInput.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + internal partial class PatchRecoveryPointInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchRecoveryPointInput)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RecoveryPointProperties)) + { + writer.WritePropertyName("recoveryPointProperties"u8); + writer.WriteObjectValue(RecoveryPointProperties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchRecoveryPointInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchRecoveryPointInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchRecoveryPointInput(document.RootElement, options); + } + + internal static PatchRecoveryPointInput DeserializePatchRecoveryPointInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PatchRecoveryPointPropertiesInput recoveryPointProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointProperties = PatchRecoveryPointPropertiesInput.DeserializePatchRecoveryPointPropertiesInput(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchRecoveryPointInput(recoveryPointProperties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PatchRecoveryPointInput)} does not support writing '{options.Format}' format."); + } + } + + PatchRecoveryPointInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchRecoveryPointInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchRecoveryPointInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointInput.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointInput.cs new file mode 100644 index 000000000000..9a7b99581973 --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointInput.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Recovery Point Contract for Update Recovery Point API. + internal partial class PatchRecoveryPointInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PatchRecoveryPointInput() + { + } + + /// Initializes a new instance of . + /// Properties of Recovery Point. + /// Keeps track of any properties unknown to the library. + internal PatchRecoveryPointInput(PatchRecoveryPointPropertiesInput recoveryPointProperties, IDictionary serializedAdditionalRawData) + { + RecoveryPointProperties = recoveryPointProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Properties of Recovery Point. + internal PatchRecoveryPointPropertiesInput RecoveryPointProperties { get; set; } + /// Expiry time of Recovery Point in UTC. + public DateTimeOffset? RecoveryPointExpiryOn + { + get => RecoveryPointProperties is null ? default : RecoveryPointProperties.ExpiryOn; + set + { + if (RecoveryPointProperties is null) + RecoveryPointProperties = new PatchRecoveryPointPropertiesInput(); + RecoveryPointProperties.ExpiryOn = value; + } + } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointPropertiesInput.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointPropertiesInput.Serialization.cs new file mode 100644 index 000000000000..ca968c06ba3c --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointPropertiesInput.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + internal partial class PatchRecoveryPointPropertiesInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchRecoveryPointPropertiesInput)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ExpiryOn)) + { + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryOn.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PatchRecoveryPointPropertiesInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PatchRecoveryPointPropertiesInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePatchRecoveryPointPropertiesInput(document.RootElement, options); + } + + internal static PatchRecoveryPointPropertiesInput DeserializePatchRecoveryPointPropertiesInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiryTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PatchRecoveryPointPropertiesInput(expiryTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PatchRecoveryPointPropertiesInput)} does not support writing '{options.Format}' format."); + } + } + + PatchRecoveryPointPropertiesInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePatchRecoveryPointPropertiesInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PatchRecoveryPointPropertiesInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointPropertiesInput.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointPropertiesInput.cs new file mode 100644 index 000000000000..acb35a0b48ba --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PatchRecoveryPointPropertiesInput.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Recovery Point Properties Contract for Update Recovery Point API. + internal partial class PatchRecoveryPointPropertiesInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PatchRecoveryPointPropertiesInput() + { + } + + /// Initializes a new instance of . + /// Expiry time of Recovery Point in UTC. + /// Keeps track of any properties unknown to the library. + internal PatchRecoveryPointPropertiesInput(DateTimeOffset? expiryOn, IDictionary serializedAdditionalRawData) + { + ExpiryOn = expiryOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Expiry time of Recovery Point in UTC. + public DateTimeOffset? ExpiryOn { get; set; } + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs index 809c6d5f8855..eeb10d710524 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.Serialization.cs @@ -91,7 +91,7 @@ internal static PreValidateEnableBackupContent DeserializePreValidateEnableBacku { return null; } - BackupDataSourceType? resourceType = default; + DataSourceTypeAutoGenerated? resourceType = default; ResourceIdentifier resourceId = default; ResourceIdentifier vaultId = default; string properties = default; @@ -105,7 +105,7 @@ internal static PreValidateEnableBackupContent DeserializePreValidateEnableBacku { continue; } - resourceType = new BackupDataSourceType(property.Value.GetString()); + resourceType = new DataSourceTypeAutoGenerated(property.Value.GetString()); continue; } if (property.NameEquals("resourceId"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.cs index 723ee86076dc..0837b10c6df5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/PreValidateEnableBackupContent.cs @@ -63,7 +63,7 @@ public PreValidateEnableBackupContent() /// ARM id of the Recovery Services Vault. /// Configuration of VM if any needs to be validated like OS type etc. /// Keeps track of any properties unknown to the library. - internal PreValidateEnableBackupContent(BackupDataSourceType? resourceType, ResourceIdentifier resourceId, ResourceIdentifier vaultId, string properties, IDictionary serializedAdditionalRawData) + internal PreValidateEnableBackupContent(DataSourceTypeAutoGenerated? resourceType, ResourceIdentifier resourceId, ResourceIdentifier vaultId, string properties, IDictionary serializedAdditionalRawData) { ResourceType = resourceType; ResourceId = resourceId; @@ -73,7 +73,7 @@ internal PreValidateEnableBackupContent(BackupDataSourceType? resourceType, Reso } /// ProtectedItem Type- VM, SqlDataBase, AzureFileShare etc. - public BackupDataSourceType? ResourceType { get; set; } + public DataSourceTypeAutoGenerated? ResourceType { get; set; } /// ARM Virtual Machine Id. public ResourceIdentifier ResourceId { get; set; } /// ARM id of the Recovery Services Vault. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs index b8f40dac84a5..383d69b5361f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.Serialization.cs @@ -36,6 +36,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("objectType"u8); writer.WriteStringValue(ObjectType); + if (Optional.IsCollectionDefined(ResourceGuardOperationRequests)) + { + writer.WritePropertyName("resourceGuardOperationRequests"u8); + writer.WriteStartArray(); + foreach (var item in ResourceGuardOperationRequests) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,8 +88,20 @@ internal static RestoreContent DeserializeRestoreContent(JsonElement element, Mo switch (discriminator.GetString()) { case "AzureFileShareRestoreRequest": return FileShareRestoreContent.DeserializeFileShareRestoreContent(element, options); + case "AzureWorkloadAnyDatabasePointInTimeRestoreRequest": return AzureWorkloadAnyDatabasePointInTimeRestoreRequest.DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreRequest(element, options); + case "AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadAnyDatabaseRestoreRequest": return AzureWorkloadAnyDatabaseRestoreRequest.DeserializeAzureWorkloadAnyDatabaseRestoreRequest(element, options); + case "AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest": return AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.DeserializeAzureWorkloadAnyDatabaseRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadOraclePointInTimeRestoreRequest": return AzureWorkloadOraclePointInTimeRestoreRequest.DeserializeAzureWorkloadOraclePointInTimeRestoreRequest(element, options); + case "AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadOracleRestoreRequest": return AzureWorkloadOracleRestoreRequest.DeserializeAzureWorkloadOracleRestoreRequest(element, options); + case "AzureWorkloadOracleRestoreWithRehydrateRequest": return AzureWorkloadOracleRestoreWithRehydrateRequest.DeserializeAzureWorkloadOracleRestoreWithRehydrateRequest(element, options); case "AzureWorkloadPointInTimeRestoreRequest": return WorkloadPointInTimeRestoreContent.DeserializeWorkloadPointInTimeRestoreContent(element, options); case "AzureWorkloadRestoreRequest": return WorkloadRestoreContent.DeserializeWorkloadRestoreContent(element, options); + case "AzureWorkloadSAPAsePointInTimeRestoreRequest": return AzureWorkloadSapAsePointInTimeRestoreRequest.DeserializeAzureWorkloadSapAsePointInTimeRestoreRequest(element, options); + case "AzureWorkloadSAPAsePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadSAPAseRestoreRequest": return AzureWorkloadSapAseRestoreRequest.DeserializeAzureWorkloadSapAseRestoreRequest(element, options); + case "AzureWorkloadSAPAseRestoreWithRehydrateRequest": return AzureWorkloadSapAseRestoreWithRehydrateRequest.DeserializeAzureWorkloadSapAseRestoreWithRehydrateRequest(element, options); case "AzureWorkloadSAPHanaPointInTimeRestoreRequest": return WorkloadSapHanaPointInTimeRestoreContent.DeserializeWorkloadSapHanaPointInTimeRestoreContent(element, options); case "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest": return WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.DeserializeWorkloadSapHanaPointInTimeRestoreWithRehydrateContent(element, options); case "AzureWorkloadSAPHanaRestoreRequest": return WorkloadSapHanaRestoreContent.DeserializeWorkloadSapHanaRestoreContent(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.cs index 448f61a30895..ddb48329fb9f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/RestoreContent.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Base class for restore request. Workload-specific restore requests are derived from this class. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , and . /// public abstract partial class RestoreContent { @@ -52,18 +52,23 @@ public abstract partial class RestoreContent /// Initializes a new instance of . protected RestoreContent() { + ResourceGuardOperationRequests = new ChangeTrackingList(); } /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. - internal RestoreContent(string objectType, IDictionary serializedAdditionalRawData) + internal RestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData) { ObjectType = objectType; + ResourceGuardOperationRequests = resourceGuardOperationRequests; _serializedAdditionalRawData = serializedAdditionalRawData; } /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. internal string ObjectType { get; set; } + /// ResourceGuardOperationRequests on which LAC check will be performed. + public IList ResourceGuardOperationRequests { get; } } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.cs index fb375542fbb7..d39e842604b2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SnapshotBackupAdditionalDetails.cs @@ -53,7 +53,7 @@ public SnapshotBackupAdditionalDetails() /// Initializes a new instance of . /// /// - /// + /// User assigned managed identity details. /// Keeps track of any properties unknown to the library. internal SnapshotBackupAdditionalDetails(int? instantRpRetentionRangeInDays, string instantRPDetails, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, IDictionary serializedAdditionalRawData) { @@ -67,7 +67,7 @@ internal SnapshotBackupAdditionalDetails(int? instantRpRetentionRangeInDays, str public int? InstantRpRetentionRangeInDays { get; set; } /// Gets or sets the instant rp details. public string InstantRPDetails { get; set; } - /// Gets or sets the user assigned managed identity details. + /// User assigned managed identity details. public UserAssignedManagedIdentityDetails UserAssignedManagedIdentityDetails { get; set; } } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs index 8f1a1326c45f..20e8ba085c37 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.Serialization.cs @@ -77,7 +77,7 @@ internal static SqlProtectedItem DeserializeSqlProtectedItem(JsonElement element SqlProtectedItemExtendedInfo extendedInfo = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -141,7 +141,7 @@ internal static SqlProtectedItem DeserializeSqlProtectedItem(JsonElement element { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.cs index 07b68c8121e6..fd4e4dc0910f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/SqlProtectedItem.cs @@ -44,7 +44,7 @@ public SqlProtectedItem() /// Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. /// Backup state of the backed up item. /// Additional information for this backup item. - internal SqlProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string protectedItemDataId, ProtectedItemState? protectionState, SqlProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal SqlProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string protectedItemDataId, ProtectedItemState? protectionState, SqlProtectedItemExtendedInfo extendedInfo) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { ProtectedItemDataId = protectedItemDataId; ProtectionState = protectionState; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.cs index 7649dbc4165b..7104c808f826 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/TriggerRestoreContent.cs @@ -63,7 +63,7 @@ public TriggerRestoreContent(AzureLocation location) : base(location) /// /// RestoreRequestResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , and . /// /// Optional ETag. /// Keeps track of any properties unknown to the library. @@ -82,7 +82,7 @@ internal TriggerRestoreContent() /// /// RestoreRequestResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , , , , , and . /// public RestoreContent Properties { get; set; } /// Optional ETag. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs index 6321caa14161..e8abd60165f7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.Serialization.cs @@ -59,7 +59,7 @@ internal static UnknownProtectedItem DeserializeUnknownProtectedItem(JsonElement } string protectedItemType = "Unknown"; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -100,7 +100,7 @@ internal static UnknownProtectedItem DeserializeUnknownProtectedItem(JsonElement { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.cs index d10e203589f4..8af7b9a86784 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownProtectedItem.cs @@ -35,7 +35,7 @@ internal partial class UnknownProtectedItem : BackupGenericProtectedItem /// Soft delete retention period in days. /// ID of the vault which protects this item. /// Keeps track of any properties unknown to the library. - internal UnknownProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal UnknownProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { ProtectedItemType = protectedItemType ?? "Unknown"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs index 317589493791..a1e777249f48 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.Serialization.cs @@ -58,6 +58,7 @@ internal static UnknownRestoreRequest DeserializeUnknownRestoreRequest(JsonEleme return null; } string objectType = "Unknown"; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -67,13 +68,27 @@ internal static UnknownRestoreRequest DeserializeUnknownRestoreRequest(JsonEleme objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownRestoreRequest(objectType, serializedAdditionalRawData); + return new UnknownRestoreRequest(objectType, resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.cs index c1923acee555..32e1c3750126 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UnknownRestoreRequest.cs @@ -15,8 +15,9 @@ internal partial class UnknownRestoreRequest : RestoreContent { /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. - internal UnknownRestoreRequest(string objectType, IDictionary serializedAdditionalRawData) : base(objectType, serializedAdditionalRawData) + internal UnknownRestoreRequest(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData) { ObjectType = objectType ?? "Unknown"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.cs index f2cf562600f5..28c7d98aa1e4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/UserAssignedManagedIdentityDetails.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models { - /// The UserAssignedManagedIdentityDetails. + /// User assigned managed identity details. public partial class UserAssignedManagedIdentityDetails { /// @@ -52,9 +52,9 @@ public UserAssignedManagedIdentityDetails() } /// Initializes a new instance of . - /// - /// - /// User assigned identity properties. + /// The ARM id of the assigned identity. + /// The name of the assigned identity. + /// User assigned managed identity properties. /// Keeps track of any properties unknown to the library. internal UserAssignedManagedIdentityDetails(string identityArmId, string identityName, UserAssignedIdentity userAssignedIdentityProperties, IDictionary serializedAdditionalRawData) { @@ -64,11 +64,11 @@ internal UserAssignedManagedIdentityDetails(string identityArmId, string identit _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the identity arm id. + /// The ARM id of the assigned identity. public string IdentityArmId { get; set; } - /// Gets or sets the identity name. + /// The name of the assigned identity. public string IdentityName { get; set; } - /// User assigned identity properties. + /// User assigned managed identity properties. public UserAssignedIdentity UserAssignedIdentityProperties { get; set; } } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs index 4adae99357ae..a7ef6835f56a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.Serialization.cs @@ -86,6 +86,8 @@ internal static VmWorkloadItem DeserializeVmWorkloadItem(JsonElement element, Mo { switch (discriminator.GetString()) { + case "AnyDataBase": return AzureVmWorkloadAnyDatabaseWorkloadItem.DeserializeAzureVmWorkloadAnyDatabaseWorkloadItem(element, options); + case "OracleDataBase": return AzureVmWorkloadOracleDatabaseWorkloadItem.DeserializeAzureVmWorkloadOracleDatabaseWorkloadItem(element, options); case "SAPAseDatabase": return VmWorkloadSapAseDatabaseWorkloadItem.DeserializeVmWorkloadSapAseDatabaseWorkloadItem(element, options); case "SAPAseSystem": return VmWorkloadSapAseSystemWorkloadItem.DeserializeVmWorkloadSapAseSystemWorkloadItem(element, options); case "SAPHanaDatabase": return VmWorkloadSapHanaDatabaseWorkloadItem.DeserializeVmWorkloadSapHanaDatabaseWorkloadItem(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.cs index a154ad8f6dc1..b96a13212d57 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadItem.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Azure VM workload-specific workload item. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , , , , and . /// public partial class VmWorkloadItem : WorkloadItem { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadPolicyType.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadPolicyType.cs new file mode 100644 index 000000000000..fdfdbce4069e --- /dev/null +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadPolicyType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesBackup.Models +{ + /// Type of workload for the backup management. + public readonly partial struct VmWorkloadPolicyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VmWorkloadPolicyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string SnapshotV1Value = "SnapshotV1"; + private const string SnapshotV2Value = "SnapshotV2"; + private const string StreamingValue = "Streaming"; + + /// Invalid. + public static VmWorkloadPolicyType Invalid { get; } = new VmWorkloadPolicyType(InvalidValue); + /// SnapshotV1. + public static VmWorkloadPolicyType SnapshotV1 { get; } = new VmWorkloadPolicyType(SnapshotV1Value); + /// SnapshotV2. + public static VmWorkloadPolicyType SnapshotV2 { get; } = new VmWorkloadPolicyType(SnapshotV2Value); + /// Streaming. + public static VmWorkloadPolicyType Streaming { get; } = new VmWorkloadPolicyType(StreamingValue); + /// Determines if two values are the same. + public static bool operator ==(VmWorkloadPolicyType left, VmWorkloadPolicyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VmWorkloadPolicyType left, VmWorkloadPolicyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VmWorkloadPolicyType(string value) => new VmWorkloadPolicyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VmWorkloadPolicyType other && Equals(other); + /// + public bool Equals(VmWorkloadPolicyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs index 0752c0a8cb44..3ce062827d02 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.Serialization.cs @@ -106,7 +106,10 @@ internal static VmWorkloadProtectableItem DeserializeVmWorkloadProtectableItem(J { switch (discriminator.GetString()) { + case "AnyDatabase": return AzureVmWorkloadAnyDatabaseProtectableItem.DeserializeAzureVmWorkloadAnyDatabaseProtectableItem(element, options); case "HanaHSRContainer": return VmWorkloadSapHanaHsrProtectableItem.DeserializeVmWorkloadSapHanaHsrProtectableItem(element, options); + case "HanaScaleoutContainer": return AzureVmWorkloadSapHanaScaleoutProtectableItem.DeserializeAzureVmWorkloadSapHanaScaleoutProtectableItem(element, options); + case "OracleDatabase": return AzureVmWorkloadOracleDatabaseProtectableItem.DeserializeAzureVmWorkloadOracleDatabaseProtectableItem(element, options); case "SAPAseSystem": return VmWorkloadSapAseSystemProtectableItem.DeserializeVmWorkloadSapAseSystemProtectableItem(element, options); case "SAPHanaDatabase": return VmWorkloadSapHanaDatabaseProtectableItem.DeserializeVmWorkloadSapHanaDatabaseProtectableItem(element, options); case "SAPHanaDBInstance": return VmWorkloadSapHanaDBInstance.DeserializeVmWorkloadSapHanaDBInstance(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.cs index 6241d5398f70..f41c75bf03b0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectableItem.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Azure VM workload-specific protectable item. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// public partial class VmWorkloadProtectableItem : WorkloadProtectableItem { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs index db426824af9d..56399e24505c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.Serialization.cs @@ -142,6 +142,8 @@ internal static VmWorkloadProtectedItem DeserializeVmWorkloadProtectedItem(JsonE { switch (discriminator.GetString()) { + case "AzureVmWorkloadAnyDatabase": return AzureVmWorkloadAnyDatabaseProtectedItem.DeserializeAzureVmWorkloadAnyDatabaseProtectedItem(element, options); + case "AzureVmWorkloadOracleDatabase": return AzureVmWorkloadOracleDatabaseProtectedItem.DeserializeAzureVmWorkloadOracleDatabaseProtectedItem(element, options); case "AzureVmWorkloadSAPAseDatabase": return VmWorkloadSapAseDatabaseProtectedItem.DeserializeVmWorkloadSapAseDatabaseProtectedItem(element, options); case "AzureVmWorkloadSAPHanaDatabase": return VmWorkloadSapHanaDatabaseProtectedItem.DeserializeVmWorkloadSapHanaDatabaseProtectedItem(element, options); case "AzureVmWorkloadSAPHanaDBInstance": return VmWorkloadSapHanaDBInstanceProtectedItem.DeserializeVmWorkloadSapHanaDBInstanceProtectedItem(element, options); @@ -164,7 +166,7 @@ internal static VmWorkloadProtectedItem DeserializeVmWorkloadProtectedItem(JsonE IList nodesList = default; string protectedItemType = "AzureVmWorkloadProtectedItem"; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -317,7 +319,7 @@ internal static VmWorkloadProtectedItem DeserializeVmWorkloadProtectedItem(JsonE { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.cs index 2a25a9d43f64..904fbe780563 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectedItem.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Azure VM workload-specific protected item. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , , , and . /// public partial class VmWorkloadProtectedItem : BackupGenericProtectedItem { @@ -61,7 +61,7 @@ public VmWorkloadProtectedItem() /// Additional information for this backup item. /// Health details of different KPIs. /// List of the nodes in case of distributed container. - internal VmWorkloadProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) + internal VmWorkloadProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData) { FriendlyName = friendlyName; ServerName = serverName; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs index 314be63f16bb..1d03f6120e92 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.Serialization.cs @@ -40,6 +40,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("workLoadType"u8); writer.WriteStringValue(WorkLoadType.Value.ToString()); } + if (Optional.IsDefined(VmWorkloadPolicyType)) + { + writer.WritePropertyName("vmWorkloadPolicyType"u8); + writer.WriteStringValue(VmWorkloadPolicyType.Value.ToString()); + } if (Optional.IsDefined(Settings)) { writer.WritePropertyName("settings"u8); @@ -83,6 +88,7 @@ internal static VmWorkloadProtectionPolicy DeserializeVmWorkloadProtectionPolicy return null; } BackupWorkloadType? workLoadType = default; + VmWorkloadPolicyType? vmWorkloadPolicyType = default; BackupCommonSettings settings = default; IList subProtectionPolicy = default; bool? makePolicyConsistent = default; @@ -102,6 +108,15 @@ internal static VmWorkloadProtectionPolicy DeserializeVmWorkloadProtectionPolicy workLoadType = new BackupWorkloadType(property.Value.GetString()); continue; } + if (property.NameEquals("vmWorkloadPolicyType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmWorkloadPolicyType = new VmWorkloadPolicyType(property.Value.GetString()); + continue; + } if (property.NameEquals("settings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -174,6 +189,7 @@ internal static VmWorkloadProtectionPolicy DeserializeVmWorkloadProtectionPolicy resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, workLoadType, + vmWorkloadPolicyType, settings, subProtectionPolicy ?? new ChangeTrackingList(), makePolicyConsistent); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.cs index a79040e4f4dd..f5b4ed413080 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadProtectionPolicy.cs @@ -26,12 +26,14 @@ public VmWorkloadProtectionPolicy() /// ResourceGuard Operation Requests. /// Keeps track of any properties unknown to the library. /// Type of workload for the backup management. + /// Type of workload for the backup management. /// Common settings for the backup management. /// List of sub-protection policies which includes schedule and retention. /// Fix the policy inconsistency. - internal VmWorkloadProtectionPolicy(int? protectedItemsCount, string backupManagementType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, BackupWorkloadType? workLoadType, BackupCommonSettings settings, IList subProtectionPolicy, bool? doesMakePolicyConsistent) : base(protectedItemsCount, backupManagementType, resourceGuardOperationRequests, serializedAdditionalRawData) + internal VmWorkloadProtectionPolicy(int? protectedItemsCount, string backupManagementType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, BackupWorkloadType? workLoadType, VmWorkloadPolicyType? vmWorkloadPolicyType, BackupCommonSettings settings, IList subProtectionPolicy, bool? doesMakePolicyConsistent) : base(protectedItemsCount, backupManagementType, resourceGuardOperationRequests, serializedAdditionalRawData) { WorkLoadType = workLoadType; + VmWorkloadPolicyType = vmWorkloadPolicyType; Settings = settings; SubProtectionPolicy = subProtectionPolicy; DoesMakePolicyConsistent = doesMakePolicyConsistent; @@ -40,6 +42,8 @@ internal VmWorkloadProtectionPolicy(int? protectedItemsCount, string backupManag /// Type of workload for the backup management. public BackupWorkloadType? WorkLoadType { get; set; } + /// Type of workload for the backup management. + public VmWorkloadPolicyType? VmWorkloadPolicyType { get; set; } /// Common settings for the backup management. public BackupCommonSettings Settings { get; set; } /// List of sub-protection policies which includes schedule and retention. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs index fa32566835a9..cc3d7621f9f8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.Serialization.cs @@ -73,7 +73,7 @@ internal static VmWorkloadSapAseDatabaseProtectedItem DeserializeVmWorkloadSapAs IList nodesList = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -226,7 +226,7 @@ internal static VmWorkloadSapAseDatabaseProtectedItem DeserializeVmWorkloadSapAs { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.cs index c604f8cc54d5..d04a8be7ae40 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapAseDatabaseProtectedItem.cs @@ -55,7 +55,7 @@ public VmWorkloadSapAseDatabaseProtectedItem() /// Additional information for this backup item. /// Health details of different KPIs. /// List of the nodes in case of distributed container. - internal VmWorkloadSapAseDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) + internal VmWorkloadSapAseDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) { ProtectedItemType = protectedItemType ?? "AzureVmWorkloadSAPAseDatabase"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs index 4a668bea3fff..63c9886e9603 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.Serialization.cs @@ -73,7 +73,7 @@ internal static VmWorkloadSapHanaDBInstanceProtectedItem DeserializeVmWorkloadSa IList nodesList = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -226,7 +226,7 @@ internal static VmWorkloadSapHanaDBInstanceProtectedItem DeserializeVmWorkloadSa { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.cs index 0f5ed0d0123f..eb359579cd2e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDBInstanceProtectedItem.cs @@ -55,7 +55,7 @@ public VmWorkloadSapHanaDBInstanceProtectedItem() /// Additional information for this backup item. /// Health details of different KPIs. /// List of the nodes in case of distributed container. - internal VmWorkloadSapHanaDBInstanceProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) + internal VmWorkloadSapHanaDBInstanceProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) { ProtectedItemType = protectedItemType ?? "AzureVmWorkloadSAPHanaDBInstance"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs index 0ca3dbb68520..4639d049a2d0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.Serialization.cs @@ -73,7 +73,7 @@ internal static VmWorkloadSapHanaDatabaseProtectedItem DeserializeVmWorkloadSapH IList nodesList = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -226,7 +226,7 @@ internal static VmWorkloadSapHanaDatabaseProtectedItem DeserializeVmWorkloadSapH { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.cs index 98e2de1989f0..077af5b48184 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSapHanaDatabaseProtectedItem.cs @@ -55,7 +55,7 @@ public VmWorkloadSapHanaDatabaseProtectedItem() /// Additional information for this backup item. /// Health details of different KPIs. /// List of the nodes in case of distributed container. - internal VmWorkloadSapHanaDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) + internal VmWorkloadSapHanaDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) { ProtectedItemType = protectedItemType ?? "AzureVmWorkloadSAPHanaDatabase"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs index b5303e5ff2ba..4fb27315346a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.Serialization.cs @@ -73,7 +73,7 @@ internal static VmWorkloadSqlDatabaseProtectedItem DeserializeVmWorkloadSqlDatab IList nodesList = default; string protectedItemType = default; BackupManagementType? backupManagementType = default; - BackupDataSourceType? workloadType = default; + DataSourceTypeAutoGenerated3? workloadType = default; string containerName = default; ResourceIdentifier sourceResourceId = default; ResourceIdentifier policyId = default; @@ -226,7 +226,7 @@ internal static VmWorkloadSqlDatabaseProtectedItem DeserializeVmWorkloadSqlDatab { continue; } - workloadType = new BackupDataSourceType(property.Value.GetString()); + workloadType = new DataSourceTypeAutoGenerated3(property.Value.GetString()); continue; } if (property.NameEquals("containerName"u8)) diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.cs index e761ba7474fa..fc8bb8693195 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/VmWorkloadSqlDatabaseProtectedItem.cs @@ -55,7 +55,7 @@ public VmWorkloadSqlDatabaseProtectedItem() /// Additional information for this backup item. /// Health details of different KPIs. /// List of the nodes in case of distributed container. - internal VmWorkloadSqlDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, BackupDataSourceType? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) + internal VmWorkloadSqlDatabaseProtectedItem(string protectedItemType, BackupManagementType? backupManagementType, DataSourceTypeAutoGenerated3? workloadType, string containerName, ResourceIdentifier sourceResourceId, ResourceIdentifier policyId, DateTimeOffset? lastRecoverOn, string backupSetName, BackupCreateMode? createMode, DateTimeOffset? deferredDeletedOn, bool? isScheduledForDeferredDelete, string deferredDeleteTimeRemaining, bool? isDeferredDeleteScheduleUpcoming, bool? isRehydrate, IList resourceGuardOperationRequests, bool? isArchiveEnabled, string policyName, int? softDeleteRetentionPeriodInDays, string vaultId, IDictionary serializedAdditionalRawData, string friendlyName, string serverName, string parentName, string parentType, string protectionStatus, BackupProtectionState? protectionState, LastBackupStatus? lastBackupStatus, DateTimeOffset? lastBackupOn, BackupErrorDetail lastBackupErrorDetail, string protectedItemDataSourceId, VmWorkloadProtectedItemHealthStatus? protectedItemHealthStatus, VmWorkloadProtectedItemExtendedInfo extendedInfo, IDictionary kpisHealths, IList nodesList) : base(protectedItemType, backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoverOn, backupSetName, createMode, deferredDeletedOn, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, isArchiveEnabled, policyName, softDeleteRetentionPeriodInDays, vaultId, serializedAdditionalRawData, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupOn, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths, nodesList) { ProtectedItemType = protectedItemType ?? "AzureVmWorkloadSQLDatabase"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs index 07d7f6e911b2..e78a2b7c4d09 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.Serialization.cs @@ -97,7 +97,9 @@ internal static WorkloadItem DeserializeWorkloadItem(JsonElement element, ModelR { switch (discriminator.GetString()) { + case "AnyDataBase": return AzureVmWorkloadAnyDatabaseWorkloadItem.DeserializeAzureVmWorkloadAnyDatabaseWorkloadItem(element, options); case "AzureVmWorkloadItem": return VmWorkloadItem.DeserializeVmWorkloadItem(element, options); + case "OracleDataBase": return AzureVmWorkloadOracleDatabaseWorkloadItem.DeserializeAzureVmWorkloadOracleDatabaseWorkloadItem(element, options); case "SAPAseDatabase": return VmWorkloadSapAseDatabaseWorkloadItem.DeserializeVmWorkloadSapAseDatabaseWorkloadItem(element, options); case "SAPAseSystem": return VmWorkloadSapAseSystemWorkloadItem.DeserializeVmWorkloadSapAseSystemWorkloadItem(element, options); case "SAPHanaDatabase": return VmWorkloadSapHanaDatabaseWorkloadItem.DeserializeVmWorkloadSapHanaDatabaseWorkloadItem(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.cs index b32aa5ae44e1..c46b4e8b5eb8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItem.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Base class for backup item. Workload-specific backup items are derived from this class. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// The available derived classes include , , , , , , , and . /// public abstract partial class WorkloadItem { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.cs index 1ba76d59108c..523f2c5e0d00 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemResource.cs @@ -63,7 +63,7 @@ public WorkloadItemResource(AzureLocation location) : base(location) /// /// WorkloadItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// The available derived classes include , , , , , , , and . /// /// Optional ETag. /// Keeps track of any properties unknown to the library. @@ -82,7 +82,7 @@ internal WorkloadItemResource() /// /// WorkloadItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// The available derived classes include , , , , , , , and . /// public WorkloadItem Properties { get; set; } /// Optional ETag. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemType.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemType.cs index 8d6beb7c6072..1b56f4ab8dc6 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemType.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadItemType.cs @@ -30,6 +30,10 @@ public WorkloadItemType(string value) private const string SapAseSystemValue = "SAPAseSystem"; private const string SapAseDatabaseValue = "SAPAseDatabase"; private const string SapHanaDBInstanceValue = "SAPHanaDBInstance"; + private const string OracleSystemValue = "OracleSystem"; + private const string OracleDatabaseValue = "OracleDatabase"; + private const string AnyDBSystemValue = "AnyDBSystem"; + private const string AnyDatabaseValue = "AnyDatabase"; /// Invalid. public static WorkloadItemType Invalid { get; } = new WorkloadItemType(InvalidValue); @@ -47,6 +51,14 @@ public WorkloadItemType(string value) public static WorkloadItemType SapAseDatabase { get; } = new WorkloadItemType(SapAseDatabaseValue); /// SAPHanaDBInstance. public static WorkloadItemType SapHanaDBInstance { get; } = new WorkloadItemType(SapHanaDBInstanceValue); + /// OracleSystem. + public static WorkloadItemType OracleSystem { get; } = new WorkloadItemType(OracleSystemValue); + /// OracleDatabase. + public static WorkloadItemType OracleDatabase { get; } = new WorkloadItemType(OracleDatabaseValue); + /// AnyDBSystem. + public static WorkloadItemType AnyDBSystem { get; } = new WorkloadItemType(AnyDBSystemValue); + /// AnyDatabase. + public static WorkloadItemType AnyDatabase { get; } = new WorkloadItemType(AnyDatabaseValue); /// Determines if two values are the same. public static bool operator ==(WorkloadItemType left, WorkloadItemType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs index 4e7c12200528..00851baba295 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.Serialization.cs @@ -71,6 +71,9 @@ internal static WorkloadPointInTimeRecoveryPoint DeserializeWorkloadPointInTimeR { switch (discriminator.GetString()) { + case "AzureWorkloadAnyDatabasePointInTimeRecoveryPoint": return AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.DeserializeAzureWorkloadAnyDatabasePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadOraclePointInTimeRecoveryPoint": return AzureWorkloadOraclePointInTimeRecoveryPoint.DeserializeAzureWorkloadOraclePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadSAPAsePointInTimeRecoveryPoint": return AzureWorkloadSapAsePointInTimeRecoveryPoint.DeserializeAzureWorkloadSapAsePointInTimeRecoveryPoint(element, options); case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": return WorkloadSapHanaPointInTimeRecoveryPoint.DeserializeWorkloadSapHanaPointInTimeRecoveryPoint(element, options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.cs index 7c40a7e936cd..61b68a96ea8a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRecoveryPoint.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Recovery point specific to PointInTime /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// The available derived classes include , , and . /// public partial class WorkloadPointInTimeRecoveryPoint : WorkloadRecoveryPoint { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs index 8fed864d5610..7775f557ad59 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.Serialization.cs @@ -73,6 +73,7 @@ internal static WorkloadPointInTimeRestoreContent DeserializeWorkloadPointInTime SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = default; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -173,6 +174,20 @@ internal static WorkloadPointInTimeRestoreContent DeserializeWorkloadPointInTime objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -181,6 +196,7 @@ internal static WorkloadPointInTimeRestoreContent DeserializeWorkloadPointInTime serializedAdditionalRawData = rawDataDictionary; return new WorkloadPointInTimeRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.cs index bb9a780679c5..a76f92865ec5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadPointInTimeRestoreContent.cs @@ -22,6 +22,7 @@ public WorkloadPointInTimeRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -42,7 +43,7 @@ public WorkloadPointInTimeRestoreContent() /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// /// PointInTime value. - internal WorkloadPointInTimeRestoreContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + internal WorkloadPointInTimeRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) { PointInTime = pointInTime; ObjectType = objectType ?? "AzureWorkloadPointInTimeRestoreRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs index 4d65e4054dd8..ba70dc27b2fe 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.Serialization.cs @@ -97,12 +97,15 @@ internal static WorkloadProtectableItem DeserializeWorkloadProtectableItem(JsonE { switch (discriminator.GetString()) { + case "AnyDatabase": return AzureVmWorkloadAnyDatabaseProtectableItem.DeserializeAzureVmWorkloadAnyDatabaseProtectableItem(element, options); case "AzureFileShare": return FileShareProtectableItem.DeserializeFileShareProtectableItem(element, options); case "AzureVmWorkloadProtectableItem": return VmWorkloadProtectableItem.DeserializeVmWorkloadProtectableItem(element, options); case "HanaHSRContainer": return VmWorkloadSapHanaHsrProtectableItem.DeserializeVmWorkloadSapHanaHsrProtectableItem(element, options); + case "HanaScaleoutContainer": return AzureVmWorkloadSapHanaScaleoutProtectableItem.DeserializeAzureVmWorkloadSapHanaScaleoutProtectableItem(element, options); case "IaaSVMProtectableItem": return IaasVmProtectableItem.DeserializeIaasVmProtectableItem(element, options); case "Microsoft.ClassicCompute/virtualMachines": return IaasClassicComputeVmProtectableItem.DeserializeIaasClassicComputeVmProtectableItem(element, options); case "Microsoft.Compute/virtualMachines": return IaasComputeVmProtectableItem.DeserializeIaasComputeVmProtectableItem(element, options); + case "OracleDatabase": return AzureVmWorkloadOracleDatabaseProtectableItem.DeserializeAzureVmWorkloadOracleDatabaseProtectableItem(element, options); case "SAPAseSystem": return VmWorkloadSapAseSystemProtectableItem.DeserializeVmWorkloadSapAseSystemProtectableItem(element, options); case "SAPHanaDatabase": return VmWorkloadSapHanaDatabaseProtectableItem.DeserializeVmWorkloadSapHanaDatabaseProtectableItem(element, options); case "SAPHanaDBInstance": return VmWorkloadSapHanaDBInstance.DeserializeVmWorkloadSapHanaDBInstance(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.cs index 6cf0da2f4614..4da4a9fdb60e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItem.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Base class for backup item. Workload-specific backup items are derived from this class. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , and . /// public abstract partial class WorkloadProtectableItem { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.cs index 65ced314288a..607823aa9012 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadProtectableItemResource.cs @@ -63,7 +63,7 @@ public WorkloadProtectableItemResource(AzureLocation location) : base(location) /// /// WorkloadProtectableItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , and . /// /// Optional ETag. /// Keeps track of any properties unknown to the library. @@ -82,7 +82,7 @@ internal WorkloadProtectableItemResource() /// /// WorkloadProtectableItemResource properties /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , and . /// public WorkloadProtectableItem Properties { get; set; } /// Optional ETag. diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs index 9d71b72950af..a84cc4a1d808 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.Serialization.cs @@ -97,7 +97,13 @@ internal static WorkloadRecoveryPoint DeserializeWorkloadRecoveryPoint(JsonEleme { switch (discriminator.GetString()) { + case "AzureWorkloadAnyDatabasePointInTimeRecoveryPoint": return AzureWorkloadAnyDatabasePointInTimeRecoveryPoint.DeserializeAzureWorkloadAnyDatabasePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadAnyDatabaseRecoveryPoint": return AzureWorkloadAnyDatabaseRecoveryPoint.DeserializeAzureWorkloadAnyDatabaseRecoveryPoint(element, options); + case "AzureWorkloadOraclePointInTimeRecoveryPoint": return AzureWorkloadOraclePointInTimeRecoveryPoint.DeserializeAzureWorkloadOraclePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadOracleRecoveryPoint": return AzureWorkloadOracleRecoveryPoint.DeserializeAzureWorkloadOracleRecoveryPoint(element, options); case "AzureWorkloadPointInTimeRecoveryPoint": return WorkloadPointInTimeRecoveryPoint.DeserializeWorkloadPointInTimeRecoveryPoint(element, options); + case "AzureWorkloadSAPAsePointInTimeRecoveryPoint": return AzureWorkloadSapAsePointInTimeRecoveryPoint.DeserializeAzureWorkloadSapAsePointInTimeRecoveryPoint(element, options); + case "AzureWorkloadSAPAseRecoveryPoint": return AzureWorkloadSapAseRecoveryPoint.DeserializeAzureWorkloadSapAseRecoveryPoint(element, options); case "AzureWorkloadSAPHanaPointInTimeRecoveryPoint": return WorkloadSapHanaPointInTimeRecoveryPoint.DeserializeWorkloadSapHanaPointInTimeRecoveryPoint(element, options); case "AzureWorkloadSAPHanaRecoveryPoint": return WorkloadSapHanaRecoveryPoint.DeserializeWorkloadSapHanaRecoveryPoint(element, options); case "AzureWorkloadSQLPointInTimeRecoveryPoint": return WorkloadSqlPointInTimeRecoveryPoint.DeserializeWorkloadSqlPointInTimeRecoveryPoint(element, options); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.cs index b895a2f4cbc1..f9b92dbac8a8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRecoveryPoint.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// Workload specific recovery point, specifically encapsulates full/diff recovery point /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The available derived classes include , , , , , , , , , and . /// public partial class WorkloadRecoveryPoint : BackupGenericRecoveryPoint { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs index 2d6b953e98f8..eb1d5c245a22 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.Serialization.cs @@ -112,7 +112,19 @@ internal static WorkloadRestoreContent DeserializeWorkloadRestoreContent(JsonEle { switch (discriminator.GetString()) { + case "AzureWorkloadAnyDatabasePointInTimeRestoreRequest": return AzureWorkloadAnyDatabasePointInTimeRestoreRequest.DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreRequest(element, options); + case "AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadAnyDatabasePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadAnyDatabaseRestoreRequest": return AzureWorkloadAnyDatabaseRestoreRequest.DeserializeAzureWorkloadAnyDatabaseRestoreRequest(element, options); + case "AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest": return AzureWorkloadAnyDatabaseRestoreWithRehydrateRequest.DeserializeAzureWorkloadAnyDatabaseRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadOraclePointInTimeRestoreRequest": return AzureWorkloadOraclePointInTimeRestoreRequest.DeserializeAzureWorkloadOraclePointInTimeRestoreRequest(element, options); + case "AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadOraclePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadOracleRestoreRequest": return AzureWorkloadOracleRestoreRequest.DeserializeAzureWorkloadOracleRestoreRequest(element, options); + case "AzureWorkloadOracleRestoreWithRehydrateRequest": return AzureWorkloadOracleRestoreWithRehydrateRequest.DeserializeAzureWorkloadOracleRestoreWithRehydrateRequest(element, options); case "AzureWorkloadPointInTimeRestoreRequest": return WorkloadPointInTimeRestoreContent.DeserializeWorkloadPointInTimeRestoreContent(element, options); + case "AzureWorkloadSAPAsePointInTimeRestoreRequest": return AzureWorkloadSapAsePointInTimeRestoreRequest.DeserializeAzureWorkloadSapAsePointInTimeRestoreRequest(element, options); + case "AzureWorkloadSAPAsePointInTimeRestoreWithRehydrateRequest": return AzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest.DeserializeAzureWorkloadSapAsePointInTimeRestoreWithRehydrateRequest(element, options); + case "AzureWorkloadSAPAseRestoreRequest": return AzureWorkloadSapAseRestoreRequest.DeserializeAzureWorkloadSapAseRestoreRequest(element, options); + case "AzureWorkloadSAPAseRestoreWithRehydrateRequest": return AzureWorkloadSapAseRestoreWithRehydrateRequest.DeserializeAzureWorkloadSapAseRestoreWithRehydrateRequest(element, options); case "AzureWorkloadSAPHanaPointInTimeRestoreRequest": return WorkloadSapHanaPointInTimeRestoreContent.DeserializeWorkloadSapHanaPointInTimeRestoreContent(element, options); case "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest": return WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.DeserializeWorkloadSapHanaPointInTimeRestoreWithRehydrateContent(element, options); case "AzureWorkloadSAPHanaRestoreRequest": return WorkloadSapHanaRestoreContent.DeserializeWorkloadSapHanaRestoreContent(element, options); @@ -133,6 +145,7 @@ internal static WorkloadRestoreContent DeserializeWorkloadRestoreContent(JsonEle SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = "AzureWorkloadRestoreRequest"; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -224,6 +237,20 @@ internal static WorkloadRestoreContent DeserializeWorkloadRestoreContent(JsonEle objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -232,6 +259,7 @@ internal static WorkloadRestoreContent DeserializeWorkloadRestoreContent(JsonEle serializedAdditionalRawData = rawDataDictionary; return new WorkloadRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.cs index 428e74b272e0..34d1bd58fc85 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadRestoreContent.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.RecoveryServicesBackup.Models /// /// AzureWorkload-specific restore. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , , , , , and . /// public partial class WorkloadRestoreContent : RestoreContent { @@ -27,6 +27,7 @@ public WorkloadRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -46,7 +47,7 @@ public WorkloadRestoreContent() /// This is the complete ARM Id of the target VM /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// - internal WorkloadRestoreContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId) : base(objectType, serializedAdditionalRawData) + internal WorkloadRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData) { RecoveryType = recoveryType; SourceResourceId = sourceResourceId; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs index 5f2b373b0590..60da0745bbf3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.Serialization.cs @@ -80,6 +80,7 @@ internal static WorkloadSapHanaPointInTimeRestoreContent DeserializeWorkloadSapH SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = "AzureWorkloadSAPHanaPointInTimeRestoreRequest"; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -180,6 +181,20 @@ internal static WorkloadSapHanaPointInTimeRestoreContent DeserializeWorkloadSapH objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -188,6 +203,7 @@ internal static WorkloadSapHanaPointInTimeRestoreContent DeserializeWorkloadSapH serializedAdditionalRawData = rawDataDictionary; return new WorkloadSapHanaPointInTimeRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.cs index 7620a2ded80f..5a6272de170f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreContent.cs @@ -26,6 +26,7 @@ public WorkloadSapHanaPointInTimeRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -46,7 +47,7 @@ public WorkloadSapHanaPointInTimeRestoreContent() /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// /// PointInTime value. - internal WorkloadSapHanaPointInTimeRestoreContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + internal WorkloadSapHanaPointInTimeRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) { PointInTime = pointInTime; ObjectType = objectType ?? "AzureWorkloadSAPHanaPointInTimeRestoreRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs index f38c7ef17e39..f938c2c2d124 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.Serialization.cs @@ -74,6 +74,7 @@ internal static WorkloadSapHanaPointInTimeRestoreWithRehydrateContent Deserializ SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = default; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -183,6 +184,20 @@ internal static WorkloadSapHanaPointInTimeRestoreWithRehydrateContent Deserializ objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -191,6 +206,7 @@ internal static WorkloadSapHanaPointInTimeRestoreWithRehydrateContent Deserializ serializedAdditionalRawData = rawDataDictionary; return new WorkloadSapHanaPointInTimeRestoreWithRehydrateContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.cs index 435b4fe3537c..29adc3dc9e7e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaPointInTimeRestoreWithRehydrateContent.cs @@ -22,6 +22,7 @@ public WorkloadSapHanaPointInTimeRestoreWithRehydrateContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -43,7 +44,7 @@ public WorkloadSapHanaPointInTimeRestoreWithRehydrateContent() /// /// PointInTime value. /// RP Rehydration Info. - internal WorkloadSapHanaPointInTimeRestoreWithRehydrateContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, pointInTime) + internal WorkloadSapHanaPointInTimeRestoreWithRehydrateContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, DateTimeOffset? pointInTime, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, pointInTime) { RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; ObjectType = objectType ?? "AzureWorkloadSAPHanaPointInTimeRestoreWithRehydrateRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs index 01a20ff55db6..64f42f1ece59 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.Serialization.cs @@ -76,6 +76,7 @@ internal static WorkloadSapHanaRestoreContent DeserializeWorkloadSapHanaRestoreC SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = "AzureWorkloadSAPHanaRestoreRequest"; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -167,6 +168,20 @@ internal static WorkloadSapHanaRestoreContent DeserializeWorkloadSapHanaRestoreC objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -175,6 +190,7 @@ internal static WorkloadSapHanaRestoreContent DeserializeWorkloadSapHanaRestoreC serializedAdditionalRawData = rawDataDictionary; return new WorkloadSapHanaRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.cs index b199854a356c..fd18509e48e4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreContent.cs @@ -26,6 +26,7 @@ public WorkloadSapHanaRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -45,7 +46,7 @@ public WorkloadSapHanaRestoreContent() /// This is the complete ARM Id of the target VM /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// - internal WorkloadSapHanaRestoreContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + internal WorkloadSapHanaRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) { ObjectType = objectType ?? "AzureWorkloadSAPHanaRestoreRequest"; } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs index 8ef35e6d8831..48651ac19108 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.Serialization.cs @@ -73,6 +73,7 @@ internal static WorkloadSapHanaRestoreWithRehydrateContent DeserializeWorkloadSa SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = default; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -173,6 +174,20 @@ internal static WorkloadSapHanaRestoreWithRehydrateContent DeserializeWorkloadSa objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -181,6 +196,7 @@ internal static WorkloadSapHanaRestoreWithRehydrateContent DeserializeWorkloadSa serializedAdditionalRawData = rawDataDictionary; return new WorkloadSapHanaRestoreWithRehydrateContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.cs index 3a1432af249b..6891bfa22bb0 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSapHanaRestoreWithRehydrateContent.cs @@ -22,6 +22,7 @@ public WorkloadSapHanaRestoreWithRehydrateContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -42,7 +43,7 @@ public WorkloadSapHanaRestoreWithRehydrateContent() /// For e.g. /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm} /// /// RP Rehydration Info. - internal WorkloadSapHanaRestoreWithRehydrateContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + internal WorkloadSapHanaRestoreWithRehydrateContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) { RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; ObjectType = objectType ?? "AzureWorkloadSAPHanaRestoreWithRehydrateRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs index 949d28223ecf..0ceefdbcc3a5 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.Serialization.cs @@ -83,6 +83,7 @@ internal static WorkloadSqlPointInTimeRestoreContent DeserializeWorkloadSqlPoint SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = "AzureWorkloadSQLPointInTimeRestoreRequest"; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -215,6 +216,20 @@ internal static WorkloadSqlPointInTimeRestoreContent DeserializeWorkloadSqlPoint objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -223,6 +238,7 @@ internal static WorkloadSqlPointInTimeRestoreContent DeserializeWorkloadSqlPoint serializedAdditionalRawData = rawDataDictionary; return new WorkloadSqlPointInTimeRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.cs index 78756b9cf9fd..2b19bbe5dfa4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreContent.cs @@ -26,6 +26,7 @@ public WorkloadSqlPointInTimeRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -49,7 +50,7 @@ public WorkloadSqlPointInTimeRestoreContent() /// SQL specific property where user can chose to set no-recovery when restore operation is tried. /// Data directory details. /// PointInTime value. - internal WorkloadSqlPointInTimeRestoreContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths, DateTimeOffset? pointInTime) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) + internal WorkloadSqlPointInTimeRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths, DateTimeOffset? pointInTime) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) { PointInTime = pointInTime; ObjectType = objectType ?? "AzureWorkloadSQLPointInTimeRestoreRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs index 6268b008b0d2..0992ef38d2e8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.Serialization.cs @@ -77,6 +77,7 @@ internal static WorkloadSqlPointInTimeRestoreWithRehydrateContent DeserializeWor SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = default; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -218,6 +219,20 @@ internal static WorkloadSqlPointInTimeRestoreWithRehydrateContent DeserializeWor objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -226,6 +241,7 @@ internal static WorkloadSqlPointInTimeRestoreWithRehydrateContent DeserializeWor serializedAdditionalRawData = rawDataDictionary; return new WorkloadSqlPointInTimeRestoreWithRehydrateContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.cs index 4854442ea419..1523f37ad894 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlPointInTimeRestoreWithRehydrateContent.cs @@ -22,6 +22,7 @@ public WorkloadSqlPointInTimeRestoreWithRehydrateContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -46,7 +47,7 @@ public WorkloadSqlPointInTimeRestoreWithRehydrateContent() /// Data directory details. /// PointInTime value. /// RP Rehydration Info. - internal WorkloadSqlPointInTimeRestoreWithRehydrateContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths, DateTimeOffset? pointInTime, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths, pointInTime) + internal WorkloadSqlPointInTimeRestoreWithRehydrateContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths, DateTimeOffset? pointInTime, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths, pointInTime) { RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; ObjectType = objectType ?? "AzureWorkloadSQLPointInTimeRestoreWithRehydrateRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs index d25092c5d87a..18c46a7f2f66 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.Serialization.cs @@ -99,6 +99,7 @@ internal static WorkloadSqlRestoreContent DeserializeWorkloadSqlRestoreContent(J SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = "AzureWorkloadSQLRestoreRequest"; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -222,6 +223,20 @@ internal static WorkloadSqlRestoreContent DeserializeWorkloadSqlRestoreContent(J objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -230,6 +245,7 @@ internal static WorkloadSqlRestoreContent DeserializeWorkloadSqlRestoreContent(J serializedAdditionalRawData = rawDataDictionary; return new WorkloadSqlRestoreContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.cs index 04a1870bcf00..bac448824b87 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreContent.cs @@ -27,6 +27,7 @@ public WorkloadSqlRestoreContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -49,7 +50,7 @@ public WorkloadSqlRestoreContent() /// Default option set to true. If this is set to false, alternate data directory must be provided. /// SQL specific property where user can chose to set no-recovery when restore operation is tried. /// Data directory details. - internal WorkloadSqlRestoreContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) + internal WorkloadSqlRestoreContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId) { ShouldUseAlternateTargetLocation = shouldUseAlternateTargetLocation; IsNonRecoverable = isNonRecoverable; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs index 736990ecfaa8..4d797fc6b499 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.Serialization.cs @@ -76,6 +76,7 @@ internal static WorkloadSqlRestoreWithRehydrateContent DeserializeWorkloadSqlRes SnapshotRestoreContent snapshotRestoreParameters = default; ResourceIdentifier targetVirtualMachineId = default; string objectType = default; + IList resourceGuardOperationRequests = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -208,6 +209,20 @@ internal static WorkloadSqlRestoreWithRehydrateContent DeserializeWorkloadSqlRes objectType = property.Value.GetString(); continue; } + if (property.NameEquals("resourceGuardOperationRequests"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + resourceGuardOperationRequests = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -216,6 +231,7 @@ internal static WorkloadSqlRestoreWithRehydrateContent DeserializeWorkloadSqlRes serializedAdditionalRawData = rawDataDictionary; return new WorkloadSqlRestoreWithRehydrateContent( objectType, + resourceGuardOperationRequests ?? new ChangeTrackingList(), serializedAdditionalRawData, recoveryType, sourceResourceId, diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.cs index dcbec82206d4..be3b2f7ec6ff 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/Models/WorkloadSqlRestoreWithRehydrateContent.cs @@ -22,6 +22,7 @@ public WorkloadSqlRestoreWithRehydrateContent() /// Initializes a new instance of . /// This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + /// ResourceGuardOperationRequests on which LAC check will be performed. /// Keeps track of any properties unknown to the library. /// Type of this recovery. /// Fully qualified ARM ID of the VM on which workload that was running is being recovered. @@ -45,7 +46,7 @@ public WorkloadSqlRestoreWithRehydrateContent() /// SQL specific property where user can chose to set no-recovery when restore operation is tried. /// Data directory details. /// RP Rehydration Info. - internal WorkloadSqlRestoreWithRehydrateContent(string objectType, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) + internal WorkloadSqlRestoreWithRehydrateContent(string objectType, IList resourceGuardOperationRequests, IDictionary serializedAdditionalRawData, FileShareRecoveryType? recoveryType, ResourceIdentifier sourceResourceId, IDictionary propertyBag, TargetRestoreInfo targetInfo, RecoveryMode? recoveryMode, string targetResourceGroupName, UserAssignedManagedIdentityDetails userAssignedManagedIdentityDetails, SnapshotRestoreContent snapshotRestoreParameters, ResourceIdentifier targetVirtualMachineId, bool? shouldUseAlternateTargetLocation, bool? isNonRecoverable, IList alternateDirectoryPaths, RecoveryPointRehydrationInfo recoveryPointRehydrationInfo) : base(objectType, resourceGuardOperationRequests, serializedAdditionalRawData, recoveryType, sourceResourceId, propertyBag, targetInfo, recoveryMode, targetResourceGroupName, userAssignedManagedIdentityDetails, snapshotRestoreParameters, targetVirtualMachineId, shouldUseAlternateTargetLocation, isNonRecoverable, alternateDirectoryPaths) { RecoveryPointRehydrationInfo = recoveryPointRehydrationInfo; ObjectType = objectType ?? "AzureWorkloadSQLRestoreWithRehydrateRequest"; diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyCollection.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyCollection.cs index 045a776b51dd..fe574673d606 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyCollection.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyCollection.cs @@ -71,7 +71,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -123,7 +123,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -174,7 +174,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Get(string resourceGuardProx /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -294,7 +294,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string resourceGuardProxyN /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string resourceGuardProxyName, Cancellation /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.cs index 5bc6a4f940d9..39129e705ccc 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> UnlockDeleteAsync(Unlock /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual Response UnlockDelete(UnlockDeleteContent con /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -511,7 +511,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -568,7 +568,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -624,7 +624,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -680,7 +680,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource @@ -735,7 +735,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-06-01 + /// 2024-11-01-preview /// /// /// Resource diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupEnginesRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupEnginesRestOperations.cs index 063b5b9f1a32..d6e2c435084d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupEnginesRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupEnginesRestOperations.cs @@ -32,7 +32,7 @@ public BackupEnginesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupJobsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupJobsRestOperations.cs index be32148d8f63..5d34979a5680 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupJobsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupJobsRestOperations.cs @@ -32,7 +32,7 @@ public BackupJobsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupPoliciesRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupPoliciesRestOperations.cs index 87cbdcdcd0f0..10516593fd46 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupPoliciesRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public BackupPoliciesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectableItemsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectableItemsRestOperations.cs index a1398a2e27fe..ac683f96c069 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectableItemsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectableItemsRestOperations.cs @@ -32,7 +32,7 @@ public BackupProtectableItemsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectedItemsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectedItemsRestOperations.cs index e085497c9018..94c3c6dffd77 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectedItemsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectedItemsRestOperations.cs @@ -32,7 +32,7 @@ public BackupProtectedItemsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionContainersRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionContainersRestOperations.cs index 5841c78e051f..9bd8e6b32143 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionContainersRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionContainersRestOperations.cs @@ -32,7 +32,7 @@ public BackupProtectionContainersRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionIntentRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionIntentRestOperations.cs index 2a062db386b4..7e8e28f6c828 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionIntentRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupProtectionIntentRestOperations.cs @@ -32,7 +32,7 @@ public BackupProtectionIntentRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceEncryptionConfigsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceEncryptionConfigsRestOperations.cs index a18d64710b6e..3a94909fe7de 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceEncryptionConfigsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceEncryptionConfigsRestOperations.cs @@ -32,7 +32,7 @@ public BackupResourceEncryptionConfigsRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceStorageConfigsNonCRRRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceStorageConfigsNonCRRRestOperations.cs index df35b09b585d..89bbf61575e4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceStorageConfigsNonCRRRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceStorageConfigsNonCRRRestOperations.cs @@ -31,7 +31,7 @@ public BackupResourceStorageConfigsNonCRRRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceVaultConfigsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceVaultConfigsRestOperations.cs index 6069f7aab16e..6348221de72c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceVaultConfigsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupResourceVaultConfigsRestOperations.cs @@ -31,7 +31,7 @@ public BackupResourceVaultConfigsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -133,7 +133,7 @@ public Response Get(string subscriptionId, string } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -148,7 +148,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -164,6 +164,10 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/backupconfig/vaultconfig", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsAuthorizationAuxiliary != null) + { + request.Headers.Add("x-ms-authorization-auxiliary", xMsAuthorizationAuxiliary); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -178,17 +182,18 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The name of the resource group where the recovery services vault is present. /// The name of the recovery services vault. /// resource config request. + /// The to use. /// 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, BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, 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 = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, data, xMsAuthorizationAuxiliary); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -209,17 +214,18 @@ public async Task> UpdateAsync(string su /// The name of the resource group where the recovery services vault is present. /// The name of the recovery services vault. /// resource config request. + /// The to use. /// 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, BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, 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 = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, data, xMsAuthorizationAuxiliary); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -235,7 +241,7 @@ public Response Update(string subscriptionId, str } } - internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data) + internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,7 +256,7 @@ internal RequestUriBuilder CreatePutRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data) + internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -266,6 +272,10 @@ internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGrou uri.AppendPath("/backupconfig/vaultconfig", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsAuthorizationAuxiliary != null) + { + request.Headers.Add("x-ms-authorization-auxiliary", xMsAuthorizationAuxiliary); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -280,17 +290,18 @@ internal HttpMessage CreatePutRequest(string subscriptionId, string resourceGrou /// The name of the resource group where the recovery services vault is present. /// The name of the recovery services vault. /// resource config request. + /// The to use. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> PutAsync(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public async Task> PutAsync(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, 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 = CreatePutRequest(subscriptionId, resourceGroupName, vaultName, data); + using var message = CreatePutRequest(subscriptionId, resourceGroupName, vaultName, data, xMsAuthorizationAuxiliary); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -311,17 +322,18 @@ public async Task> PutAsync(string subsc /// The name of the resource group where the recovery services vault is present. /// The name of the recovery services vault. /// resource config request. + /// The to use. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Put(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, CancellationToken cancellationToken = default) + public Response Put(string subscriptionId, string resourceGroupName, string vaultName, BackupResourceVaultConfigData data, string xMsAuthorizationAuxiliary = null, 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 = CreatePutRequest(subscriptionId, resourceGroupName, vaultName, data); + using var message = CreatePutRequest(subscriptionId, resourceGroupName, vaultName, data, xMsAuthorizationAuxiliary); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupStatusRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupStatusRestOperations.cs index 9873e17d3099..c848df80036b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupStatusRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupStatusRestOperations.cs @@ -32,7 +32,7 @@ public BackupStatusRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupUsageSummariesRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupUsageSummariesRestOperations.cs index 126e83411cb6..c717f1a53907 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupUsageSummariesRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupUsageSummariesRestOperations.cs @@ -32,7 +32,7 @@ public BackupUsageSummariesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupWorkloadItemsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupWorkloadItemsRestOperations.cs index 2cd7be874a72..1245c3430663 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupWorkloadItemsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupWorkloadItemsRestOperations.cs @@ -32,7 +32,7 @@ public BackupWorkloadItemsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupsRestOperations.cs index 904c55a2d654..8672300a0265 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/BackupsRestOperations.cs @@ -31,7 +31,7 @@ public BackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/DeletedProtectionContainersRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/DeletedProtectionContainersRestOperations.cs index 02a5be11790e..8a94c4d9c3b6 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/DeletedProtectionContainersRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/DeletedProtectionContainersRestOperations.cs @@ -32,7 +32,7 @@ public DeletedProtectionContainersRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FeatureSupportRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FeatureSupportRestOperations.cs index f7af279608fa..b8a4785dd242 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FeatureSupportRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FeatureSupportRestOperations.cs @@ -32,7 +32,7 @@ public FeatureSupportRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FetchTieringCostRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FetchTieringCostRestOperations.cs index cc02fdb9f62b..eabd27c94929 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FetchTieringCostRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/FetchTieringCostRestOperations.cs @@ -31,7 +31,7 @@ public FetchTieringCostRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/GetTieringCostOperationResultRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/GetTieringCostOperationResultRestOperations.cs index f5b8121c54a0..ff75c4dc71e8 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/GetTieringCostOperationResultRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/GetTieringCostOperationResultRestOperations.cs @@ -32,7 +32,7 @@ public GetTieringCostOperationResultRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ItemLevelRecoveryConnectionsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ItemLevelRecoveryConnectionsRestOperations.cs index 79c403956db2..a819acf35af2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ItemLevelRecoveryConnectionsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ItemLevelRecoveryConnectionsRestOperations.cs @@ -31,7 +31,7 @@ public ItemLevelRecoveryConnectionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobCancellationsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobCancellationsRestOperations.cs index 08d89f259d7c..6ac7fb4d0ad3 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobCancellationsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobCancellationsRestOperations.cs @@ -30,7 +30,7 @@ public JobCancellationsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobDetailsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobDetailsRestOperations.cs index 4139ca4351c1..1a81b0bb4a8d 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobDetailsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobDetailsRestOperations.cs @@ -31,7 +31,7 @@ public JobDetailsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobsRestOperations.cs index d76f600f8284..9b7563518fa4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/JobsRestOperations.cs @@ -30,7 +30,7 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs index 0c6d7dff81c5..f632d3bf0e42 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs @@ -31,7 +31,7 @@ public PrivateEndpointConnectionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectableContainersRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectableContainersRestOperations.cs index 44df383f2e4b..99001b2c263f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectableContainersRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectableContainersRestOperations.cs @@ -32,7 +32,7 @@ public ProtectableContainersRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectedItemsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectedItemsRestOperations.cs index af393563704d..cb8b1fd3ed4e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectedItemsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectedItemsRestOperations.cs @@ -31,7 +31,7 @@ public ProtectedItemsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -171,7 +171,7 @@ public Response Get(string subscriptionId, string resou } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data, string xMsAuthorizationAuxiliary) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -191,7 +191,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data, string xMsAuthorizationAuxiliary) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -212,6 +212,10 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(protectedItemName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsAuthorizationAuxiliary != null) + { + request.Headers.Add("x-ms-authorization-auxiliary", xMsAuthorizationAuxiliary); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -232,10 +236,11 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// Container name associated with the backup item. /// Item name to be backed up. /// resource backed up item. + /// The to use. /// The cancellation token to use. /// , , , , , or is null. /// , , , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -245,7 +250,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, data, xMsAuthorizationAuxiliary); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -268,10 +273,11 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// Container name associated with the backup item. /// Item name to be backed up. /// resource backed up item. + /// The to use. /// The cancellation token to use. /// , , , , , or is null. /// , , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, BackupProtectedItemData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -281,7 +287,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, data, xMsAuthorizationAuxiliary); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionContainersRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionContainersRestOperations.cs index f6ae130bdb69..443e5f71291c 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionContainersRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionContainersRestOperations.cs @@ -31,7 +31,7 @@ public ProtectionContainersRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionIntentRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionIntentRestOperations.cs index 303ef7d762fa..3b6d652b9151 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionIntentRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionIntentRestOperations.cs @@ -32,7 +32,7 @@ public ProtectionIntentRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionPoliciesRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionPoliciesRestOperations.cs index 57224ffc8f92..51cc6a43e681 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionPoliciesRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ProtectionPoliciesRestOperations.cs @@ -31,7 +31,7 @@ public ProtectionPoliciesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -145,7 +145,7 @@ public Response Get(string subscriptionId, string re } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -161,7 +161,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -178,6 +178,10 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(policyName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsAuthorizationAuxiliary != null) + { + request.Headers.Add("x-ms-authorization-auxiliary", xMsAuthorizationAuxiliary); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -196,10 +200,11 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The name of the recovery services vault. /// Backup policy to be created. /// resource backup policy. + /// The to use. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -207,7 +212,7 @@ public async Task> CreateOrUpdateAsync(stri Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data, xMsAuthorizationAuxiliary); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -234,10 +239,11 @@ public async Task> CreateOrUpdateAsync(stri /// The name of the recovery services vault. /// Backup policy to be created. /// resource backup policy. + /// The to use. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string vaultName, string policyName, BackupProtectionPolicyData data, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -245,7 +251,7 @@ public Response CreateOrUpdate(string subscriptionId Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data, xMsAuthorizationAuxiliary); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRecommendedForMoveRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRecommendedForMoveRestOperations.cs index 3caa4d4f6a10..2cc85da887ca 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRecommendedForMoveRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRecommendedForMoveRestOperations.cs @@ -32,7 +32,7 @@ public RecoveryPointsRecommendedForMoveRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRestOperations.cs index 7cb524213ef6..ee4209f6cb5f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryPointsRestOperations.cs @@ -32,7 +32,7 @@ public RecoveryPointsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -298,6 +298,138 @@ public Response Get(string subscriptionId, string resou } } + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, BackupRecoveryPointPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.RecoveryServices/vaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/backupFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/protectionContainers/", false); + uri.AppendPath(containerName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints/", false); + uri.AppendPath(recoveryPointId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, BackupRecoveryPointPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.RecoveryServices/vaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/backupFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/protectionContainers/", false); + uri.AppendPath(containerName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints/", false); + uri.AppendPath(recoveryPointId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// UpdateRecoveryPoint to update recovery point for given RecoveryPointID. + /// The subscription Id. + /// The name of the resource group. The name is case insensitive. + /// The name of the recovery services vault. + /// Fabric name associated with backed up item. + /// Container name associated with backed up item. + /// Backed up item name whose backup data needs to be fetched. + /// RecoveryPointID represents the backed up data to be fetched. + /// Request body for operation. + /// 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, string fabricName, string containerName, string protectedItemName, string recoveryPointId, BackupRecoveryPointPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(recoveryPointId, nameof(recoveryPointId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BackupRecoveryPointData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BackupRecoveryPointData.DeserializeBackupRecoveryPointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// UpdateRecoveryPoint to update recovery point for given RecoveryPointID. + /// The subscription Id. + /// The name of the resource group. The name is case insensitive. + /// The name of the recovery services vault. + /// Fabric name associated with backed up item. + /// Container name associated with backed up item. + /// Backed up item name whose backup data needs to be fetched. + /// RecoveryPointID represents the backed up data to be fetched. + /// Request body for operation. + /// 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, string fabricName, string containerName, string protectedItemName, string recoveryPointId, BackupRecoveryPointPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(recoveryPointId, nameof(recoveryPointId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BackupRecoveryPointData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BackupRecoveryPointData.DeserializeBackupRecoveryPointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string filter) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryServicesBackupRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryServicesBackupRestOperations.cs index 7a63e60980ad..eee81ac78f4b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryServicesBackupRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RecoveryServicesBackupRestOperations.cs @@ -31,7 +31,7 @@ public RecoveryServicesBackupRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ResourceGuardProxyRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ResourceGuardProxyRestOperations.cs index 8ee7a5a442e6..304859e3617a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ResourceGuardProxyRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/ResourceGuardProxyRestOperations.cs @@ -32,7 +32,7 @@ public ResourceGuardProxyRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RestoresRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RestoresRestOperations.cs index 8babebfb08fd..c66ba74796d2 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RestoresRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/RestoresRestOperations.cs @@ -31,11 +31,11 @@ public RestoresRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateTriggerRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content) + internal RequestUriBuilder CreateTriggerRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content, string xMsAuthorizationAuxiliary) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -58,7 +58,7 @@ internal RequestUriBuilder CreateTriggerRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateTriggerRequest(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content) + internal HttpMessage CreateTriggerRequest(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content, string xMsAuthorizationAuxiliary) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -82,6 +82,10 @@ internal HttpMessage CreateTriggerRequest(string subscriptionId, string resource uri.AppendPath("/restore", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsAuthorizationAuxiliary != null) + { + request.Headers.Add("x-ms-authorization-auxiliary", xMsAuthorizationAuxiliary); + } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content0 = new Utf8JsonRequestContent(); @@ -103,10 +107,11 @@ internal HttpMessage CreateTriggerRequest(string subscriptionId, string resource /// Backed up item to be restored. /// Recovery point ID which represents the backed up data to be restored. /// resource restore request. + /// The to use. /// The cancellation token to use. /// , , , , , , or is null. /// , , , , , or is an empty string, and was expected to be non-empty. - public async Task TriggerAsync(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content, CancellationToken cancellationToken = default) + public async Task TriggerAsync(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -117,7 +122,7 @@ public async Task TriggerAsync(string subscriptionId, string resourceG Argument.AssertNotNullOrEmpty(recoveryPointId, nameof(recoveryPointId)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateTriggerRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, content); + using var message = CreateTriggerRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, content, xMsAuthorizationAuxiliary); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -140,10 +145,11 @@ public async Task TriggerAsync(string subscriptionId, string resourceG /// Backed up item to be restored. /// Recovery point ID which represents the backed up data to be restored. /// resource restore request. + /// The to use. /// The cancellation token to use. /// , , , , , , or is null. /// , , , , , or is an empty string, and was expected to be non-empty. - public Response Trigger(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content, CancellationToken cancellationToken = default) + public Response Trigger(string subscriptionId, string resourceGroupName, string vaultName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, TriggerRestoreContent content, string xMsAuthorizationAuxiliary = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -154,7 +160,7 @@ public Response Trigger(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(recoveryPointId, nameof(recoveryPointId)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateTriggerRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, content); + using var message = CreateTriggerRequest(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, content, xMsAuthorizationAuxiliary); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/SecurityPINsRestOperations.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/SecurityPINsRestOperations.cs index 9ee5cd44c549..c6b1c6c247d6 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/SecurityPINsRestOperations.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/RestOperations/SecurityPINsRestOperations.cs @@ -32,11 +32,11 @@ public SecurityPINsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01"; + _apiVersion = apiVersion ?? "2024-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, SecurityPinContent content) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, SecurityPinContent content, string xMsAuthorizationAuxiliary) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, SecurityPinContent content) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, SecurityPinContent content, string xMsAuthorizationAuxiliary) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -67,6 +67,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/backupSecurityPIN", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsAuthorizationAuxiliary != null) + { + request.Headers.Add("x-ms-authorization-auxiliary", xMsAuthorizationAuxiliary); + } request.Headers.Add("Accept", "application/json"); if (content != null) { @@ -84,16 +88,17 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The name of the resource group where the recovery services vault is present. /// The name of the recovery services vault. /// security pin request. + /// The to use. /// 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, SecurityPinContent content = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, SecurityPinContent content = null, string xMsAuthorizationAuxiliary = null, 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, content); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, content, xMsAuthorizationAuxiliary); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -114,16 +119,17 @@ public async Task> GetAsync(string subscriptionId, st /// The name of the resource group where the recovery services vault is present. /// The name of the recovery services vault. /// security pin request. + /// The to use. /// 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, SecurityPinContent content = null, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, SecurityPinContent content = null, string xMsAuthorizationAuxiliary = null, 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, content); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, content, xMsAuthorizationAuxiliary); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md index bf855ffd7656..890e76778a46 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md @@ -9,7 +9,7 @@ csharp: true library-name: RecoveryServicesBackup namespace: Azure.ResourceManager.RecoveryServicesBackup # tag: package-2023-06 -require: https://github.com/Azure/azure-rest-api-specs/blob/ec238f30bd6d4a0681b691908fe00b54868467de/specification/recoveryservicesbackup/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/