From a7d0162ed07860be1cd0bd07d96a594cadd4870f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 19 Jun 2023 12:13:05 +0000 Subject: [PATCH] CodeGen from PR 24011 in Azure/azure-rest-api-specs Merge 8db4cb88c0cabd231688320828add03b8743604b into 29f3116d3ce31f2125d1e2cfb92d6511fcb01c41 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 297 ++++- .../pom.xml | 10 +- .../dataprotection/DataProtectionManager.java | 22 +- .../fluent/DataProtectionClient.java | 10 +- .../fluent/DppResourceGuardProxiesClient.java | 183 +++ .../ResourceGuardProxyBaseResourceInner.java | 57 + .../models/UnlockDeleteResponseInner.java | 50 + .../BackupInstancesClientImpl.java | 76 +- .../BackupPoliciesClientImpl.java | 21 +- ...BackupVaultOperationResultsClientImpl.java | 6 +- .../BackupVaultsClientImpl.java | 33 +- .../DataProtectionClientBuilder.java | 5 +- .../DataProtectionClientImpl.java | 23 +- .../DataProtectionsClientImpl.java | 6 +- .../DeletedBackupInstancesClientImpl.java | 16 +- .../DppResourceGuardProxiesClientImpl.java | 1123 +++++++++++++++++ .../DppResourceGuardProxiesImpl.java | 241 ++++ .../implementation/ExportJobsClientImpl.java | 6 +- .../ExportJobsOperationResultsClientImpl.java | 6 +- .../implementation/JobsClientImpl.java | 11 +- .../OperationResultsClientImpl.java | 6 +- ...onStatusBackupVaultContextsClientImpl.java | 6 +- .../OperationStatusClientImpl.java | 6 +- ...StatusResourceGroupContextsClientImpl.java | 6 +- .../RecoveryPointsClientImpl.java | 11 +- .../ResourceGuardProxyBaseResourceImpl.java | 169 +++ .../ResourceGuardsClientImpl.java | 88 +- .../RestorableTimeRangesClientImpl.java | 6 +- .../UnlockDeleteResponseImpl.java | 33 + .../dataprotection/models/AzureBackupJob.java | 15 + ...ackupRecoveryPointBasedRestoreRequest.java | 7 + ...BackupRecoveryTimeBasedRestoreRequest.java | 7 + .../models/AzureBackupRestoreRequest.java | 32 + ...reBackupRestoreWithRehydrationRequest.java | 7 + .../dataprotection/models/BackupInstance.java | 32 + .../dataprotection/models/BackupVault.java | 15 + .../models/BaseResourceProperties.java | 27 + .../models/CrossRegionRestoreSettings.java | 50 + .../models/CrossRegionRestoreState.java | 47 + .../dataprotection/models/Datasource.java | 29 + .../dataprotection/models/DatasourceSet.java | 29 + .../models/DeletedBackupInstance.java | 7 + .../models/DppIdentityDetails.java | 48 +- .../models/DppResourceGuardProxies.java | 183 +++ .../models/FeatureSettings.java | 29 + .../models/IdentityDetails.java | 76 ++ ...etesClusterBackupDatasourceParameters.java | 74 +- .../KubernetesClusterRestoreCriteria.java | 32 + .../models/NamespacedNameResource.java | 80 ++ .../models/ResourceGuardOperationDetail.java | 76 ++ .../models/ResourceGuardProxyBase.java | 133 ++ .../ResourceGuardProxyBaseResource.java | 188 +++ .../ResourceGuardProxyBaseResourceList.java | 64 + .../models/ScheduleBasedBackupCriteria.java | 10 +- .../models/SecureScoreLevel.java | 56 + .../models/UnlockDeleteRequest.java | 77 ++ .../models/UnlockDeleteResponse.java | 24 + .../models/UserAssignedIdentityDetails.java | 54 + .../BackupInstancesAdhocBackupSamples.java | 2 +- .../BackupInstancesCreateOrUpdateSamples.java | 2 +- .../BackupInstancesDeleteSamples.java | 2 +- ...tBackupInstanceOperationResultSamples.java | 2 +- .../generated/BackupInstancesGetSamples.java | 2 +- .../generated/BackupInstancesListSamples.java | 2 +- .../BackupInstancesResumeBackupsSamples.java | 2 +- ...ackupInstancesResumeProtectionSamples.java | 2 +- .../BackupInstancesStopProtectionSamples.java | 2 +- .../BackupInstancesSuspendBackupsSamples.java | 2 +- ...kupInstancesSyncBackupInstanceSamples.java | 2 +- ...ackupInstancesTriggerRehydrateSamples.java | 2 +- .../BackupInstancesTriggerRestoreSamples.java | 6 +- ...ckupInstancesValidateForBackupSamples.java | 2 +- ...kupInstancesValidateForRestoreSamples.java | 2 +- .../BackupPoliciesCreateOrUpdateSamples.java | 2 +- .../BackupPoliciesDeleteSamples.java | 2 +- .../generated/BackupPoliciesGetSamples.java | 2 +- .../generated/BackupPoliciesListSamples.java | 2 +- ...BackupVaultOperationResultsGetSamples.java | 2 +- ...kupVaultsCheckNameAvailabilitySamples.java | 2 +- .../BackupVaultsCreateOrUpdateSamples.java | 34 +- .../generated/BackupVaultsDeleteSamples.java | 2 +- ...BackupVaultsGetByResourceGroupSamples.java | 4 +- ...ackupVaultsListByResourceGroupSamples.java | 2 +- .../generated/BackupVaultsListSamples.java | 2 +- .../generated/BackupVaultsUpdateSamples.java | 2 +- ...aProtectionCheckFeatureSupportSamples.java | 2 +- .../DataProtectionOperationsListSamples.java | 2 +- .../DeletedBackupInstancesGetSamples.java | 2 +- .../DeletedBackupInstancesListSamples.java | 2 +- ...DeletedBackupInstancesUndeleteSamples.java | 2 +- ...sourceGuardProxyCreateOrUpdateSamples.java | 31 + .../DppResourceGuardProxyDeleteSamples.java | 24 + .../DppResourceGuardProxyGetSamples.java | 22 + .../DppResourceGuardProxyListSamples.java | 20 + ...ResourceGuardProxyUnlockDeleteSamples.java | 37 + .../ExportJobsOperationResultGetSamples.java | 2 +- .../generated/ExportJobsTriggerSamples.java | 2 +- .../generated/JobsGetSamples.java | 2 +- .../generated/JobsListSamples.java | 2 +- .../generated/OperationResultGetSamples.java | 2 +- ...ionStatusBackupVaultContextGetSamples.java | 2 +- .../generated/OperationStatusGetSamples.java | 2 +- ...GroupContextGetByResourceGroupSamples.java | 2 +- .../generated/RecoveryPointsGetSamples.java | 2 +- .../generated/RecoveryPointsListSamples.java | 2 +- .../ResourceGuardsDeleteSamples.java | 2 +- ...ckupSecurityPinRequestsObjectsSamples.java | 2 +- ...sourceGuardsGetByResourceGroupSamples.java | 2 +- ...ackupSecurityPinRequestsObjectSamples.java | 2 +- ...eteProtectedItemRequestsObjectSamples.java | 2 +- ...sourceGuardProxyRequestsObjectSamples.java | 2 +- ...isableSoftDeleteRequestsObjectSamples.java | 2 +- ...ateProtectedItemRequestsObjectSamples.java | 2 +- ...ProtectionPolicyRequestsObjectSamples.java | 2 +- ...teProtectedItemRequestsObjectsSamples.java | 2 +- ...ourceGuardProxyRequestsObjectsSamples.java | 2 +- ...sableSoftDeleteRequestsObjectsSamples.java | 2 +- ...teProtectedItemRequestsObjectsSamples.java | 2 +- ...rotectionPolicyRequestsObjectsSamples.java | 2 +- ...ourceGuardsListByResourceGroupSamples.java | 2 +- .../generated/ResourceGuardsListSamples.java | 2 +- .../generated/ResourceGuardsPatchSamples.java | 2 +- .../generated/ResourceGuardsPutSamples.java | 2 +- .../RestorableTimeRangesFindSamples.java | 2 +- 126 files changed, 3970 insertions(+), 373 deletions(-) create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardProxyBaseResourceInner.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreState.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceGuardProxies.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperationDetail.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBase.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResource.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteRequest.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteResponse.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentityDetails.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java create mode 100644 sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md index 699e8a053eff4..119275dfc4d67 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2023-06-19) + +- Azure Resource Manager DataProtection client library for Java. This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md index f1b3268209865..b59bfaa30def7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DataProtection client library for Java. -This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dataprotection - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md index a63e83878af74..569a2d6fa439b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md @@ -54,6 +54,14 @@ - [List](#deletedbackupinstances_list) - [Undelete](#deletedbackupinstances_undelete) +## DppResourceGuardProxy + +- [CreateOrUpdate](#dppresourceguardproxy_createorupdate) +- [Delete](#dppresourceguardproxy_delete) +- [Get](#dppresourceguardproxy_get) +- [List](#dppresourceguardproxy_list) +- [UnlockDelete](#dppresourceguardproxy_unlockdelete) + ## ExportJobs - [Trigger](#exportjobs_trigger) @@ -122,7 +130,7 @@ import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest; /** Samples for BackupInstances AdhocBackup. */ public final class BackupInstancesAdhocBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerBackup.json */ /** * Sample code: Trigger Adhoc Backup. @@ -167,7 +175,7 @@ import java.util.Map; /** Samples for BackupInstances CreateOrUpdate. */ public final class BackupInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/PutBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/PutBackupInstance.json */ /** * Sample code: Create BackupInstance. @@ -246,7 +254,7 @@ public final class BackupInstancesCreateOrUpdateSamples { /** Samples for BackupInstances Delete. */ public final class BackupInstancesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/DeleteBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/DeleteBackupInstance.json */ /** * Sample code: Delete BackupInstance. @@ -267,7 +275,7 @@ public final class BackupInstancesDeleteSamples { /** Samples for BackupInstances Get. */ public final class BackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/GetBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstance.json */ /** * Sample code: Get BackupInstance. @@ -289,7 +297,7 @@ public final class BackupInstancesGetSamples { /** Samples for BackupInstances GetBackupInstanceOperationResult. */ public final class BackupInstancesGetBackupInstanceOperationResultSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json */ /** * Sample code: Get BackupInstanceOperationResult. @@ -316,7 +324,7 @@ public final class BackupInstancesGetBackupInstanceOperationResultSamples { /** Samples for BackupInstances List. */ public final class BackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ListBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListBackupInstances.json */ /** * Sample code: List BackupInstances in a Vault. @@ -336,7 +344,7 @@ public final class BackupInstancesListSamples { /** Samples for BackupInstances ResumeBackups. */ public final class BackupInstancesResumeBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ResumeBackups.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeBackups.json */ /** * Sample code: ResumeBackups. @@ -355,7 +363,7 @@ public final class BackupInstancesResumeBackupsSamples { /** Samples for BackupInstances ResumeProtection. */ public final class BackupInstancesResumeProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ResumeProtection.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeProtection.json */ /** * Sample code: ResumeProtection. @@ -374,7 +382,7 @@ public final class BackupInstancesResumeProtectionSamples { /** Samples for BackupInstances StopProtection. */ public final class BackupInstancesStopProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/StopProtection.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/StopProtection.json */ /** * Sample code: StopProtection. @@ -393,7 +401,7 @@ public final class BackupInstancesStopProtectionSamples { /** Samples for BackupInstances SuspendBackups. */ public final class BackupInstancesSuspendBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/SuspendBackups.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SuspendBackups.json */ /** * Sample code: SuspendBackups. @@ -415,7 +423,7 @@ import com.azure.resourcemanager.dataprotection.models.SyncType; /** Samples for BackupInstances SyncBackupInstance. */ public final class BackupInstancesSyncBackupInstanceSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/SyncBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SyncBackupInstance.json */ /** * Sample code: Sync BackupInstance. @@ -444,7 +452,7 @@ import com.azure.resourcemanager.dataprotection.models.RehydrationPriority; /** Samples for BackupInstances TriggerRehydrate. */ public final class BackupInstancesTriggerRehydrateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRehydrate.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRehydrate.json */ /** * Sample code: Trigger Rehydrate. @@ -488,7 +496,7 @@ import com.azure.resourcemanager.dataprotection.models.TargetDetails; /** Samples for BackupInstances TriggerRestore. */ public final class BackupInstancesTriggerRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json */ /** * Sample code: Trigger Restore As Files. @@ -520,7 +528,7 @@ public final class BackupInstancesTriggerRestoreSamples { } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json */ /** * Sample code: Trigger Restore With Rehydration. @@ -570,7 +578,7 @@ public final class BackupInstancesTriggerRestoreSamples { } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestore.json */ /** * Sample code: Trigger Restore. @@ -639,7 +647,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; /** Samples for BackupInstances ValidateForBackup. */ public final class BackupInstancesValidateForBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ValidateForBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateForBackup.json */ /** * Sample code: Validate For Backup. @@ -709,7 +717,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObj /** Samples for BackupInstances ValidateForRestore. */ public final class BackupInstancesValidateForRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ValidateRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateRestore.json */ /** * Sample code: Validate Restore. @@ -788,7 +796,7 @@ import java.util.Arrays; /** Samples for BackupPolicies CreateOrUpdate. */ public final class BackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json */ /** * Sample code: CreateOrUpdate BackupPolicy. @@ -878,7 +886,7 @@ public final class BackupPoliciesCreateOrUpdateSamples { /** Samples for BackupPolicies Delete. */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/DeleteBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/DeleteBackupPolicy.json */ /** * Sample code: Delete BackupPolicy. @@ -899,7 +907,7 @@ public final class BackupPoliciesDeleteSamples { /** Samples for BackupPolicies Get. */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/GetBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/GetBackupPolicy.json */ /** * Sample code: Get BackupPolicy. @@ -920,7 +928,7 @@ public final class BackupPoliciesGetSamples { /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/ListBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/ListBackupPolicy.json */ /** * Sample code: List BackupPolicy. @@ -939,7 +947,7 @@ public final class BackupPoliciesListSamples { /** Samples for BackupVaultOperationResults Get. */ public final class BackupVaultOperationResultsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetOperationResultPatch.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetOperationResultPatch.json */ /** * Sample code: GetOperationResult Patch. @@ -966,7 +974,7 @@ import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequ /** Samples for BackupVaults CheckNameAvailability. */ public final class BackupVaultsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json */ /** * Sample code: Check BackupVaults name availability. @@ -994,8 +1002,14 @@ public final class BackupVaultsCheckNameAvailabilitySamples { import com.azure.resourcemanager.dataprotection.models.AlertsState; import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; import com.azure.resourcemanager.dataprotection.models.BackupVault; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; +import com.azure.resourcemanager.dataprotection.models.FeatureSettings; import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; +import com.azure.resourcemanager.dataprotection.models.SecuritySettings; +import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; +import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; import com.azure.resourcemanager.dataprotection.models.StorageSetting; import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; @@ -1006,7 +1020,7 @@ import java.util.Map; /** Samples for BackupVaults CreateOrUpdate. */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/PutBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVault.json */ /** * Sample code: Create BackupVault. @@ -1025,19 +1039,29 @@ public final class BackupVaultsCreateOrUpdateSamples { new MonitoringSettings() .withAzureMonitorAlertSettings( new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) + .withSecuritySettings( + new SecuritySettings() + .withSoftDeleteSettings( + new SoftDeleteSettings() + .withState(SoftDeleteState.fromString("Enabled")) + .withRetentionDurationInDays(14.0D))) .withStorageSettings( Arrays .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withFeatureSettings( + new FeatureSettings() + .withCrossRegionRestoreSettings( + new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("None")) .create(); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/PutBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVaultWithMSI.json */ /** * Sample code: Create BackupVault With MSI. @@ -1057,12 +1081,22 @@ public final class BackupVaultsCreateOrUpdateSamples { new MonitoringSettings() .withAzureMonitorAlertSettings( new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) + .withSecuritySettings( + new SecuritySettings() + .withSoftDeleteSettings( + new SoftDeleteSettings() + .withState(SoftDeleteState.fromString("Enabled")) + .withRetentionDurationInDays(14.0D))) .withStorageSettings( Arrays .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withFeatureSettings( + new FeatureSettings() + .withCrossRegionRestoreSettings( + new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("systemAssigned")) .create(); @@ -1087,7 +1121,7 @@ public final class BackupVaultsCreateOrUpdateSamples { /** Samples for BackupVaults Delete. */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/DeleteBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/DeleteBackupVault.json */ /** * Sample code: Delete BackupVault. @@ -1106,7 +1140,7 @@ public final class BackupVaultsDeleteSamples { /** Samples for BackupVaults GetByResourceGroup. */ public final class BackupVaultsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVault.json */ /** * Sample code: Get BackupVault. @@ -1120,7 +1154,7 @@ public final class BackupVaultsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultWithMSI.json */ /** * Sample code: Get BackupVault With MSI. @@ -1141,7 +1175,7 @@ public final class BackupVaultsGetByResourceGroupSamples { /** Samples for BackupVaults List. */ public final class BackupVaultsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json */ /** * Sample code: Get BackupVaults in Subscription. @@ -1161,7 +1195,7 @@ public final class BackupVaultsListSamples { /** Samples for BackupVaults ListByResourceGroup. */ public final class BackupVaultsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json */ /** * Sample code: Get BackupVaults in ResourceGroup. @@ -1189,7 +1223,7 @@ import java.util.Map; /** Samples for BackupVaults Update. */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/PatchBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PatchBackupVault.json */ /** * Sample code: Patch BackupVault. @@ -1237,7 +1271,7 @@ import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest; /** Samples for DataProtection CheckFeatureSupport. */ public final class DataProtectionCheckFeatureSupportSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/CheckfeatureSupport.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/CheckfeatureSupport.json */ /** * Sample code: Check Azure Vm Backup Feature Support. @@ -1262,7 +1296,7 @@ public final class DataProtectionCheckFeatureSupportSamples { /** Samples for DataProtectionOperations List. */ public final class DataProtectionOperationsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/Operations/List.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/Operations/List.json */ /** * Sample code: Returns the list of supported REST operations. @@ -1282,7 +1316,7 @@ public final class DataProtectionOperationsListSamples { /** Samples for DeletedBackupInstances Get. */ public final class DeletedBackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json */ /** * Sample code: Get DeletedBackupInstance. @@ -1305,7 +1339,7 @@ public final class DeletedBackupInstancesGetSamples { /** Samples for DeletedBackupInstances List. */ public final class DeletedBackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json */ /** * Sample code: List DeletedBackupInstances in a Vault. @@ -1327,7 +1361,7 @@ public final class DeletedBackupInstancesListSamples { /** Samples for DeletedBackupInstances Undelete. */ public final class DeletedBackupInstancesUndeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json */ /** * Sample code: Undelete Deleted BackupInstance. @@ -1341,13 +1375,142 @@ public final class DeletedBackupInstancesUndeleteSamples { } ``` +### DppResourceGuardProxy_CreateOrUpdate + +```java +import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; + +/** Samples for DppResourceGuardProxy CreateOrUpdate. */ +public final class DppResourceGuardProxyCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + */ + /** + * Sample code: Create ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void createResourceGuardProxy( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .define("swaggerExample") + .withExistingBackupVault("SampleResourceGroup", "sampleVault") + .withProperties( + new ResourceGuardProxyBase() + .withResourceGuardResourceId( + "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource")) + .create(); + } +} +``` + +### DppResourceGuardProxy_Delete + +```java +/** Samples for DppResourceGuardProxy Delete. */ +public final class DppResourceGuardProxyDeleteSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + */ + /** + * Sample code: Delete ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void deleteResourceGuardProxy( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .deleteWithResponse( + "SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + } +} +``` + +### DppResourceGuardProxy_Get + +```java +/** Samples for DppResourceGuardProxy Get. */ +public final class DppResourceGuardProxyGetSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + */ + /** + * Sample code: Get ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .getWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + } +} +``` + +### DppResourceGuardProxy_List + +```java +/** Samples for DppResourceGuardProxy List. */ +public final class DppResourceGuardProxyListSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json + */ + /** + * Sample code: Get ResourceGuardProxies. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getResourceGuardProxies(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().list("SampleResourceGroup", "sampleVault", com.azure.core.util.Context.NONE); + } +} +``` + +### DppResourceGuardProxy_UnlockDelete + +```java +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; +import java.util.Arrays; + +/** Samples for DppResourceGuardProxy UnlockDelete. */ +public final class DppResourceGuardProxyUnlockDeleteSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + */ + /** + * Sample code: UnlockDelete ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void unlockDeleteResourceGuardProxy( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .unlockDeleteWithResponse( + "SampleResourceGroup", + "sampleVault", + "swaggerExample", + new UnlockDeleteRequest() + .withResourceGuardOperationRequests( + Arrays + .asList( + "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default")) + .withResourceToBeDeleted( + "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupInstances/TestBI9779f4de"), + com.azure.core.util.Context.NONE); + } +} +``` + ### ExportJobs_Trigger ```java /** Samples for ExportJobs Trigger. */ public final class ExportJobsTriggerSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/TriggerExportJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/TriggerExportJobs.json */ /** * Sample code: Trigger Export Jobs. @@ -1366,7 +1529,7 @@ public final class ExportJobsTriggerSamples { /** Samples for ExportJobsOperationResult Get. */ public final class ExportJobsOperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/GetExportJobsOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetExportJobsOperationResult.json */ /** * Sample code: Get Export Jobs Operation Result. @@ -1392,7 +1555,7 @@ public final class ExportJobsOperationResultGetSamples { /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/GetJob.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetJob.json */ /** * Sample code: Get Job. @@ -1417,7 +1580,7 @@ public final class JobsGetSamples { /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/ListJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/ListJobs.json */ /** * Sample code: Get Jobs. @@ -1436,7 +1599,7 @@ public final class JobsListSamples { /** Samples for OperationResult Get. */ public final class OperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationResult.json */ /** * Sample code: Get OperationResult. @@ -1460,7 +1623,7 @@ public final class OperationResultGetSamples { /** Samples for OperationStatus Get. */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationStatus.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatus.json */ /** * Sample code: Get OperationStatus. @@ -1484,7 +1647,7 @@ public final class OperationStatusGetSamples { /** Samples for OperationStatusBackupVaultContext Get. */ public final class OperationStatusBackupVaultContextGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationStatusVaultContext.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusVaultContext.json */ /** * Sample code: Get OperationStatus. @@ -1509,7 +1672,7 @@ public final class OperationStatusBackupVaultContextGetSamples { /** Samples for OperationStatusResourceGroupContext GetByResourceGroup. */ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationStatusRGContext.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusRGContext.json */ /** * Sample code: Get OperationStatus. @@ -1533,7 +1696,7 @@ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples /** Samples for RecoveryPoints Get. */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/GetRecoveryPoint.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetRecoveryPoint.json */ /** * Sample code: Get Recovery Point. @@ -1559,7 +1722,7 @@ public final class RecoveryPointsGetSamples { /** Samples for RecoveryPoints List. */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ListRecoveryPoints.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListRecoveryPoints.json */ /** * Sample code: List Recovery Points in a Vault. @@ -1587,7 +1750,7 @@ public final class RecoveryPointsListSamples { /** Samples for ResourceGuards Delete. */ public final class ResourceGuardsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json */ /** * Sample code: Delete ResourceGuard. @@ -1609,7 +1772,7 @@ public final class ResourceGuardsDeleteSamples { /** Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. */ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1632,7 +1795,7 @@ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { /** Samples for ResourceGuards GetByResourceGroup. */ public final class ResourceGuardsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuard.json */ /** * Sample code: Get ResourceGuard. @@ -1653,7 +1816,7 @@ public final class ResourceGuardsGetByResourceGroupSamples { /** Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. */ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1676,7 +1839,7 @@ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSample /** Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1699,7 +1862,7 @@ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamp /** Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1722,7 +1885,7 @@ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjec /** Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. */ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1745,7 +1908,7 @@ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSample /** Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1768,7 +1931,7 @@ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamp /** Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. @@ -1791,7 +1954,7 @@ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectS /** Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. */ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1814,7 +1977,7 @@ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { /** Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. */ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1837,7 +2000,7 @@ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSampl /** Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. */ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1860,7 +2023,7 @@ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { /** Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1883,7 +2046,7 @@ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { /** Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json */ /** * Sample code: List OperationsRequestObject. @@ -1906,7 +2069,7 @@ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples /** Samples for ResourceGuards List. */ public final class ResourceGuardsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json */ /** * Sample code: Get ResourceGuards in Subscription. @@ -1926,7 +2089,7 @@ public final class ResourceGuardsListSamples { /** Samples for ResourceGuards ListByResourceGroup. */ public final class ResourceGuardsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json */ /** * Sample code: Get ResourceGuards in ResourceGroup. @@ -1950,7 +2113,7 @@ import java.util.Map; /** Samples for ResourceGuards Patch. */ public final class ResourceGuardsPatchSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/PatchResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PatchResourceGuard.json */ /** * Sample code: Patch ResourceGuard. @@ -1989,7 +2152,7 @@ import java.util.Map; /** Samples for ResourceGuards Put. */ public final class ResourceGuardsPutSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/PutResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PutResourceGuard.json */ /** * Sample code: Create ResourceGuard. @@ -2028,7 +2191,7 @@ import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreTyp /** Samples for RestorableTimeRanges Find. */ public final class RestorableTimeRangesFindSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json */ /** * Sample code: Find Restorable Time Ranges. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml index 9e1ae7912c523..28062f5ffad61 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for DataProtection Management - This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-01. + This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2023-05. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java index 93f9fbe01096a..0f233fd278652 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java @@ -32,6 +32,7 @@ import com.azure.resourcemanager.dataprotection.implementation.DataProtectionOperationsImpl; import com.azure.resourcemanager.dataprotection.implementation.DataProtectionsImpl; import com.azure.resourcemanager.dataprotection.implementation.DeletedBackupInstancesImpl; +import com.azure.resourcemanager.dataprotection.implementation.DppResourceGuardProxiesImpl; import com.azure.resourcemanager.dataprotection.implementation.ExportJobsImpl; import com.azure.resourcemanager.dataprotection.implementation.ExportJobsOperationResultsImpl; import com.azure.resourcemanager.dataprotection.implementation.JobsImpl; @@ -49,6 +50,7 @@ import com.azure.resourcemanager.dataprotection.models.DataProtectionOperations; import com.azure.resourcemanager.dataprotection.models.DataProtections; import com.azure.resourcemanager.dataprotection.models.DeletedBackupInstances; +import com.azure.resourcemanager.dataprotection.models.DppResourceGuardProxies; import com.azure.resourcemanager.dataprotection.models.ExportJobs; import com.azure.resourcemanager.dataprotection.models.ExportJobsOperationResults; import com.azure.resourcemanager.dataprotection.models.Jobs; @@ -64,7 +66,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; -import java.util.UUID; import java.util.stream.Collectors; /** Entry point to DataProtectionManager. Open API 2.0 Specs for Azure Data Protection service. */ @@ -103,6 +104,8 @@ public final class DataProtectionManager { private ResourceGuards resourceGuards; + private DppResourceGuardProxies dppResourceGuardProxies; + private final DataProtectionClient clientObject; private DataProtectionManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -112,7 +115,7 @@ private DataProtectionManager(HttpPipeline httpPipeline, AzureProfile profile, D new DataProtectionClientBuilder() .pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(UUID.fromString(profile.getSubscriptionId())) + .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) .buildClient(); } @@ -268,7 +271,7 @@ public DataProtectionManager authenticate(TokenCredential credential, AzureProfi .append("-") .append("com.azure.resourcemanager.dataprotection") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -536,6 +539,19 @@ public ResourceGuards resourceGuards() { return resourceGuards; } + /** + * Gets the resource collection API of DppResourceGuardProxies. It manages ResourceGuardProxyBaseResource. + * + * @return Resource collection API of DppResourceGuardProxies. + */ + public DppResourceGuardProxies dppResourceGuardProxies() { + if (this.dppResourceGuardProxies == null) { + this.dppResourceGuardProxies = + new DppResourceGuardProxiesImpl(clientObject.getDppResourceGuardProxies(), this); + } + return dppResourceGuardProxies; + } + /** * @return Wrapped service client DataProtectionClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java index a0783217ebd53..568fbae644c5a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java @@ -6,7 +6,6 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -import java.util.UUID; /** The interface for DataProtectionClient class. */ public interface DataProtectionClient { @@ -15,7 +14,7 @@ public interface DataProtectionClient { * * @return the subscriptionId value. */ - UUID getSubscriptionId(); + String getSubscriptionId(); /** * Gets server parameter. @@ -163,4 +162,11 @@ public interface DataProtectionClient { * @return the ResourceGuardsClient object. */ ResourceGuardsClient getResourceGuards(); + + /** + * Gets the DppResourceGuardProxiesClient object to access its operations. + * + * @return the DppResourceGuardProxiesClient object. + */ + DppResourceGuardProxiesClient getDppResourceGuardProxies(); } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java new file mode 100644 index 0000000000000..0c65348d2f92f --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppResourceGuardProxiesClient.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; +import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; + +/** An instance of this class provides access to all the operations defined in DppResourceGuardProxiesClient. */ +public interface DppResourceGuardProxiesClient { + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String vaultName); + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, String vaultName, Context context); + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ResourceGuardProxyBaseResourceInner get(String resourceGroupName, String vaultName, String resourceGuardProxyName); + + /** + * Creates or Updates a ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters, + Context context); + + /** + * Creates or Updates a ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ResourceGuardProxyBaseResourceInner createOrUpdate( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters); + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String vaultName, String resourceGuardProxyName); + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response unlockDeleteWithResponse( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + UnlockDeleteRequest parameters, + Context context); + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UnlockDeleteResponseInner unlockDelete( + String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardProxyBaseResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardProxyBaseResourceInner.java new file mode 100644 index 0000000000000..74f1a3ed9c835 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardProxyBaseResourceInner.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.dataprotection.models.DppResource; +import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ResourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. */ +@Fluent +public final class ResourceGuardProxyBaseResourceInner extends DppResource { + /* + * ResourceGuardProxyBaseResource properties + */ + @JsonProperty(value = "properties") + private ResourceGuardProxyBase properties; + + /** Creates an instance of ResourceGuardProxyBaseResourceInner class. */ + public ResourceGuardProxyBaseResourceInner() { + } + + /** + * Get the properties property: ResourceGuardProxyBaseResource properties. + * + * @return the properties value. + */ + public ResourceGuardProxyBase properties() { + return this.properties; + } + + /** + * Set the properties property: ResourceGuardProxyBaseResource properties. + * + * @param properties the properties value to set. + * @return the ResourceGuardProxyBaseResourceInner object itself. + */ + public ResourceGuardProxyBaseResourceInner withProperties(ResourceGuardProxyBase properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java new file mode 100644 index 0000000000000..3a18c252bb9a6 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/UnlockDeleteResponseInner.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Response of Unlock Delete API. */ +@Fluent +public final class UnlockDeleteResponseInner { + /* + * This is the time when unlock delete privileges will get expired. + */ + @JsonProperty(value = "unlockDeleteExpiryTime") + private String unlockDeleteExpiryTime; + + /** Creates an instance of UnlockDeleteResponseInner class. */ + public UnlockDeleteResponseInner() { + } + + /** + * Get the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired. + * + * @return the unlockDeleteExpiryTime value. + */ + public String unlockDeleteExpiryTime() { + return this.unlockDeleteExpiryTime; + } + + /** + * Set the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired. + * + * @param unlockDeleteExpiryTime the unlockDeleteExpiryTime value to set. + * @return the UnlockDeleteResponseInner object itself. + */ + public UnlockDeleteResponseInner withUnlockDeleteExpiryTime(String unlockDeleteExpiryTime) { + this.unlockDeleteExpiryTime = unlockDeleteExpiryTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java index 292ae0e636699..46df3ed14a19f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java @@ -43,7 +43,6 @@ import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest; import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject; import java.nio.ByteBuffer; -import java.util.UUID; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -75,14 +74,13 @@ public final class BackupInstancesClientImpl implements BackupInstancesClient { public interface BackupInstancesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, @@ -90,14 +88,13 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -106,14 +103,13 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -123,14 +119,13 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -139,14 +134,13 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> adhocBackup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -156,14 +150,13 @@ Mono>> adhocBackup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/validateForBackup") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> validateForBackup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @BodyParam("application/json") ValidateForBackupRequest parameters, @@ -172,13 +165,12 @@ Mono>> validateForBackup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/operationResults/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/operationResults/{operationId}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getBackupInstanceOperationResult( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -189,15 +181,14 @@ Mono> getBackupInstanceOperationResult( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> triggerRehydrate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @BodyParam("application/json") AzureBackupRehydrationRequest parameters, @@ -206,14 +197,13 @@ Mono>> triggerRehydrate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> triggerRestore( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -223,13 +213,12 @@ Mono>> triggerRestore( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeBackups") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeBackups") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> resumeBackups( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -239,13 +228,12 @@ Mono>> resumeBackups( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeProtection") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/resumeProtection") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> resumeProtection( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -255,13 +243,12 @@ Mono>> resumeProtection( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/stopProtection") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/stopProtection") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> stopProtection( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -271,13 +258,12 @@ Mono>> stopProtection( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/suspendBackups") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/suspendBackups") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> suspendBackups( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -287,13 +273,12 @@ Mono>> suspendBackups( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/sync") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/sync") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> syncBackupInstance( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -304,14 +289,13 @@ Mono>> syncBackupInstance( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> validateForRestore( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java index d0b4aa92f3068..ab36936cc1c3d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient; import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner; import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResourceList; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */ @@ -62,14 +61,13 @@ public final class BackupPoliciesClientImpl implements BackupPoliciesClient { public interface BackupPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupPolicies") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, @@ -77,14 +75,13 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupPolicyName") String backupPolicyName, @@ -93,14 +90,13 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupPolicyName") String backupPolicyName, @@ -110,14 +106,13 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupPolicyName") String backupPolicyName, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java index a73cf0048cb02..e147a197605c0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java @@ -23,7 +23,6 @@ import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. */ @@ -56,14 +55,13 @@ public final class BackupVaultOperationResultsClientImpl implements BackupVaultO public interface BackupVaultOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/operationResults/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("operationId") String operationId, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java index ae93db0388304..effc191253ed4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java @@ -40,7 +40,6 @@ import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest; import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput; import java.nio.ByteBuffer; -import java.util.UUID; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -77,34 +76,32 @@ public interface BackupVaultsService { Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, @@ -112,14 +109,13 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @BodyParam("application/json") BackupVaultResourceInner parameters, @@ -128,14 +124,13 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, @@ -143,14 +138,13 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @BodyParam("application/json") PatchResourceRequestInput parameters, @@ -159,15 +153,14 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/locations/{location}/checkNameAvailability") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @BodyParam("application/json") CheckNameAvailabilityRequest parameters, @HeaderParam("Accept") String accept, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java index c07fefc083b1a..4fcf7d3886f2a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java @@ -13,7 +13,6 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -import java.util.UUID; /** A builder for creating a new instance of the DataProtectionClientImpl type. */ @ServiceClientBuilder(serviceClients = {DataProtectionClientImpl.class}) @@ -21,7 +20,7 @@ public final class DataProtectionClientBuilder { /* * The ID of the target subscription. The value must be an UUID. */ - private UUID subscriptionId; + private String subscriptionId; /** * Sets The ID of the target subscription. The value must be an UUID. @@ -29,7 +28,7 @@ public final class DataProtectionClientBuilder { * @param subscriptionId the subscriptionId value. * @return the DataProtectionClientBuilder. */ - public DataProtectionClientBuilder subscriptionId(UUID subscriptionId) { + public DataProtectionClientBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java index ac108ea17571c..6269ee984cee4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java @@ -30,6 +30,7 @@ import com.azure.resourcemanager.dataprotection.fluent.DataProtectionOperationsClient; import com.azure.resourcemanager.dataprotection.fluent.DataProtectionsClient; import com.azure.resourcemanager.dataprotection.fluent.DeletedBackupInstancesClient; +import com.azure.resourcemanager.dataprotection.fluent.DppResourceGuardProxiesClient; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsClient; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsOperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.JobsClient; @@ -46,7 +47,6 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.UUID; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -54,14 +54,14 @@ @ServiceClient(builder = DataProtectionClientBuilder.class) public final class DataProtectionClientImpl implements DataProtectionClient { /** The ID of the target subscription. The value must be an UUID. */ - private final UUID subscriptionId; + private final String subscriptionId; /** * Gets The ID of the target subscription. The value must be an UUID. * * @return the subscriptionId value. */ - public UUID getSubscriptionId() { + public String getSubscriptionId() { return this.subscriptionId; } @@ -329,6 +329,18 @@ public ResourceGuardsClient getResourceGuards() { return this.resourceGuards; } + /** The DppResourceGuardProxiesClient object to access its operations. */ + private final DppResourceGuardProxiesClient dppResourceGuardProxies; + + /** + * Gets the DppResourceGuardProxiesClient object to access its operations. + * + * @return the DppResourceGuardProxiesClient object. + */ + public DppResourceGuardProxiesClient getDppResourceGuardProxies() { + return this.dppResourceGuardProxies; + } + /** * Initializes an instance of DataProtectionClient client. * @@ -344,14 +356,14 @@ public ResourceGuardsClient getResourceGuards() { SerializerAdapter serializerAdapter, Duration defaultPollInterval, AzureEnvironment environment, - UUID subscriptionId, + String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-01-01"; + this.apiVersion = "2023-05-01"; this.backupVaults = new BackupVaultsClientImpl(this); this.operationResults = new OperationResultsClientImpl(this); this.operationStatus = new OperationStatusClientImpl(this); @@ -369,6 +381,7 @@ public ResourceGuardsClient getResourceGuards() { this.exportJobsOperationResults = new ExportJobsOperationResultsClientImpl(this); this.deletedBackupInstances = new DeletedBackupInstancesClientImpl(this); this.resourceGuards = new ResourceGuardsClientImpl(this); + this.dppResourceGuardProxies = new DppResourceGuardProxiesClientImpl(this); } /** diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java index c3b8b1c93516d..36da3791b9256 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.resourcemanager.dataprotection.fluent.DataProtectionsClient; import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner; import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in DataProtectionsClient. */ @@ -56,14 +55,13 @@ public final class DataProtectionsClientImpl implements DataProtectionsClient { public interface DataProtectionsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}" - + "/checkFeatureSupport") + "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkFeatureSupport( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @BodyParam("application/json") FeatureValidationRequestBase parameters, @HeaderParam("Accept") String accept, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java index 3f4520e65d1df..5cdc9c5acf1e0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DeletedBackupInstancesClientImpl.java @@ -33,7 +33,6 @@ import com.azure.resourcemanager.dataprotection.fluent.models.DeletedBackupInstanceResourceInner; import com.azure.resourcemanager.dataprotection.models.DeletedBackupInstanceResourceList; import java.nio.ByteBuffer; -import java.util.UUID; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -66,14 +65,13 @@ public final class DeletedBackupInstancesClientImpl implements DeletedBackupInst public interface DeletedBackupInstancesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/deletedBackupInstances") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, @@ -81,14 +79,13 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -97,14 +94,13 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}/undelete") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/deletedBackupInstances/{backupInstanceName}/undelete") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> undelete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java new file mode 100644 index 0000000000000..d3c612d676f8a --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesClientImpl.java @@ -0,0 +1,1123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.dataprotection.fluent.DppResourceGuardProxiesClient; +import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; +import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; +import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResourceList; +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DppResourceGuardProxiesClient. */ +public final class DppResourceGuardProxiesClientImpl implements DppResourceGuardProxiesClient { + /** The proxy service used to perform REST calls. */ + private final DppResourceGuardProxiesService service; + + /** The service client containing this operation class. */ + private final DataProtectionClientImpl client; + + /** + * Initializes an instance of DppResourceGuardProxiesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DppResourceGuardProxiesClientImpl(DataProtectionClientImpl client) { + this.service = + RestProxy + .create(DppResourceGuardProxiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DataProtectionClientDppResourceGuardProxies to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DataProtectionClient") + public interface DppResourceGuardProxiesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ResourceGuardProxyBaseResourceInner parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> unlockDelete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("vaultName") String vaultName, + @PathParam("resourceGuardProxyName") String resourceGuardProxyName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UnlockDeleteRequest parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String vaultName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String vaultName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String vaultName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, vaultName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, String vaultName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, vaultName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String vaultName) { + return new PagedIterable<>(listAsync(resourceGroupName, vaultName)); + } + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, String vaultName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, vaultName, context)); + } + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String vaultName, String resourceGuardProxyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, String vaultName, String resourceGuardProxyName) { + return getWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + return getWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, context).block(); + } + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceGuardProxyBaseResourceInner get( + String resourceGroupName, String vaultName, String resourceGuardProxyName) { + return getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE).getValue(); + } + + /** + * Creates or Updates a ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or Updates a ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Creates or Updates a ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or Updates a ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, vaultName, resourceGuardProxyName, parameters, context) + .block(); + } + + /** + * Creates or Updates a ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceGuardProxyBaseResourceInner createOrUpdate( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + ResourceGuardProxyBaseResourceInner parameters) { + return createOrUpdateWithResponse( + resourceGroupName, vaultName, resourceGuardProxyName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String vaultName, String resourceGuardProxyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String vaultName, String resourceGuardProxyName) { + return deleteWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + return deleteWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, context).block(); + } + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String vaultName, String resourceGuardProxyName) { + deleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE); + } + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> unlockDeleteWithResponseAsync( + String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .unlockDelete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> unlockDeleteWithResponseAsync( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + UnlockDeleteRequest parameters, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (vaultName == null) { + return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null.")); + } + if (resourceGuardProxyName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resourceGuardProxyName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .unlockDelete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + vaultName, + resourceGuardProxyName, + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono unlockDeleteAsync( + String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { + return unlockDeleteWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response unlockDeleteWithResponse( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + UnlockDeleteRequest parameters, + Context context) { + return unlockDeleteWithResponseAsync(resourceGroupName, vaultName, resourceGuardProxyName, parameters, context) + .block(); + } + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UnlockDeleteResponseInner unlockDelete( + String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { + return unlockDeleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesImpl.java new file mode 100644 index 0000000000000..44d58ddb918b3 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppResourceGuardProxiesImpl.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.dataprotection.fluent.DppResourceGuardProxiesClient; +import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; +import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; +import com.azure.resourcemanager.dataprotection.models.DppResourceGuardProxies; +import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource; +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteResponse; + +public final class DppResourceGuardProxiesImpl implements DppResourceGuardProxies { + private static final ClientLogger LOGGER = new ClientLogger(DppResourceGuardProxiesImpl.class); + + private final DppResourceGuardProxiesClient innerClient; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public DppResourceGuardProxiesImpl( + DppResourceGuardProxiesClient innerClient, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String vaultName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, vaultName); + return Utils.mapPage(inner, inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, String vaultName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, vaultName, context); + return Utils.mapPage(inner, inner1 -> new ResourceGuardProxyBaseResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ResourceGuardProxyBaseResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ResourceGuardProxyBaseResource get( + String resourceGroupName, String vaultName, String resourceGuardProxyName) { + ResourceGuardProxyBaseResourceInner inner = + this.serviceClient().get(resourceGroupName, vaultName, resourceGuardProxyName); + if (inner != null) { + return new ResourceGuardProxyBaseResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); + } + + public void delete(String resourceGroupName, String vaultName, String resourceGuardProxyName) { + this.serviceClient().delete(resourceGroupName, vaultName, resourceGuardProxyName); + } + + public Response unlockDeleteWithResponse( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + UnlockDeleteRequest parameters, + Context context) { + Response inner = + this + .serviceClient() + .unlockDeleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new UnlockDeleteResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public UnlockDeleteResponse unlockDelete( + String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters) { + UnlockDeleteResponseInner inner = + this.serviceClient().unlockDelete(resourceGroupName, vaultName, resourceGuardProxyName, parameters); + if (inner != null) { + return new UnlockDeleteResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ResourceGuardProxyBaseResource getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); + if (resourceGuardProxyName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", + id))); + } + return this.getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); + if (resourceGuardProxyName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", + id))); + } + return this.getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); + if (resourceGuardProxyName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", + id))); + } + this.deleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String vaultName = Utils.getValueFromIdByName(id, "backupVaults"); + if (vaultName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id))); + } + String resourceGuardProxyName = Utils.getValueFromIdByName(id, "backupResourceGuardProxies"); + if (resourceGuardProxyName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'backupResourceGuardProxies'.", + id))); + } + return this.deleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context); + } + + private DppResourceGuardProxiesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() { + return this.serviceManager; + } + + public ResourceGuardProxyBaseResourceImpl define(String name) { + return new ResourceGuardProxyBaseResourceImpl(name, this.manager()); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java index 8720157e96eeb..9b15ab425b848 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsClientImpl.java @@ -26,7 +26,6 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsClient; import java.nio.ByteBuffer; -import java.util.UUID; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -58,14 +57,13 @@ public final class ExportJobsClientImpl implements ExportJobsClient { public interface ExportJobsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/exportBackupJobs") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> trigger( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java index de3525676c63c..a396d11205182 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ExportJobsOperationResultsClientImpl.java @@ -23,7 +23,6 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.dataprotection.fluent.ExportJobsOperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ExportJobsOperationResultsClient. */ @@ -56,14 +55,13 @@ public final class ExportJobsOperationResultsClientImpl implements ExportJobsOpe public interface ExportJobsOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupJobs/operations/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("operationId") String operationId, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java index 9b65cc879517e..d51c7a5da6669 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java @@ -28,7 +28,6 @@ import com.azure.resourcemanager.dataprotection.fluent.JobsClient; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResourceList; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in JobsClient. */ @@ -58,14 +57,13 @@ public final class JobsClientImpl implements JobsClient { public interface JobsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupJobs") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @HeaderParam("Accept") String accept, @@ -73,14 +71,13 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupJobs/{jobId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("jobId") String jobId, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java index 78c4d9ae3b815..99d117d502d51 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java @@ -23,7 +23,6 @@ import com.azure.resourcemanager.dataprotection.fluent.OperationResultsClient; import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner; import com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationResultsClient. */ @@ -54,14 +53,13 @@ public final class OperationResultsClientImpl implements OperationResultsClient public interface OperationResultsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults" - + "/{operationId}") + "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, @PathParam("location") String location, @HeaderParam("Accept") String accept, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java index c0dd5e121dda9..6249467cbd587 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusBackupVaultContextsClientImpl.java @@ -23,7 +23,6 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.dataprotection.fluent.OperationStatusBackupVaultContextsClient; import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; -import java.util.UUID; import reactor.core.publisher.Mono; /** @@ -60,13 +59,12 @@ public final class OperationStatusBackupVaultContextsClientImpl implements Opera public interface OperationStatusBackupVaultContextsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/operationStatus/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationStatus/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("operationId") String operationId, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java index 1579ee18cc7be..fdc735d8f12e1 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusClientImpl.java @@ -23,7 +23,6 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.dataprotection.fluent.OperationStatusClient; import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationStatusClient. */ @@ -54,14 +53,13 @@ public final class OperationStatusClientImpl implements OperationStatusClient { public interface OperationStatusService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus" - + "/{operationId}") + "/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java index 41084e46d8278..957f20e81b2c0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationStatusResourceGroupContextsClientImpl.java @@ -23,7 +23,6 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.dataprotection.fluent.OperationStatusResourceGroupContextsClient; import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner; -import java.util.UUID; import reactor.core.publisher.Mono; /** @@ -62,15 +61,14 @@ public final class OperationStatusResourceGroupContextsClientImpl public interface OperationStatusResourceGroupContextsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/operationStatus/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/operationStatus/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java index be66ce1d085e0..17b8270d8026d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsClientImpl.java @@ -28,7 +28,6 @@ import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsClient; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in RecoveryPointsClient. */ @@ -59,14 +58,13 @@ public final class RecoveryPointsClientImpl implements RecoveryPointsClient { public interface RecoveryPointsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, @@ -77,14 +75,13 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java new file mode 100644 index 0000000000000..9660797cfd290 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardProxyBaseResourceImpl.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; +import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; +import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource; +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteResponse; + +public final class ResourceGuardProxyBaseResourceImpl + implements ResourceGuardProxyBaseResource, + ResourceGuardProxyBaseResource.Definition, + ResourceGuardProxyBaseResource.Update { + private ResourceGuardProxyBaseResourceInner innerObject; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ResourceGuardProxyBase properties() { + return this.innerModel().properties(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ResourceGuardProxyBaseResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String vaultName; + + private String resourceGuardProxyName; + + public ResourceGuardProxyBaseResourceImpl withExistingBackupVault(String resourceGroupName, String vaultName) { + this.resourceGroupName = resourceGroupName; + this.vaultName = vaultName; + return this; + } + + public ResourceGuardProxyBaseResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getDppResourceGuardProxies() + .createOrUpdateWithResponse( + resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ResourceGuardProxyBaseResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDppResourceGuardProxies() + .createOrUpdateWithResponse( + resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), context) + .getValue(); + return this; + } + + ResourceGuardProxyBaseResourceImpl( + String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerObject = new ResourceGuardProxyBaseResourceInner(); + this.serviceManager = serviceManager; + this.resourceGuardProxyName = name; + } + + public ResourceGuardProxyBaseResourceImpl update() { + return this; + } + + public ResourceGuardProxyBaseResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getDppResourceGuardProxies() + .createOrUpdateWithResponse( + resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public ResourceGuardProxyBaseResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDppResourceGuardProxies() + .createOrUpdateWithResponse( + resourceGroupName, vaultName, resourceGuardProxyName, this.innerModel(), context) + .getValue(); + return this; + } + + ResourceGuardProxyBaseResourceImpl( + ResourceGuardProxyBaseResourceInner innerObject, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults"); + this.resourceGuardProxyName = Utils.getValueFromIdByName(innerObject.id(), "backupResourceGuardProxies"); + } + + public ResourceGuardProxyBaseResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getDppResourceGuardProxies() + .getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, Context.NONE) + .getValue(); + return this; + } + + public ResourceGuardProxyBaseResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDppResourceGuardProxies() + .getWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, context) + .getValue(); + return this; + } + + public Response unlockDeleteWithResponse(UnlockDeleteRequest parameters, Context context) { + return serviceManager + .dppResourceGuardProxies() + .unlockDeleteWithResponse(resourceGroupName, vaultName, resourceGuardProxyName, parameters, context); + } + + public UnlockDeleteResponse unlockDelete(UnlockDeleteRequest parameters) { + return serviceManager + .dppResourceGuardProxies() + .unlockDelete(resourceGroupName, vaultName, resourceGuardProxyName, parameters); + } + + public ResourceGuardProxyBaseResourceImpl withProperties(ResourceGuardProxyBase properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java index d6dee868b0732..d3f9ae7bb1ffe 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ResourceGuardsClientImpl.java @@ -35,7 +35,6 @@ import com.azure.resourcemanager.dataprotection.models.DppBaseResourceList; import com.azure.resourcemanager.dataprotection.models.PatchResourceGuardInput; import com.azure.resourcemanager.dataprotection.models.ResourceGuardResourceList; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ResourceGuardsClient. */ @@ -71,35 +70,33 @@ public interface ResourceGuardsService { Mono> list( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> put( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @BodyParam("application/json") ResourceGuardResourceInner parameters, @HeaderParam("Accept") String accept, @@ -107,45 +104,42 @@ Mono> put( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> patch( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @BodyParam("application/json") PatchResourceGuardInput parameters, @HeaderParam("Accept") String accept, @@ -153,105 +147,98 @@ Mono> patch( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDisableSoftDeleteRequestsObjects( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeleteResourceGuardProxyRequestsObjects( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getBackupSecurityPinRequestsObjects( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDeleteProtectedItemRequestsObjects( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getUpdateProtectionPolicyRequestsObjects( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getUpdateProtectedItemRequestsObjects( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @HeaderParam("Accept") String accept, Context context); @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultDisableSoftDeleteRequestsObject( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, @HeaderParam("Accept") String accept, @@ -259,15 +246,14 @@ Mono> getDefaultDisableSoftDeleteRequestsObject( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultDeleteResourceGuardProxyRequestsObject( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, @HeaderParam("Accept") String accept, @@ -275,15 +261,14 @@ Mono> getDefaultDeleteResourceGuardProxyRequestsO @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultBackupSecurityPinRequestsObject( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, @HeaderParam("Accept") String accept, @@ -291,15 +276,14 @@ Mono> getDefaultBackupSecurityPinRequestsObject( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultDeleteProtectedItemRequestsObject( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, @HeaderParam("Accept") String accept, @@ -307,15 +291,14 @@ Mono> getDefaultDeleteProtectedItemRequestsObject @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultUpdateProtectionPolicyRequestsObject( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, @HeaderParam("Accept") String accept, @@ -323,15 +306,14 @@ Mono> getDefaultUpdateProtectionPolicyRequestsObj @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDefaultUpdateProtectedItemRequestsObject( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGuardsName") String resourceGuardsName, @PathParam("requestName") String requestName, @HeaderParam("Accept") String accept, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java index eb66fb2c4b484..0b3cad71ea5e4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesClientImpl.java @@ -25,7 +25,6 @@ import com.azure.resourcemanager.dataprotection.fluent.RestorableTimeRangesClient; import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner; import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest; -import java.util.UUID; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. */ @@ -57,14 +56,13 @@ public final class RestorableTimeRangesClientImpl implements RestorableTimeRange public interface RestorableTimeRangesService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection" - + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> find( @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") UUID subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName, @PathParam("backupInstanceName") String backupInstanceName, diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java new file mode 100644 index 0000000000000..d7e88380d2486 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/UnlockDeleteResponseImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.implementation; + +import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteResponse; + +public final class UnlockDeleteResponseImpl implements UnlockDeleteResponse { + private UnlockDeleteResponseInner innerObject; + + private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager; + + UnlockDeleteResponseImpl( + UnlockDeleteResponseInner innerObject, + com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String unlockDeleteExpiryTime() { + return this.innerModel().unlockDeleteExpiryTime(); + } + + public UnlockDeleteResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java index a1c0b46544c64..77335b7ee1b82 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java @@ -128,6 +128,12 @@ public final class AzureBackupJob { @JsonProperty(value = "progressUrl", access = JsonProperty.Access.WRITE_ONLY) private String progressUrl; + /* + * Priority to be used for rehydration + */ + @JsonProperty(value = "rehydrationPriority", access = JsonProperty.Access.WRITE_ONLY) + private String rehydrationPriority; + /* * It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR */ @@ -503,6 +509,15 @@ public String progressUrl() { return this.progressUrl; } + /** + * Get the rehydrationPriority property: Priority to be used for rehydration. + * + * @return the rehydrationPriority value. + */ + public String rehydrationPriority() { + return this.rehydrationPriority; + } + /** * Get the restoreType property: It indicates the sub type of operation i.e. in case of Restore it can be ALR/OLR. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java index 94ea6bc8dc450..2426bde6d94fa 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryPointBasedRestoreRequest.java @@ -81,6 +81,13 @@ public AzureBackupRecoveryPointBasedRestoreRequest withSourceResourceId(String s return this; } + /** {@inheritDoc} */ + @Override + public AzureBackupRecoveryPointBasedRestoreRequest withIdentityDetails(IdentityDetails identityDetails) { + super.withIdentityDetails(identityDetails); + return this; + } + /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java index 09bf9f30d0044..79edd83db64b5 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRecoveryTimeBasedRestoreRequest.java @@ -70,6 +70,13 @@ public AzureBackupRecoveryTimeBasedRestoreRequest withSourceResourceId(String so return this; } + /** {@inheritDoc} */ + @Override + public AzureBackupRecoveryTimeBasedRestoreRequest withIdentityDetails(IdentityDetails identityDetails) { + super.withIdentityDetails(identityDetails); + return this; + } + /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java index 608bedde5ecc6..3aa39e8426f01 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreRequest.java @@ -50,6 +50,13 @@ public class AzureBackupRestoreRequest { @JsonProperty(value = "sourceResourceId") private String sourceResourceId; + /* + * Contains information of the Identity Details for the BI. + * If it is null, default will be considered as System Assigned. + */ + @JsonProperty(value = "identityDetails") + private IdentityDetails identityDetails; + /** Creates an instance of AzureBackupRestoreRequest class. */ public AzureBackupRestoreRequest() { } @@ -116,6 +123,28 @@ public AzureBackupRestoreRequest withSourceResourceId(String sourceResourceId) { return this; } + /** + * Get the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default + * will be considered as System Assigned. + * + * @return the identityDetails value. + */ + public IdentityDetails identityDetails() { + return this.identityDetails; + } + + /** + * Set the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default + * will be considered as System Assigned. + * + * @param identityDetails the identityDetails value to set. + * @return the AzureBackupRestoreRequest object itself. + */ + public AzureBackupRestoreRequest withIdentityDetails(IdentityDetails identityDetails) { + this.identityDetails = identityDetails; + return this; + } + /** * Validates the instance. * @@ -136,6 +165,9 @@ public void validate() { new IllegalArgumentException( "Missing required property sourceDataStoreType in model AzureBackupRestoreRequest")); } + if (identityDetails() != null) { + identityDetails().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(AzureBackupRestoreRequest.class); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java index 20bb5c5eea084..5008dc3ca1d84 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupRestoreWithRehydrationRequest.java @@ -104,6 +104,13 @@ public AzureBackupRestoreWithRehydrationRequest withSourceResourceId(String sour return this; } + /** {@inheritDoc} */ + @Override + public AzureBackupRestoreWithRehydrationRequest withIdentityDetails(IdentityDetails identityDetails) { + super.withIdentityDetails(identityDetails); + return this; + } + /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java index 073a774fb9848..402a5f39fabad 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstance.java @@ -80,6 +80,13 @@ public class BackupInstance { @JsonProperty(value = "validationType") private ValidationType validationType; + /* + * Contains information of the Identity Details for the BI. + * If it is null, default will be considered as System Assigned. + */ + @JsonProperty(value = "identityDetails") + private IdentityDetails identityDetails; + /* * The objectType property. */ @@ -263,6 +270,28 @@ public BackupInstance withValidationType(ValidationType validationType) { return this; } + /** + * Get the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default + * will be considered as System Assigned. + * + * @return the identityDetails value. + */ + public IdentityDetails identityDetails() { + return this.identityDetails; + } + + /** + * Set the identityDetails property: Contains information of the Identity Details for the BI. If it is null, default + * will be considered as System Assigned. + * + * @param identityDetails the identityDetails value to set. + * @return the BackupInstance object itself. + */ + public BackupInstance withIdentityDetails(IdentityDetails identityDetails) { + this.identityDetails = identityDetails; + return this; + } + /** * Get the objectType property: The objectType property. * @@ -315,6 +344,9 @@ public void validate() { if (datasourceAuthCredentials() != null) { datasourceAuthCredentials().validate(); } + if (identityDetails() != null) { + identityDetails().validate(); + } if (objectType() == null) { throw LOGGER .logExceptionAsError( diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java index f5fd32374ae43..2f929eef5d704 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupVault.java @@ -64,6 +64,12 @@ public final class BackupVault { @JsonProperty(value = "featureSettings") private FeatureSettings featureSettings; + /* + * Secure Score of Backup Vault + */ + @JsonProperty(value = "secureScore", access = JsonProperty.Access.WRITE_ONLY) + private SecureScoreLevel secureScore; + /** Creates an instance of BackupVault class. */ public BackupVault() { } @@ -184,6 +190,15 @@ public BackupVault withFeatureSettings(FeatureSettings featureSettings) { return this; } + /** + * Get the secureScore property: Secure Score of Backup Vault. + * + * @return the secureScore value. + */ + public SecureScoreLevel secureScore() { + return this.secureScore; + } + /** * Validates the instance. * diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java new file mode 100644 index 0000000000000..3da98ad80da05 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Properties which are specific to datasource/datasourceSets. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType") +@JsonTypeName("BaseResourceProperties") +@Immutable +public final class BaseResourceProperties { + /** Creates an instance of BaseResourceProperties class. */ + public BaseResourceProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java new file mode 100644 index 0000000000000..eb9dbd0906f6c --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreSettings.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CrossRegionRestoreSettings model. */ +@Fluent +public final class CrossRegionRestoreSettings { + /* + * CrossRegionRestore state + */ + @JsonProperty(value = "state") + private CrossRegionRestoreState state; + + /** Creates an instance of CrossRegionRestoreSettings class. */ + public CrossRegionRestoreSettings() { + } + + /** + * Get the state property: CrossRegionRestore state. + * + * @return the state value. + */ + public CrossRegionRestoreState state() { + return this.state; + } + + /** + * Set the state property: CrossRegionRestore state. + * + * @param state the state value to set. + * @return the CrossRegionRestoreSettings object itself. + */ + public CrossRegionRestoreSettings withState(CrossRegionRestoreState state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreState.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreState.java new file mode 100644 index 0000000000000..81c5290794e82 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreState.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** CrossRegionRestore state. */ +public final class CrossRegionRestoreState extends ExpandableStringEnum { + /** Static value Disabled for CrossRegionRestoreState. */ + public static final CrossRegionRestoreState DISABLED = fromString("Disabled"); + + /** Static value Enabled for CrossRegionRestoreState. */ + public static final CrossRegionRestoreState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of CrossRegionRestoreState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CrossRegionRestoreState() { + } + + /** + * Creates or finds a CrossRegionRestoreState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CrossRegionRestoreState. + */ + @JsonCreator + public static CrossRegionRestoreState fromString(String name) { + return fromString(name, CrossRegionRestoreState.class); + } + + /** + * Gets known CrossRegionRestoreState values. + * + * @return known CrossRegionRestoreState values. + */ + public static Collection values() { + return values(CrossRegionRestoreState.class); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java index 48dbc90f6e0da..a0e6ce494004a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Datasource.java @@ -58,6 +58,12 @@ public final class Datasource { @JsonProperty(value = "resourceUri") private String resourceUri; + /* + * Properties specific to data source + */ + @JsonProperty(value = "resourceProperties") + private BaseResourceProperties resourceProperties; + /** Creates an instance of Datasource class. */ public Datasource() { } @@ -204,6 +210,26 @@ public Datasource withResourceUri(String resourceUri) { return this; } + /** + * Get the resourceProperties property: Properties specific to data source. + * + * @return the resourceProperties value. + */ + public BaseResourceProperties resourceProperties() { + return this.resourceProperties; + } + + /** + * Set the resourceProperties property: Properties specific to data source. + * + * @param resourceProperties the resourceProperties value to set. + * @return the Datasource object itself. + */ + public Datasource withResourceProperties(BaseResourceProperties resourceProperties) { + this.resourceProperties = resourceProperties; + return this; + } + /** * Validates the instance. * @@ -215,6 +241,9 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property resourceId in model Datasource")); } + if (resourceProperties() != null) { + resourceProperties().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(Datasource.class); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java index 1c6f87627cfe2..2bfbd3e770f27 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DatasourceSet.java @@ -58,6 +58,12 @@ public final class DatasourceSet { @JsonProperty(value = "resourceUri") private String resourceUri; + /* + * Properties specific to data source set + */ + @JsonProperty(value = "resourceProperties") + private BaseResourceProperties resourceProperties; + /** Creates an instance of DatasourceSet class. */ public DatasourceSet() { } @@ -204,6 +210,26 @@ public DatasourceSet withResourceUri(String resourceUri) { return this; } + /** + * Get the resourceProperties property: Properties specific to data source set. + * + * @return the resourceProperties value. + */ + public BaseResourceProperties resourceProperties() { + return this.resourceProperties; + } + + /** + * Set the resourceProperties property: Properties specific to data source set. + * + * @param resourceProperties the resourceProperties value to set. + * @return the DatasourceSet object itself. + */ + public DatasourceSet withResourceProperties(BaseResourceProperties resourceProperties) { + this.resourceProperties = resourceProperties; + return this; + } + /** * Validates the instance. * @@ -215,6 +241,9 @@ public void validate() { .logExceptionAsError( new IllegalArgumentException("Missing required property resourceId in model DatasourceSet")); } + if (resourceProperties() != null) { + resourceProperties().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(DatasourceSet.class); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java index ad4cb4797f280..022fb0320215b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DeletedBackupInstance.java @@ -71,6 +71,13 @@ public DeletedBackupInstance withValidationType(ValidationType validationType) { return this; } + /** {@inheritDoc} */ + @Override + public DeletedBackupInstance withIdentityDetails(IdentityDetails identityDetails) { + super.withIdentityDetails(identityDetails); + return this; + } + /** {@inheritDoc} */ @Override public DeletedBackupInstance withObjectType(String objectType) { diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java index 4fb7183a69811..6e7810f626b1c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppIdentityDetails.java @@ -5,7 +5,9 @@ package com.azure.resourcemanager.dataprotection.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; /** * DppIdentityDetails @@ -28,11 +30,18 @@ public final class DppIdentityDetails { private String tenantId; /* - * The identityType which can be either SystemAssigned or None + * The identityType which can be either SystemAssigned, UserAssigned, 'SystemAssigned,UserAssigned' or None */ @JsonProperty(value = "type") private String type; + /* + * Gets or sets the user assigned identities. + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + /** Creates an instance of DppIdentityDetails class. */ public DppIdentityDetails() { } @@ -58,7 +67,8 @@ public String tenantId() { } /** - * Get the type property: The identityType which can be either SystemAssigned or None. + * Get the type property: The identityType which can be either SystemAssigned, UserAssigned, + * 'SystemAssigned,UserAssigned' or None. * * @return the type value. */ @@ -67,7 +77,8 @@ public String type() { } /** - * Set the type property: The identityType which can be either SystemAssigned or None. + * Set the type property: The identityType which can be either SystemAssigned, UserAssigned, + * 'SystemAssigned,UserAssigned' or None. * * @param type the type value to set. * @return the DppIdentityDetails object itself. @@ -77,11 +88,42 @@ public DppIdentityDetails withType(String type) { return this; } + /** + * Get the userAssignedIdentities property: Gets or sets the user assigned identities. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: Gets or sets the user assigned identities. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the DppIdentityDetails object itself. + */ + public DppIdentityDetails withUserAssignedIdentities( + Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceGuardProxies.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceGuardProxies.java new file mode 100644 index 0000000000000..99253ca734c53 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DppResourceGuardProxies.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of DppResourceGuardProxies. */ +public interface DppResourceGuardProxies { + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String vaultName); + + /** + * Returns the list of ResourceGuardProxies associated with the vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of ResourceGuardProxyBase resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String vaultName, Context context); + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs. + */ + ResourceGuardProxyBaseResource get(String resourceGroupName, String vaultName, String resourceGuardProxyName); + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse( + String resourceGroupName, String vaultName, String resourceGuardProxyName, Context context); + + /** + * Deletes the ResourceGuardProxy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String vaultName, String resourceGuardProxyName); + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API along with {@link Response}. + */ + Response unlockDeleteWithResponse( + String resourceGroupName, + String vaultName, + String resourceGuardProxyName, + UnlockDeleteRequest parameters, + Context context); + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @param resourceGuardProxyName name of the resource guard proxy. + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API. + */ + UnlockDeleteResponse unlockDelete( + String resourceGroupName, String vaultName, String resourceGuardProxyName, UnlockDeleteRequest parameters); + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response}. + */ + ResourceGuardProxyBaseResource getById(String id); + + /** + * Returns the ResourceGuardProxy object associated with the vault, and that matches the name in the request. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return resourceGuardProxyBaseResource object, used for response and request bodies for ResourceGuardProxy APIs + * along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the ResourceGuardProxy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the ResourceGuardProxy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ResourceGuardProxyBaseResource resource. + * + * @param name resource name. + * @return the first stage of the new ResourceGuardProxyBaseResource definition. + */ + ResourceGuardProxyBaseResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java index c85a2ab7d80d0..529c68eda2d72 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FeatureSettings.java @@ -16,6 +16,12 @@ public final class FeatureSettings { @JsonProperty(value = "crossSubscriptionRestoreSettings") private CrossSubscriptionRestoreSettings crossSubscriptionRestoreSettings; + /* + * The crossRegionRestoreSettings property. + */ + @JsonProperty(value = "crossRegionRestoreSettings") + private CrossRegionRestoreSettings crossRegionRestoreSettings; + /** Creates an instance of FeatureSettings class. */ public FeatureSettings() { } @@ -41,6 +47,26 @@ public FeatureSettings withCrossSubscriptionRestoreSettings( return this; } + /** + * Get the crossRegionRestoreSettings property: The crossRegionRestoreSettings property. + * + * @return the crossRegionRestoreSettings value. + */ + public CrossRegionRestoreSettings crossRegionRestoreSettings() { + return this.crossRegionRestoreSettings; + } + + /** + * Set the crossRegionRestoreSettings property: The crossRegionRestoreSettings property. + * + * @param crossRegionRestoreSettings the crossRegionRestoreSettings value to set. + * @return the FeatureSettings object itself. + */ + public FeatureSettings withCrossRegionRestoreSettings(CrossRegionRestoreSettings crossRegionRestoreSettings) { + this.crossRegionRestoreSettings = crossRegionRestoreSettings; + return this; + } + /** * Validates the instance. * @@ -50,5 +76,8 @@ public void validate() { if (crossSubscriptionRestoreSettings() != null) { crossSubscriptionRestoreSettings().validate(); } + if (crossRegionRestoreSettings() != null) { + crossRegionRestoreSettings().validate(); + } } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java new file mode 100644 index 0000000000000..2c786f6b6115e --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/IdentityDetails.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The IdentityDetails model. */ +@Fluent +public final class IdentityDetails { + /* + * Specifies if the BI is protected by System Identity. + */ + @JsonProperty(value = "useSystemAssignedIdentity") + private Boolean useSystemAssignedIdentity; + + /* + * ARM URL for User Assigned Identity. + */ + @JsonProperty(value = "userAssignedIdentityArmUrl") + private String userAssignedIdentityArmUrl; + + /** Creates an instance of IdentityDetails class. */ + public IdentityDetails() { + } + + /** + * Get the useSystemAssignedIdentity property: Specifies if the BI is protected by System Identity. + * + * @return the useSystemAssignedIdentity value. + */ + public Boolean useSystemAssignedIdentity() { + return this.useSystemAssignedIdentity; + } + + /** + * Set the useSystemAssignedIdentity property: Specifies if the BI is protected by System Identity. + * + * @param useSystemAssignedIdentity the useSystemAssignedIdentity value to set. + * @return the IdentityDetails object itself. + */ + public IdentityDetails withUseSystemAssignedIdentity(Boolean useSystemAssignedIdentity) { + this.useSystemAssignedIdentity = useSystemAssignedIdentity; + return this; + } + + /** + * Get the userAssignedIdentityArmUrl property: ARM URL for User Assigned Identity. + * + * @return the userAssignedIdentityArmUrl value. + */ + public String userAssignedIdentityArmUrl() { + return this.userAssignedIdentityArmUrl; + } + + /** + * Set the userAssignedIdentityArmUrl property: ARM URL for User Assigned Identity. + * + * @param userAssignedIdentityArmUrl the userAssignedIdentityArmUrl value to set. + * @return the IdentityDetails object itself. + */ + public IdentityDetails withUserAssignedIdentityArmUrl(String userAssignedIdentityArmUrl) { + this.userAssignedIdentityArmUrl = userAssignedIdentityArmUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java index 22e299e8e6cf3..22fcff7f1bf72 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterBackupDatasourceParameters.java @@ -16,58 +16,64 @@ @Fluent public final class KubernetesClusterBackupDatasourceParameters extends BackupDatasourceParameters { /* - * Gets or sets the volume snapshot property. This property if enabled will take volume snapshots during restore. + * Gets or sets the volume snapshot property. This property if enabled will take volume snapshots during backup. */ @JsonProperty(value = "snapshotVolumes", required = true) private boolean snapshotVolumes; /* * Gets or sets the include cluster resources property. This property if enabled will include cluster scope - * resources during restore. + * resources during backup. */ @JsonProperty(value = "includeClusterScopeResources", required = true) private boolean includeClusterScopeResources; /* - * Gets or sets the include namespaces property. This property sets the namespaces to be included during restore. + * Gets or sets the include namespaces property. This property sets the namespaces to be included during backup. */ @JsonProperty(value = "includedNamespaces") private List includedNamespaces; /* - * Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore. + * Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during backup. */ @JsonProperty(value = "excludedNamespaces") private List excludedNamespaces; /* * Gets or sets the include resource types property. This property sets the resource types to be included during - * restore. + * backup. */ @JsonProperty(value = "includedResourceTypes") private List includedResourceTypes; /* * Gets or sets the exclude resource types property. This property sets the resource types to be excluded during - * restore. + * backup. */ @JsonProperty(value = "excludedResourceTypes") private List excludedResourceTypes; /* * Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be - * included during restore. + * included during backup. */ @JsonProperty(value = "labelSelectors") private List labelSelectors; + /* + * Gets or sets the backup hook references. This property sets the hook reference to be executed during backup. + */ + @JsonProperty(value = "backupHookReferences") + private List backupHookReferences; + /** Creates an instance of KubernetesClusterBackupDatasourceParameters class. */ public KubernetesClusterBackupDatasourceParameters() { } /** * Get the snapshotVolumes property: Gets or sets the volume snapshot property. This property if enabled will take - * volume snapshots during restore. + * volume snapshots during backup. * * @return the snapshotVolumes value. */ @@ -77,7 +83,7 @@ public boolean snapshotVolumes() { /** * Set the snapshotVolumes property: Gets or sets the volume snapshot property. This property if enabled will take - * volume snapshots during restore. + * volume snapshots during backup. * * @param snapshotVolumes the snapshotVolumes value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. @@ -89,7 +95,7 @@ public KubernetesClusterBackupDatasourceParameters withSnapshotVolumes(boolean s /** * Get the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property - * if enabled will include cluster scope resources during restore. + * if enabled will include cluster scope resources during backup. * * @return the includeClusterScopeResources value. */ @@ -99,7 +105,7 @@ public boolean includeClusterScopeResources() { /** * Set the includeClusterScopeResources property: Gets or sets the include cluster resources property. This property - * if enabled will include cluster scope resources during restore. + * if enabled will include cluster scope resources during backup. * * @param includeClusterScopeResources the includeClusterScopeResources value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. @@ -112,7 +118,7 @@ public KubernetesClusterBackupDatasourceParameters withIncludeClusterScopeResour /** * Get the includedNamespaces property: Gets or sets the include namespaces property. This property sets the - * namespaces to be included during restore. + * namespaces to be included during backup. * * @return the includedNamespaces value. */ @@ -122,7 +128,7 @@ public List includedNamespaces() { /** * Set the includedNamespaces property: Gets or sets the include namespaces property. This property sets the - * namespaces to be included during restore. + * namespaces to be included during backup. * * @param includedNamespaces the includedNamespaces value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. @@ -134,7 +140,7 @@ public KubernetesClusterBackupDatasourceParameters withIncludedNamespaces(List excludedNamespaces() { /** * Set the excludedNamespaces property: Gets or sets the exclude namespaces property. This property sets the - * namespaces to be excluded during restore. + * namespaces to be excluded during backup. * * @param excludedNamespaces the excludedNamespaces value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. @@ -156,7 +162,7 @@ public KubernetesClusterBackupDatasourceParameters withExcludedNamespaces(List includedResourceTypes() { /** * Set the includedResourceTypes property: Gets or sets the include resource types property. This property sets the - * resource types to be included during restore. + * resource types to be included during backup. * * @param includedResourceTypes the includedResourceTypes value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. @@ -178,7 +184,7 @@ public KubernetesClusterBackupDatasourceParameters withIncludedResourceTypes(Lis /** * Get the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the - * resource types to be excluded during restore. + * resource types to be excluded during backup. * * @return the excludedResourceTypes value. */ @@ -188,7 +194,7 @@ public List excludedResourceTypes() { /** * Set the excludedResourceTypes property: Gets or sets the exclude resource types property. This property sets the - * resource types to be excluded during restore. + * resource types to be excluded during backup. * * @param excludedResourceTypes the excludedResourceTypes value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. @@ -200,7 +206,7 @@ public KubernetesClusterBackupDatasourceParameters withExcludedResourceTypes(Lis /** * Get the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with - * such label selectors to be included during restore. + * such label selectors to be included during backup. * * @return the labelSelectors value. */ @@ -210,7 +216,7 @@ public List labelSelectors() { /** * Set the labelSelectors property: Gets or sets the LabelSelectors property. This property sets the resource with - * such label selectors to be included during restore. + * such label selectors to be included during backup. * * @param labelSelectors the labelSelectors value to set. * @return the KubernetesClusterBackupDatasourceParameters object itself. @@ -220,6 +226,29 @@ public KubernetesClusterBackupDatasourceParameters withLabelSelectors(List backupHookReferences() { + return this.backupHookReferences; + } + + /** + * Set the backupHookReferences property: Gets or sets the backup hook references. This property sets the hook + * reference to be executed during backup. + * + * @param backupHookReferences the backupHookReferences value to set. + * @return the KubernetesClusterBackupDatasourceParameters object itself. + */ + public KubernetesClusterBackupDatasourceParameters withBackupHookReferences( + List backupHookReferences) { + this.backupHookReferences = backupHookReferences; + return this; + } + /** * Validates the instance. * @@ -228,5 +257,8 @@ public KubernetesClusterBackupDatasourceParameters withLabelSelectors(List e.validate()); + } } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java index 307fae2239564..691a4ca2a693a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java @@ -78,6 +78,12 @@ public final class KubernetesClusterRestoreCriteria extends ItemLevelRestoreCrit @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map namespaceMappings; + /* + * Gets or sets the restore hook references. This property sets the hook reference to be executed during restore. + */ + @JsonProperty(value = "restoreHookReferences") + private List restoreHookReferences; + /** Creates an instance of KubernetesClusterRestoreCriteria class. */ public KubernetesClusterRestoreCriteria() { } @@ -281,6 +287,29 @@ public KubernetesClusterRestoreCriteria withNamespaceMappings(Map restoreHookReferences() { + return this.restoreHookReferences; + } + + /** + * Set the restoreHookReferences property: Gets or sets the restore hook references. This property sets the hook + * reference to be executed during restore. + * + * @param restoreHookReferences the restoreHookReferences value to set. + * @return the KubernetesClusterRestoreCriteria object itself. + */ + public KubernetesClusterRestoreCriteria withRestoreHookReferences( + List restoreHookReferences) { + this.restoreHookReferences = restoreHookReferences; + return this; + } + /** * Validates the instance. * @@ -289,5 +318,8 @@ public KubernetesClusterRestoreCriteria withNamespaceMappings(Map e.validate()); + } } } diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java new file mode 100644 index 0000000000000..f07692305c57a --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/NamespacedNameResource.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * NamespacedNameResource + * + *

Class to refer resources which contains namespace and name. + */ +@Fluent +public final class NamespacedNameResource { + /* + * Name of the resource + */ + @JsonProperty(value = "name") + private String name; + + /* + * Namespace in which the resource exists + */ + @JsonProperty(value = "namespace") + private String namespace; + + /** Creates an instance of NamespacedNameResource class. */ + public NamespacedNameResource() { + } + + /** + * Get the name property: Name of the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the resource. + * + * @param name the name value to set. + * @return the NamespacedNameResource object itself. + */ + public NamespacedNameResource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the namespace property: Namespace in which the resource exists. + * + * @return the namespace value. + */ + public String namespace() { + return this.namespace; + } + + /** + * Set the namespace property: Namespace in which the resource exists. + * + * @param namespace the namespace value to set. + * @return the NamespacedNameResource object itself. + */ + public NamespacedNameResource withNamespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperationDetail.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperationDetail.java new file mode 100644 index 0000000000000..9f5046df9fe8e --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardOperationDetail.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VaultCritical Operation protected by a resource guard. */ +@Fluent +public final class ResourceGuardOperationDetail { + /* + * The vaultCriticalOperation property. + */ + @JsonProperty(value = "vaultCriticalOperation") + private String vaultCriticalOperation; + + /* + * The defaultResourceRequest property. + */ + @JsonProperty(value = "defaultResourceRequest") + private String defaultResourceRequest; + + /** Creates an instance of ResourceGuardOperationDetail class. */ + public ResourceGuardOperationDetail() { + } + + /** + * Get the vaultCriticalOperation property: The vaultCriticalOperation property. + * + * @return the vaultCriticalOperation value. + */ + public String vaultCriticalOperation() { + return this.vaultCriticalOperation; + } + + /** + * Set the vaultCriticalOperation property: The vaultCriticalOperation property. + * + * @param vaultCriticalOperation the vaultCriticalOperation value to set. + * @return the ResourceGuardOperationDetail object itself. + */ + public ResourceGuardOperationDetail withVaultCriticalOperation(String vaultCriticalOperation) { + this.vaultCriticalOperation = vaultCriticalOperation; + return this; + } + + /** + * Get the defaultResourceRequest property: The defaultResourceRequest property. + * + * @return the defaultResourceRequest value. + */ + public String defaultResourceRequest() { + return this.defaultResourceRequest; + } + + /** + * Set the defaultResourceRequest property: The defaultResourceRequest property. + * + * @param defaultResourceRequest the defaultResourceRequest value to set. + * @return the ResourceGuardOperationDetail object itself. + */ + public ResourceGuardOperationDetail withDefaultResourceRequest(String defaultResourceRequest) { + this.defaultResourceRequest = defaultResourceRequest; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBase.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBase.java new file mode 100644 index 0000000000000..5a041a34378f9 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBase.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** ResourceGuardProxyBase object, used in ResourceGuardProxyBaseResource. */ +@Fluent +public final class ResourceGuardProxyBase { + /* + * The resourceGuardResourceId property. + */ + @JsonProperty(value = "resourceGuardResourceId") + private String resourceGuardResourceId; + + /* + * The resourceGuardOperationDetails property. + */ + @JsonProperty(value = "resourceGuardOperationDetails") + private List resourceGuardOperationDetails; + + /* + * The lastUpdatedTime property. + */ + @JsonProperty(value = "lastUpdatedTime") + private String lastUpdatedTime; + + /* + * The description property. + */ + @JsonProperty(value = "description") + private String description; + + /** Creates an instance of ResourceGuardProxyBase class. */ + public ResourceGuardProxyBase() { + } + + /** + * Get the resourceGuardResourceId property: The resourceGuardResourceId property. + * + * @return the resourceGuardResourceId value. + */ + public String resourceGuardResourceId() { + return this.resourceGuardResourceId; + } + + /** + * Set the resourceGuardResourceId property: The resourceGuardResourceId property. + * + * @param resourceGuardResourceId the resourceGuardResourceId value to set. + * @return the ResourceGuardProxyBase object itself. + */ + public ResourceGuardProxyBase withResourceGuardResourceId(String resourceGuardResourceId) { + this.resourceGuardResourceId = resourceGuardResourceId; + return this; + } + + /** + * Get the resourceGuardOperationDetails property: The resourceGuardOperationDetails property. + * + * @return the resourceGuardOperationDetails value. + */ + public List resourceGuardOperationDetails() { + return this.resourceGuardOperationDetails; + } + + /** + * Set the resourceGuardOperationDetails property: The resourceGuardOperationDetails property. + * + * @param resourceGuardOperationDetails the resourceGuardOperationDetails value to set. + * @return the ResourceGuardProxyBase object itself. + */ + public ResourceGuardProxyBase withResourceGuardOperationDetails( + List resourceGuardOperationDetails) { + this.resourceGuardOperationDetails = resourceGuardOperationDetails; + return this; + } + + /** + * Get the lastUpdatedTime property: The lastUpdatedTime property. + * + * @return the lastUpdatedTime value. + */ + public String lastUpdatedTime() { + return this.lastUpdatedTime; + } + + /** + * Set the lastUpdatedTime property: The lastUpdatedTime property. + * + * @param lastUpdatedTime the lastUpdatedTime value to set. + * @return the ResourceGuardProxyBase object itself. + */ + public ResourceGuardProxyBase withLastUpdatedTime(String lastUpdatedTime) { + this.lastUpdatedTime = lastUpdatedTime; + return this; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description property. + * + * @param description the description value to set. + * @return the ResourceGuardProxyBase object itself. + */ + public ResourceGuardProxyBase withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceGuardOperationDetails() != null) { + resourceGuardOperationDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResource.java new file mode 100644 index 0000000000000..b55d7e99aba69 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResource.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; + +/** An immutable client-side representation of ResourceGuardProxyBaseResource. */ +public interface ResourceGuardProxyBaseResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: ResourceGuardProxyBaseResource properties. + * + * @return the properties value. + */ + ResourceGuardProxyBase properties(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner object. + * + * @return the inner object. + */ + ResourceGuardProxyBaseResourceInner innerModel(); + + /** The entirety of the ResourceGuardProxyBaseResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The ResourceGuardProxyBaseResource definition stages. */ + interface DefinitionStages { + /** The first stage of the ResourceGuardProxyBaseResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the ResourceGuardProxyBaseResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, vaultName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param vaultName The name of the backup vault. + * @return the next definition stage. + */ + WithCreate withExistingBackupVault(String resourceGroupName, String vaultName); + } + /** + * The stage of the ResourceGuardProxyBaseResource definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ResourceGuardProxyBaseResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ResourceGuardProxyBaseResource create(Context context); + } + /** The stage of the ResourceGuardProxyBaseResource definition allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: ResourceGuardProxyBaseResource properties. + * + * @param properties ResourceGuardProxyBaseResource properties. + * @return the next definition stage. + */ + WithCreate withProperties(ResourceGuardProxyBase properties); + } + } + /** + * Begins update for the ResourceGuardProxyBaseResource resource. + * + * @return the stage of resource update. + */ + ResourceGuardProxyBaseResource.Update update(); + + /** The template for ResourceGuardProxyBaseResource update. */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ResourceGuardProxyBaseResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ResourceGuardProxyBaseResource apply(Context context); + } + /** The ResourceGuardProxyBaseResource update stages. */ + interface UpdateStages { + /** The stage of the ResourceGuardProxyBaseResource update allowing to specify properties. */ + interface WithProperties { + /** + * Specifies the properties property: ResourceGuardProxyBaseResource properties. + * + * @param properties ResourceGuardProxyBaseResource properties. + * @return the next definition stage. + */ + Update withProperties(ResourceGuardProxyBase properties); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ResourceGuardProxyBaseResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ResourceGuardProxyBaseResource refresh(Context context); + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param parameters Request body for operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API along with {@link Response}. + */ + Response unlockDeleteWithResponse(UnlockDeleteRequest parameters, Context context); + + /** + * UnlockDelete call for ResourceGuardProxy, executed before one can delete it. + * + * @param parameters Request body for operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response of Unlock Delete API. + */ + UnlockDeleteResponse unlockDelete(UnlockDeleteRequest parameters); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java new file mode 100644 index 0000000000000..650c360c24889 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourceGuardProxyBaseResourceList.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardProxyBaseResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of ResourceGuardProxyBase resources. */ +@Fluent +public final class ResourceGuardProxyBaseResourceList extends DppResourceList { + /* + * List of resources. + */ + @JsonProperty(value = "value") + private List value; + + /** Creates an instance of ResourceGuardProxyBaseResourceList class. */ + public ResourceGuardProxyBaseResourceList() { + } + + /** + * Get the value property: List of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of resources. + * + * @param value the value value to set. + * @return the ResourceGuardProxyBaseResourceList object itself. + */ + public ResourceGuardProxyBaseResourceList withValue(List value) { + this.value = value; + return this; + } + + /** {@inheritDoc} */ + @Override + public ResourceGuardProxyBaseResourceList withNextLink(String nextLink) { + super.withNextLink(nextLink); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java index 4aed0a36fff64..5d2e414130268 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ScheduleBasedBackupCriteria.java @@ -21,7 +21,7 @@ @Fluent public final class ScheduleBasedBackupCriteria extends BackupCriteria { /* - * it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" + * it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / "FirstOfWeek"\ / "FirstOfMonth" * and should be part of AbsoluteMarker enum */ @JsonProperty(value = "absoluteCriteria") @@ -62,8 +62,8 @@ public ScheduleBasedBackupCriteria() { } /** - * Get the absoluteCriteria property: it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / - * "FirstOfMonth" and should be part of AbsoluteMarker enum. + * Get the absoluteCriteria property: it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / "FirstOfWeek"\ + * / "FirstOfMonth" and should be part of AbsoluteMarker enum. * * @return the absoluteCriteria value. */ @@ -72,8 +72,8 @@ public List absoluteCriteria() { } /** - * Set the absoluteCriteria property: it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / - * "FirstOfMonth" and should be part of AbsoluteMarker enum. + * Set the absoluteCriteria property: it contains absolute values like "AllBackup"\ / "FirstOfDay"\ / "FirstOfWeek"\ + * / "FirstOfMonth" and should be part of AbsoluteMarker enum. * * @param absoluteCriteria the absoluteCriteria value to set. * @return the ScheduleBasedBackupCriteria object itself. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java new file mode 100644 index 0000000000000..aabf158c6736f --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecureScoreLevel.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Secure Score of Backup Vault. */ +public final class SecureScoreLevel extends ExpandableStringEnum { + /** Static value None for SecureScoreLevel. */ + public static final SecureScoreLevel NONE = fromString("None"); + + /** Static value Minimum for SecureScoreLevel. */ + public static final SecureScoreLevel MINIMUM = fromString("Minimum"); + + /** Static value Adequate for SecureScoreLevel. */ + public static final SecureScoreLevel ADEQUATE = fromString("Adequate"); + + /** Static value Maximum for SecureScoreLevel. */ + public static final SecureScoreLevel MAXIMUM = fromString("Maximum"); + + /** Static value NotSupported for SecureScoreLevel. */ + public static final SecureScoreLevel NOT_SUPPORTED = fromString("NotSupported"); + + /** + * Creates a new instance of SecureScoreLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecureScoreLevel() { + } + + /** + * Creates or finds a SecureScoreLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding SecureScoreLevel. + */ + @JsonCreator + public static SecureScoreLevel fromString(String name) { + return fromString(name, SecureScoreLevel.class); + } + + /** + * Gets known SecureScoreLevel values. + * + * @return known SecureScoreLevel values. + */ + public static Collection values() { + return values(SecureScoreLevel.class); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteRequest.java new file mode 100644 index 0000000000000..fe324d2d291e9 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteRequest.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Request body of unlock delete API. */ +@Fluent +public final class UnlockDeleteRequest { + /* + * The resourceGuardOperationRequests property. + */ + @JsonProperty(value = "resourceGuardOperationRequests") + private List resourceGuardOperationRequests; + + /* + * The resourceToBeDeleted property. + */ + @JsonProperty(value = "resourceToBeDeleted") + private String resourceToBeDeleted; + + /** Creates an instance of UnlockDeleteRequest class. */ + public UnlockDeleteRequest() { + } + + /** + * Get the resourceGuardOperationRequests property: The resourceGuardOperationRequests property. + * + * @return the resourceGuardOperationRequests value. + */ + public List resourceGuardOperationRequests() { + return this.resourceGuardOperationRequests; + } + + /** + * Set the resourceGuardOperationRequests property: The resourceGuardOperationRequests property. + * + * @param resourceGuardOperationRequests the resourceGuardOperationRequests value to set. + * @return the UnlockDeleteRequest object itself. + */ + public UnlockDeleteRequest withResourceGuardOperationRequests(List resourceGuardOperationRequests) { + this.resourceGuardOperationRequests = resourceGuardOperationRequests; + return this; + } + + /** + * Get the resourceToBeDeleted property: The resourceToBeDeleted property. + * + * @return the resourceToBeDeleted value. + */ + public String resourceToBeDeleted() { + return this.resourceToBeDeleted; + } + + /** + * Set the resourceToBeDeleted property: The resourceToBeDeleted property. + * + * @param resourceToBeDeleted the resourceToBeDeleted value to set. + * @return the UnlockDeleteRequest object itself. + */ + public UnlockDeleteRequest withResourceToBeDeleted(String resourceToBeDeleted) { + this.resourceToBeDeleted = resourceToBeDeleted; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteResponse.java new file mode 100644 index 0000000000000..70ba49be1512e --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UnlockDeleteResponse.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner; + +/** An immutable client-side representation of UnlockDeleteResponse. */ +public interface UnlockDeleteResponse { + /** + * Gets the unlockDeleteExpiryTime property: This is the time when unlock delete privileges will get expired. + * + * @return the unlockDeleteExpiryTime value. + */ + String unlockDeleteExpiryTime(); + + /** + * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.UnlockDeleteResponseInner object. + * + * @return the inner object. + */ + UnlockDeleteResponseInner innerModel(); +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentityDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentityDetails.java new file mode 100644 index 0000000000000..fc5ce7a183f3d --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserAssignedIdentityDetails.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** User Assigned Identity Details. */ +@Immutable +public final class UserAssignedIdentityDetails { + /* + * The Client Id of the User Assigned Managed Identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /* + * The Object Id of the User Assigned Managed Identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** Creates an instance of UserAssignedIdentityDetails class. */ + public UserAssignedIdentityDetails() { + } + + /** + * Get the clientId property: The Client Id of the User Assigned Managed Identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Get the principalId property: The Object Id of the User Assigned Managed Identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java index e1f7f92751a75..208ca31a5420b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java @@ -11,7 +11,7 @@ /** Samples for BackupInstances AdhocBackup. */ public final class BackupInstancesAdhocBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerBackup.json */ /** * Sample code: Trigger Adhoc Backup. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java index d47bc4c095051..b4b21fdc8a4a2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java @@ -22,7 +22,7 @@ /** Samples for BackupInstances CreateOrUpdate. */ public final class BackupInstancesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/PutBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/PutBackupInstance.json */ /** * Sample code: Create BackupInstance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java index a5ecf39862d71..7eb642f787923 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances Delete. */ public final class BackupInstancesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/DeleteBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/DeleteBackupInstance.json */ /** * Sample code: Delete BackupInstance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java index ed9a665f2390c..0dd48d28d5d6a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances GetBackupInstanceOperationResult. */ public final class BackupInstancesGetBackupInstanceOperationResultSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json */ /** * Sample code: Get BackupInstanceOperationResult. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java index 7e1748b397ed5..7fb8a8b3d4d18 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances Get. */ public final class BackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/GetBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstance.json */ /** * Sample code: Get BackupInstance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java index 5ba92edc6cd1b..32d7daf747ec2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances List. */ public final class BackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ListBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListBackupInstances.json */ /** * Sample code: List BackupInstances in a Vault. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java index bf27ffa9c0b07..abf56619c96ae 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances ResumeBackups. */ public final class BackupInstancesResumeBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ResumeBackups.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeBackups.json */ /** * Sample code: ResumeBackups. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java index e106ee120bafe..01090850fc76e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances ResumeProtection. */ public final class BackupInstancesResumeProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ResumeProtection.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeProtection.json */ /** * Sample code: ResumeProtection. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java index 87b9dc181b8b8..b86b859dea2fa 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances StopProtection. */ public final class BackupInstancesStopProtectionSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/StopProtection.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/StopProtection.json */ /** * Sample code: StopProtection. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java index 190a9d029b144..4732c58049a1e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupInstances SuspendBackups. */ public final class BackupInstancesSuspendBackupsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/SuspendBackups.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SuspendBackups.json */ /** * Sample code: SuspendBackups. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java index f6afbbe556577..8c4bcaa07231e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java @@ -10,7 +10,7 @@ /** Samples for BackupInstances SyncBackupInstance. */ public final class BackupInstancesSyncBackupInstanceSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/SyncBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SyncBackupInstance.json */ /** * Sample code: Sync BackupInstance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java index d3f86ffedbf82..14489854a7636 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java @@ -10,7 +10,7 @@ /** Samples for BackupInstances TriggerRehydrate. */ public final class BackupInstancesTriggerRehydrateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRehydrate.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRehydrate.json */ /** * Sample code: Trigger Rehydrate. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java index 23882f544b333..958aafe207f73 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java @@ -22,7 +22,7 @@ /** Samples for BackupInstances TriggerRestore. */ public final class BackupInstancesTriggerRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json */ /** * Sample code: Trigger Restore As Files. @@ -54,7 +54,7 @@ public static void triggerRestoreAsFiles(com.azure.resourcemanager.dataprotectio } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json */ /** * Sample code: Trigger Restore With Rehydration. @@ -104,7 +104,7 @@ public static void triggerRestoreWithRehydration( } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/TriggerRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestore.json */ /** * Sample code: Trigger Restore. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java index 710fc813657f8..f57b299a0804e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java @@ -16,7 +16,7 @@ /** Samples for BackupInstances ValidateForBackup. */ public final class BackupInstancesValidateForBackupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ValidateForBackup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateForBackup.json */ /** * Sample code: Validate For Backup. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java index eedc78502099c..a89e8dfde0333 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java @@ -18,7 +18,7 @@ /** Samples for BackupInstances ValidateForRestore. */ public final class BackupInstancesValidateForRestoreSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ValidateRestore.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateRestore.json */ /** * Sample code: Validate Restore. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java index 04a4a94c6f195..22f12b55df1b9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java @@ -24,7 +24,7 @@ /** Samples for BackupPolicies CreateOrUpdate. */ public final class BackupPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json */ /** * Sample code: CreateOrUpdate BackupPolicy. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java index f1de428037c80..d75e7a70ba530 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupPolicies Delete. */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/DeleteBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/DeleteBackupPolicy.json */ /** * Sample code: Delete BackupPolicy. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java index d156004eb3b6a..7c5d1004e44f8 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupPolicies Get. */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/GetBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/GetBackupPolicy.json */ /** * Sample code: Get BackupPolicy. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java index da187067f5179..29a9f7fb8dc1c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupPolicies List. */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/PolicyCRUD/ListBackupPolicy.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/ListBackupPolicy.json */ /** * Sample code: List BackupPolicy. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java index 4394bacbdc655..a6ddabc610c98 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupVaultOperationResults Get. */ public final class BackupVaultOperationResultsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetOperationResultPatch.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetOperationResultPatch.json */ /** * Sample code: GetOperationResult Patch. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java index c3890a967acc4..cfa63552b2f16 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for BackupVaults CheckNameAvailability. */ public final class BackupVaultsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json */ /** * Sample code: Check BackupVaults name availability. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java index e606871d204ca..51a1a56960c2c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java @@ -7,8 +7,14 @@ import com.azure.resourcemanager.dataprotection.models.AlertsState; import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings; import com.azure.resourcemanager.dataprotection.models.BackupVault; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings; +import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState; import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails; +import com.azure.resourcemanager.dataprotection.models.FeatureSettings; import com.azure.resourcemanager.dataprotection.models.MonitoringSettings; +import com.azure.resourcemanager.dataprotection.models.SecuritySettings; +import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings; +import com.azure.resourcemanager.dataprotection.models.SoftDeleteState; import com.azure.resourcemanager.dataprotection.models.StorageSetting; import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes; import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes; @@ -19,7 +25,7 @@ /** Samples for BackupVaults CreateOrUpdate. */ public final class BackupVaultsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/PutBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVault.json */ /** * Sample code: Create BackupVault. @@ -38,19 +44,29 @@ public static void createBackupVault(com.azure.resourcemanager.dataprotection.Da new MonitoringSettings() .withAzureMonitorAlertSettings( new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) + .withSecuritySettings( + new SecuritySettings() + .withSoftDeleteSettings( + new SoftDeleteSettings() + .withState(SoftDeleteState.fromString("Enabled")) + .withRetentionDurationInDays(14.0D))) .withStorageSettings( Arrays .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withFeatureSettings( + new FeatureSettings() + .withCrossRegionRestoreSettings( + new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("None")) .create(); } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/PutBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVaultWithMSI.json */ /** * Sample code: Create BackupVault With MSI. @@ -70,12 +86,22 @@ public static void createBackupVaultWithMSI( new MonitoringSettings() .withAzureMonitorAlertSettings( new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED))) + .withSecuritySettings( + new SecuritySettings() + .withSoftDeleteSettings( + new SoftDeleteSettings() + .withState(SoftDeleteState.fromString("Enabled")) + .withRetentionDurationInDays(14.0D))) .withStorageSettings( Arrays .asList( new StorageSetting() .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE) - .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))) + .withType(StorageSettingTypes.LOCALLY_REDUNDANT))) + .withFeatureSettings( + new FeatureSettings() + .withCrossRegionRestoreSettings( + new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)))) .withTags(mapOf("key1", "val1")) .withIdentity(new DppIdentityDetails().withType("systemAssigned")) .create(); diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java index 95e82ea6e695e..0ae4c14ca1a2f 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupVaults Delete. */ public final class BackupVaultsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/DeleteBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/DeleteBackupVault.json */ /** * Sample code: Delete BackupVault. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java index f516de8c1b398..123dbedf31926 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupVaults GetByResourceGroup. */ public final class BackupVaultsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVault.json */ /** * Sample code: Get BackupVault. @@ -21,7 +21,7 @@ public static void getBackupVault(com.azure.resourcemanager.dataprotection.DataP } /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVaultWithMSI.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultWithMSI.json */ /** * Sample code: Get BackupVault With MSI. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java index a0371db1247d1..8c2d566f1a1ad 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupVaults ListByResourceGroup. */ public final class BackupVaultsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json */ /** * Sample code: Get BackupVaults in ResourceGroup. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java index 7b871d5b8f61b..9f3b83b1156d0 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java @@ -7,7 +7,7 @@ /** Samples for BackupVaults List. */ public final class BackupVaultsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json */ /** * Sample code: Get BackupVaults in Subscription. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java index 1a528300410d3..179ae48c70218 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java @@ -15,7 +15,7 @@ /** Samples for BackupVaults Update. */ public final class BackupVaultsUpdateSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/VaultCRUD/PatchBackupVault.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PatchBackupVault.json */ /** * Sample code: Patch BackupVault. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java index 10f34629a0cb2..2c129ffb8653e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java @@ -10,7 +10,7 @@ /** Samples for DataProtection CheckFeatureSupport. */ public final class DataProtectionCheckFeatureSupportSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/CheckfeatureSupport.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/CheckfeatureSupport.json */ /** * Sample code: Check Azure Vm Backup Feature Support. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java index faca35484bb73..f6cd03c51a614 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for DataProtectionOperations List. */ public final class DataProtectionOperationsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/Operations/List.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/Operations/List.json */ /** * Sample code: Returns the list of supported REST operations. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java index a93dbdd9daefb..07fac63e4ea4e 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for DeletedBackupInstances Get. */ public final class DeletedBackupInstancesGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json */ /** * Sample code: Get DeletedBackupInstance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java index ec1fb1030192c..575dde67d21cc 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java @@ -7,7 +7,7 @@ /** Samples for DeletedBackupInstances List. */ public final class DeletedBackupInstancesListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json */ /** * Sample code: List DeletedBackupInstances in a Vault. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java index 491ac8399f569..dfed1a2d7c4c6 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for DeletedBackupInstances Undelete. */ public final class DeletedBackupInstancesUndeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json */ /** * Sample code: Undelete Deleted BackupInstance. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..5c553ff7e3aac --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase; + +/** Samples for DppResourceGuardProxy CreateOrUpdate. */ +public final class DppResourceGuardProxyCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json + */ + /** + * Sample code: Create ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void createResourceGuardProxy( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .define("swaggerExample") + .withExistingBackupVault("SampleResourceGroup", "sampleVault") + .withProperties( + new ResourceGuardProxyBase() + .withResourceGuardResourceId( + "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource")) + .create(); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java new file mode 100644 index 0000000000000..f9f5d06172de3 --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +/** Samples for DppResourceGuardProxy Delete. */ +public final class DppResourceGuardProxyDeleteSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json + */ + /** + * Sample code: Delete ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void deleteResourceGuardProxy( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .deleteWithResponse( + "SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java new file mode 100644 index 0000000000000..f7d85c583de2b --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +/** Samples for DppResourceGuardProxy Get. */ +public final class DppResourceGuardProxyGetSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json + */ + /** + * Sample code: Get ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getResourceGuardProxy(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .getWithResponse("SampleResourceGroup", "sampleVault", "swaggerExample", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java new file mode 100644 index 0000000000000..3367b13a747ce --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +/** Samples for DppResourceGuardProxy List. */ +public final class DppResourceGuardProxyListSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json + */ + /** + * Sample code: Get ResourceGuardProxies. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void getResourceGuardProxies(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager.dppResourceGuardProxies().list("SampleResourceGroup", "sampleVault", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java new file mode 100644 index 0000000000000..d8ae569c5a1ce --- /dev/null +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dataprotection.generated; + +import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest; +import java.util.Arrays; + +/** Samples for DppResourceGuardProxy UnlockDelete. */ +public final class DppResourceGuardProxyUnlockDeleteSamples { + /* + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json + */ + /** + * Sample code: UnlockDelete ResourceGuardProxy. + * + * @param manager Entry point to DataProtectionManager. + */ + public static void unlockDeleteResourceGuardProxy( + com.azure.resourcemanager.dataprotection.DataProtectionManager manager) { + manager + .dppResourceGuardProxies() + .unlockDeleteWithResponse( + "SampleResourceGroup", + "sampleVault", + "swaggerExample", + new UnlockDeleteRequest() + .withResourceGuardOperationRequests( + Arrays + .asList( + "/subscriptions/f9e67185-f313-4e79-aa71-6458d429369d/resourceGroups/ResourceGuardSecurityAdminRG/providers/Microsoft.DataProtection/resourceGuards/ResourceGuardTestResource/deleteBackupInstanceRequests/default")) + .withResourceToBeDeleted( + "/subscriptions/5e13b949-1218-4d18-8b99-7e12155ec4f7/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupInstances/TestBI9779f4de"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java index ef547827169dd..8250c5f7e91fd 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ExportJobsOperationResult Get. */ public final class ExportJobsOperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/GetExportJobsOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetExportJobsOperationResult.json */ /** * Sample code: Get Export Jobs Operation Result. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java index 825f228e56556..0454ae339ad8a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java @@ -7,7 +7,7 @@ /** Samples for ExportJobs Trigger. */ public final class ExportJobsTriggerSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/TriggerExportJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/TriggerExportJobs.json */ /** * Sample code: Trigger Export Jobs. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java index a81af15a80dbe..0981afc333f34 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs Get. */ public final class JobsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/GetJob.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetJob.json */ /** * Sample code: Get Job. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java index 9c6ead6aa081c..019c1e0dfc647 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/JobCRUD/ListJobs.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/ListJobs.json */ /** * Sample code: Get Jobs. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java index be78fc8f25233..d2906edecf9c9 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java @@ -7,7 +7,7 @@ /** Samples for OperationResult Get. */ public final class OperationResultGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationResult.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationResult.json */ /** * Sample code: Get OperationResult. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java index 7342b86b913ff..a281b93ad064b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java @@ -7,7 +7,7 @@ /** Samples for OperationStatusBackupVaultContext Get. */ public final class OperationStatusBackupVaultContextGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationStatusVaultContext.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusVaultContext.json */ /** * Sample code: Get OperationStatus. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java index 096333fd704f0..920bf64b2847a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java @@ -7,7 +7,7 @@ /** Samples for OperationStatus Get. */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationStatus.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatus.json */ /** * Sample code: Get OperationStatus. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java index 0c004679aae62..03924ca173c47 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for OperationStatusResourceGroupContext GetByResourceGroup. */ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/GetOperationStatusRGContext.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusRGContext.json */ /** * Sample code: Get OperationStatus. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java index a1821f2bdc387..d24c26251eb4a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for RecoveryPoints Get. */ public final class RecoveryPointsGetSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/GetRecoveryPoint.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetRecoveryPoint.json */ /** * Sample code: Get Recovery Point. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java index 529f9e77de1e4..924e5ba321f93 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java @@ -7,7 +7,7 @@ /** Samples for RecoveryPoints List. */ public final class RecoveryPointsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/ListRecoveryPoints.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListRecoveryPoints.json */ /** * Sample code: List Recovery Points in a Vault. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java index c144cd46dfd94..f38dec425fdf7 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards Delete. */ public final class ResourceGuardsDeleteSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json */ /** * Sample code: Delete ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java index f6eb10769ae79..79e6d86acdc5a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. */ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java index e6b590bf50c93..fce86eae21d9a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetByResourceGroup. */ public final class ResourceGuardsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuard.json */ /** * Sample code: Get ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java index 14cec92792151..a1990e7879369 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. */ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java index 79b976f8db32b..5fbef308d8b18 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java index f276a98bb765c..f11989c0ab287 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. */ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java index b3597582716dd..7f4ae28344ccb 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. */ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java index a8c5f7c6448b8..e55c42b1171f4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java index dad91f4f75efc..abef4432daeae 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. */ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json */ /** * Sample code: Get DefaultOperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java index ebc32c13aee01..71d1146abc4e3 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. */ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java index 388dd19e7b8f4..c478aa6a60fd4 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. */ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java index 43f669f51d0e3..650ce89bc7e2a 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. */ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java index 1de2194603060..64d591180669c 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java index e8cd2642990a2..f6ae66da5e080 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. */ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json */ /** * Sample code: List OperationsRequestObject. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java index dad9e15d5cd2c..27e3454390c0d 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards ListByResourceGroup. */ public final class ResourceGuardsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json */ /** * Sample code: Get ResourceGuards in ResourceGroup. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java index 37b8174816aca..7caa7f83569d2 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceGuards List. */ public final class ResourceGuardsListSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json */ /** * Sample code: Get ResourceGuards in Subscription. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java index 8b70436cb0def..6a95fe1dc9316 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java @@ -11,7 +11,7 @@ /** Samples for ResourceGuards Patch. */ public final class ResourceGuardsPatchSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/PatchResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PatchResourceGuard.json */ /** * Sample code: Patch ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java index e0540f71ee1e2..e0a526ee1b33b 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java @@ -10,7 +10,7 @@ /** Samples for ResourceGuards Put. */ public final class ResourceGuardsPutSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/ResourceGuardCRUD/PutResourceGuard.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PutResourceGuard.json */ /** * Sample code: Create ResourceGuard. diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java index 6a68c06861650..e70ef5fc945ce 100644 --- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java +++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java @@ -10,7 +10,7 @@ /** Samples for RestorableTimeRanges Find. */ public final class RestorableTimeRangesFindSamples { /* - * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json + * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json */ /** * Sample code: Find Restorable Time Ranges.