diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
index b38ab60e54421..0ebe18cb0fa3a 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
@@ -1,14 +1,86 @@
# Release History
-## 1.7.0-beta.2 (Unreleased)
+## 1.7.0-beta.2 (2026-10-15)
+
+- Azure Resource Manager Data Protection client library for Java. This package contains Microsoft Azure SDK for Data Protection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package api-version 2026-08-31-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
-### Breaking Changes
+* `models.RecoveryPointFromDppCrossTenantVaults` was added
+
+* `models.CrossTenantVaultMappingStatusResponse` was added
+
+* `models.CrossTenantBackupInstance` was added
+
+* `models.CrossTenantVaultMapping$Definition` was added
+
+* `models.DppCrossTenantVaultMappingStatus` was added
+
+* `models.CrossTenantBackupInstanceResource` was added
+
+* `models.CrossTenantVaultMappingRemoveRequest` was added
+
+* `models.CrossTenantSecretStoreBasedAuthCredentials` was added
+
+* `models.BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders` was added
+
+* `models.CrossTenantVaultMapping` was added
+
+* `models.BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse` was added
+
+* `models.RestoresFromDppCrossTenantVaults` was added
+
+* `models.CrossTenantAuthCredentials` was added
+
+* `models.CrossTenantVaultMappingRemoveRequestProperties` was added
+
+* `models.DppCrossTenantVaultMappings` was added
-### Bugs Fixed
+* `models.BackupInstanceOperationStatusFromDppCrossTenantVaults` was added
+
+* `models.BackupInstancesFromDppCrossTenantVaults` was added
+
+* `models.VaultMappingState` was added
+
+* `models.CrossTenantVaultMapping$UpdateStages` was added
+
+* `models.BackupInstanceOperationResultFromDppCrossTenantVaults` was added
+
+* `models.ValidateRestoreFromDppCrossTenantVaults` was added
+
+* `models.RecoveryPointsFromDppCrossTenantVaults` was added
+
+* `models.CrossTenantVaultMappingProperties` was added
+
+* `models.CrossTenantSecretStoreResource` was added
+
+* `models.JobFromDppCrossTenantVaults` was added
+
+* `models.RestorableTimeRangesFromDppCrossTenantVaults` was added
+
+* `models.CrossTenantVaultMapping$DefinitionStages` was added
+
+* `models.BackupInstanceFromDppCrossTenantVaults` was added
+
+* `models.CrossTenantVaultMapping$Update` was added
+
+* `models.BackupJobsFromDppCrossTenantVaults` was added
+
+#### `DataProtectionManager` was modified
-### Other Changes
+* `restoresFromDppCrossTenantVaults()` was added
+* `backupInstanceOperationResultFromDppCrossTenantVaults()` was added
+* `recoveryPointsFromDppCrossTenantVaults()` was added
+* `dppCrossTenantVaultMappings()` was added
+* `recoveryPointFromDppCrossTenantVaults()` was added
+* `backupInstanceOperationStatusFromDppCrossTenantVaults()` was added
+* `backupInstanceFromDppCrossTenantVaults()` was added
+* `backupInstancesFromDppCrossTenantVaults()` was added
+* `validateRestoreFromDppCrossTenantVaults()` was added
+* `dppCrossTenantVaultMappingStatus()` was added
+* `backupJobsFromDppCrossTenantVaults()` was added
+* `jobFromDppCrossTenantVaults()` was added
+* `restorableTimeRangesFromDppCrossTenantVaults()` was added
## 1.7.0-beta.1 (2026-09-28)
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md
index 6fb39e4a92db9..2d2c093d2d8a1 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Data Protection client library for Java.
-This package contains Microsoft Azure SDK for Data Protection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package api-version 2026-07-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 Data Protection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package api-version 2026-08-31-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-dataprotection
- 1.7.0-beta.1
+ 1.7.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md
index 91d83f17fe89a..828b13e79fa46 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/SAMPLE.md
@@ -1,6 +1,18 @@
# Code snippets and samples
+## BackupInstanceFromDppCrossTenantVault
+
+- [Get](#backupinstancefromdppcrosstenantvault_get)
+
+## BackupInstanceOperationResultFromDppCrossTenantVault
+
+- [Get](#backupinstanceoperationresultfromdppcrosstenantvault_get)
+
+## BackupInstanceOperationStatusFromDppCrossTenantVault
+
+- [Get](#backupinstanceoperationstatusfromdppcrosstenantvault_get)
+
## BackupInstances
- [AdhocBackup](#backupinstances_adhocbackup)
@@ -26,6 +38,14 @@
- [List](#backupinstancesextensionrouting_list)
+## BackupInstancesFromDppCrossTenantVault
+
+- [List](#backupinstancesfromdppcrosstenantvault_list)
+
+## BackupJobsFromDppCrossTenantVault
+
+- [List](#backupjobsfromdppcrosstenantvault_list)
+
## BackupPolicies
- [CreateOrUpdate](#backuppolicies_createorupdate)
@@ -66,6 +86,17 @@
- [Get](#deletedbackupvaults_get)
- [ListByLocation](#deletedbackupvaults_listbylocation)
+## DppCrossTenantVaultMappingStatus
+
+- [Check](#dppcrosstenantvaultmappingstatus_check)
+
+## DppCrossTenantVaultMappings
+
+- [CreateOrUpdate](#dppcrosstenantvaultmappings_createorupdate)
+- [Get](#dppcrosstenantvaultmappings_get)
+- [List](#dppcrosstenantvaultmappings_list)
+- [Remove](#dppcrosstenantvaultmappings_remove)
+
## DppResourceGuardProxy
- [CreateOrUpdate](#dppresourceguardproxy_createorupdate)
@@ -94,6 +125,10 @@
- [List](#fetchsecondaryrecoverypoints_list)
+## JobFromDppCrossTenantVault
+
+- [Get](#jobfromdppcrosstenantvault_get)
+
## Jobs
- [Get](#jobs_get)
@@ -115,11 +150,19 @@
- [GetByResourceGroup](#operationstatusresourcegroupcontext_getbyresourcegroup)
+## RecoveryPointFromDppCrossTenantVault
+
+- [Get](#recoverypointfromdppcrosstenantvault_get)
+
## RecoveryPoints
- [Get](#recoverypoints_get)
- [List](#recoverypoints_list)
+## RecoveryPointsFromDppCrossTenantVault
+
+- [List](#recoverypointsfromdppcrosstenantvault_list)
+
## ResourceGuards
- [Delete](#resourceguards_delete)
@@ -144,6 +187,95 @@
## RestorableTimeRanges
- [Find](#restorabletimeranges_find)
+
+## RestorableTimeRangesFromDppCrossTenantVault
+
+- [Find](#restorabletimerangesfromdppcrosstenantvault_find)
+
+## RestoresFromDppCrossTenantVault
+
+- [Trigger](#restoresfromdppcrosstenantvault_trigger)
+
+## ValidateRestoreFromDppCrossTenantVault
+
+- [Trigger](#validaterestorefromdppcrosstenantvault_trigger)
+### BackupInstanceFromDppCrossTenantVault_Get
+
+```java
+/**
+ * Samples for BackupInstanceFromDppCrossTenantVault Get.
+ */
+public final class BackupInstanceFromDppCrossTenantVaultGetSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/BackupInstanceFromDppCrossTenantVault_Get.json
+ */
+ /**
+ * Sample code: Get a backup instance from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void getABackupInstanceFromACrossTenantVault(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupInstanceFromDppCrossTenantVaults()
+ .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### BackupInstanceOperationResultFromDppCrossTenantVault_Get
+
+```java
+/**
+ * Samples for BackupInstanceOperationResultFromDppCrossTenantVault Get.
+ */
+public final class BackupInstanceOperationResultFromDppCrossTenantVaultGetSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/BackupInstanceOperationResultFromDppCrossTenantVault_Get.
+ * json
+ */
+ /**
+ * Sample code: Get cross-tenant operation result.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ getCrossTenantOperationResult(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupInstanceOperationResultFromDppCrossTenantVaults()
+ .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1",
+ "YWUzNDFkMzQtZmM5Yy00OGE4LWE5ZDgtY2VhMDAwMDAwMDAw", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### BackupInstanceOperationStatusFromDppCrossTenantVault_Get
+
+```java
+/**
+ * Samples for BackupInstanceOperationStatusFromDppCrossTenantVault Get.
+ */
+public final class BackupInstanceOperationStatusFromDppCrossTenantVaultGetSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/BackupInstanceOperationStatusFromDppCrossTenantVault_Get.
+ * json
+ */
+ /**
+ * Sample code: Get cross-tenant operation status.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ getCrossTenantOperationStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupInstanceOperationStatusFromDppCrossTenantVaults()
+ .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1",
+ "YWUzNDFkMzQtZmM5Yy00OGE4LWE5ZDgtY2VhMDAwMDAwMDAw", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### BackupInstances_AdhocBackup
```java
@@ -156,7 +288,7 @@ import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
*/
public final class BackupInstancesAdhocBackupSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/TriggerBackup.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/TriggerBackup.json
*/
/**
* Sample code: Trigger Adhoc Backup.
@@ -182,7 +314,6 @@ import com.azure.resourcemanager.dataprotection.models.AdlsBlobBackupDatasourceP
import com.azure.resourcemanager.dataprotection.models.AdlsBlobBackupDatasourceParametersForAutoProtection;
import com.azure.resourcemanager.dataprotection.models.AzureOperationalStoreParameters;
import com.azure.resourcemanager.dataprotection.models.BackupInstance;
-import com.azure.resourcemanager.dataprotection.models.BackupSolutionType;
import com.azure.resourcemanager.dataprotection.models.BlobBackupAutoProtectionRule;
import com.azure.resourcemanager.dataprotection.models.BlobBackupDatasourceParametersForAutoProtection;
import com.azure.resourcemanager.dataprotection.models.BlobBackupPatternType;
@@ -196,7 +327,6 @@ import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
import com.azure.resourcemanager.dataprotection.models.KubernetesClusterBackupDatasourceParameters;
import com.azure.resourcemanager.dataprotection.models.PolicyInfo;
import com.azure.resourcemanager.dataprotection.models.PolicyParameters;
-import com.azure.resourcemanager.dataprotection.models.PostgreSqlFlexibleServerBackupDatasourceParameters;
import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials;
import com.azure.resourcemanager.dataprotection.models.SecretStoreResource;
import com.azure.resourcemanager.dataprotection.models.SecretStoreType;
@@ -210,7 +340,7 @@ import java.util.Map;
*/
public final class BackupInstancesCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/PutBackupInstance.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/PutBackupInstance.json
*/
/**
* Sample code: Create BackupInstance.
@@ -257,7 +387,7 @@ public final class BackupInstancesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/PutBackupInstanceWithGenericParameters.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/PutBackupInstanceWithGenericParameters.json
*/
/**
* Sample code: Create BackupInstance with GenericBackupDatasourceParameters.
@@ -300,7 +430,8 @@ public final class BackupInstancesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/PutBackupInstance_ADLSBlobBackupDatasourceParameters.json
+ * x-ms-original-file:
+ * 2026-08-31-preview/BackupInstanceOperations/PutBackupInstance_ADLSBlobBackupDatasourceParameters.json
*/
/**
* Sample code: Create BackupInstance With ADLSBlobBackupDatasourceParameters.
@@ -342,7 +473,7 @@ public final class BackupInstancesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/PutBackupInstance_ResourceGuardEnabled.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/PutBackupInstance_ResourceGuardEnabled.json
*/
/**
* Sample code: Create BackupInstance to perform critical operation With MUA.
@@ -389,7 +520,7 @@ public final class BackupInstancesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/PutBackupInstance_BlobBackupAutoProtection.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/PutBackupInstance_BlobBackupAutoProtection.json
*/
/**
* Sample code: Create BackupInstance With BlobBackupAutoProtection.
@@ -442,7 +573,7 @@ public final class BackupInstancesCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * 2026-07-01/BackupInstanceOperations/PutBackupInstance_KubernetesClusterBackupDatasourceParameters.json
+ * 2026-08-31-preview/BackupInstanceOperations/PutBackupInstance_KubernetesClusterBackupDatasourceParameters.json
*/
/**
* Sample code: Create BackupInstance With KubernetesClusterBackupDatasourceParameters.
@@ -496,7 +627,8 @@ public final class BackupInstancesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/PutBackupInstance_ADLSBlobBackupAutoProtection.json
+ * x-ms-original-file:
+ * 2026-08-31-preview/BackupInstanceOperations/PutBackupInstance_ADLSBlobBackupAutoProtection.json
*/
/**
* Sample code: Create BackupInstance With ADLSBlobBackupAutoProtection.
@@ -547,49 +679,6 @@ public final class BackupInstancesCreateOrUpdateSamples {
.create();
}
- /*
- * x-ms-original-file:
- * 2026-07-01/BackupInstanceOperations/PutBackupInstance_PostgreSqlFlexibleServerBackupDatasourceParameters.json
- */
- /**
- * Sample code: Create BackupInstance With PostgreSqlFlexibleServerBackupDatasourceParameters.
- *
- * @param manager Entry point to DataProtectionManager.
- */
- public static void createBackupInstanceWithPostgreSqlFlexibleServerBackupDatasourceParameters(
- com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
- manager.backupInstances()
- .define("pgflexbi")
- .withExistingBackupVault("pgflexrg", "pgflexvault")
- .withProperties(new BackupInstance().withFriendlyName("pgflexbi")
- .withDataSourceInfo(new Datasource().withDatasourceType("Microsoft.DBforPostgreSQL/flexibleServers")
- .withObjectType("Datasource")
- .withResourceId(
- "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/pgflexrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgflexserver")
- .withResourceLocation("eastus2euap")
- .withResourceName("pgflexserver")
- .withResourceType("Microsoft.DBforPostgreSQL/flexibleServers")
- .withResourceUri(
- "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/pgflexrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgflexserver"))
- .withDataSourceSetInfo(new DatasourceSet()
- .withDatasourceType("Microsoft.DBforPostgreSQL/flexibleServers")
- .withObjectType("DatasourceSet")
- .withResourceId(
- "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/pgflexrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgflexserver")
- .withResourceLocation("eastus2euap")
- .withResourceName("pgflexserver")
- .withResourceType("Microsoft.DBforPostgreSQL/flexibleServers")
- .withResourceUri(
- "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/pgflexrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgflexserver"))
- .withPolicyInfo(new PolicyInfo().withPolicyId(
- "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/pgflexrg/providers/Microsoft.DataProtection/BackupVaults/pgflexvault/backupPolicies/pgflexpolicy")
- .withPolicyParameters(new PolicyParameters().withBackupDatasourceParametersList(
- Arrays.asList(new PostgreSqlFlexibleServerBackupDatasourceParameters()
- .withBackupSolutionType(BackupSolutionType.PHYSICAL_BACKUP)))))
- .withObjectType("BackupInstance"))
- .create();
- }
-
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
@@ -612,7 +701,7 @@ public final class BackupInstancesCreateOrUpdateSamples {
*/
public final class BackupInstancesDeleteSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/DeleteBackupInstance.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/DeleteBackupInstance.json
*/
/**
* Sample code: Delete BackupInstance.
@@ -634,7 +723,8 @@ public final class BackupInstancesDeleteSamples {
*/
public final class BackupInstancesGetSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/GetBackupInstance_ADLSBlobBackupDatasourceParameters.json
+ * x-ms-original-file:
+ * 2026-08-31-preview/BackupInstanceOperations/GetBackupInstance_ADLSBlobBackupDatasourceParameters.json
*/
/**
* Sample code: Get BackupInstance for ADLS Blob.
@@ -648,7 +738,8 @@ public final class BackupInstancesGetSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/GetBackupInstance_ADLSBlobBackupAutoProtection.json
+ * x-ms-original-file:
+ * 2026-08-31-preview/BackupInstanceOperations/GetBackupInstance_ADLSBlobBackupAutoProtection.json
*/
/**
* Sample code: Get BackupInstance with ADLSBlobBackupAutoProtection.
@@ -662,7 +753,7 @@ public final class BackupInstancesGetSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/GetBackupInstance_BlobBackupAutoProtection.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/GetBackupInstance_BlobBackupAutoProtection.json
*/
/**
* Sample code: Get BackupInstance with BlobBackupAutoProtection.
@@ -676,7 +767,7 @@ public final class BackupInstancesGetSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/GetBackupInstance.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/GetBackupInstance.json
*/
/**
* Sample code: Get BackupInstance.
@@ -699,7 +790,7 @@ public final class BackupInstancesGetSamples {
*/
public final class BackupInstancesGetBackupInstanceOperationResultSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/GetBackupInstanceOperationResult.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/GetBackupInstanceOperationResult.json
*/
/**
* Sample code: Get BackupInstanceOperationResult.
@@ -724,7 +815,7 @@ public final class BackupInstancesGetBackupInstanceOperationResultSamples {
*/
public final class BackupInstancesListSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ListBackupInstances.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ListBackupInstances.json
*/
/**
* Sample code: List BackupInstances in a Vault.
@@ -746,7 +837,7 @@ public final class BackupInstancesListSamples {
*/
public final class BackupInstancesResumeBackupsSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ResumeBackups.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ResumeBackups.json
*/
/**
* Sample code: ResumeBackups.
@@ -767,7 +858,7 @@ public final class BackupInstancesResumeBackupsSamples {
*/
public final class BackupInstancesResumeProtectionSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ResumeProtection.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ResumeProtection.json
*/
/**
* Sample code: ResumeProtection.
@@ -791,7 +882,7 @@ import java.util.Arrays;
*/
public final class BackupInstancesStopProtectionSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/StopProtection.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/StopProtection.json
*/
/**
* Sample code: StopProtection.
@@ -804,7 +895,7 @@ public final class BackupInstancesStopProtectionSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/StopProtection_ResourceGuardEnabled.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/StopProtection_ResourceGuardEnabled.json
*/
/**
* Sample code: StopProtection with MUA.
@@ -832,7 +923,7 @@ import java.util.Arrays;
*/
public final class BackupInstancesSuspendBackupsSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/SuspendBackups.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/SuspendBackups.json
*/
/**
* Sample code: SuspendBackups.
@@ -845,7 +936,7 @@ public final class BackupInstancesSuspendBackupsSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/SuspendBackup_ResourceGuardEnabled.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/SuspendBackup_ResourceGuardEnabled.json
*/
/**
* Sample code: SuspendBackups with MUA.
@@ -873,7 +964,7 @@ import com.azure.resourcemanager.dataprotection.models.SyncType;
*/
public final class BackupInstancesSyncBackupInstanceSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/SyncBackupInstance.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/SyncBackupInstance.json
*/
/**
* Sample code: Sync BackupInstance.
@@ -908,7 +999,7 @@ import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
*/
public final class BackupInstancesTriggerCrossRegionRestoreSamples {
/*
- * x-ms-original-file: 2026-07-01/CrossRegionRestore/TriggerCrossRegionRestore.json
+ * x-ms-original-file: 2026-08-31-preview/CrossRegionRestore/TriggerCrossRegionRestore.json
*/
/**
* Sample code: Trigger Cross Region Restore.
@@ -966,7 +1057,7 @@ import com.azure.resourcemanager.dataprotection.models.RehydrationPriority;
*/
public final class BackupInstancesTriggerRehydrateSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/TriggerRehydrate.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/TriggerRehydrate.json
*/
/**
* Sample code: Trigger Rehydrate.
@@ -1014,7 +1105,7 @@ import java.util.Map;
*/
public final class BackupInstancesTriggerRestoreSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/TriggerRestoreAsFiles.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/TriggerRestoreAsFiles.json
*/
/**
* Sample code: Trigger Restore As Files.
@@ -1039,7 +1130,7 @@ public final class BackupInstancesTriggerRestoreSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/TriggerRestoreWithGenericParameters.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/TriggerRestoreWithGenericParameters.json
*/
/**
* Sample code: Trigger Restore with GenericRestoreDatasourceCriteria.
@@ -1083,7 +1174,7 @@ public final class BackupInstancesTriggerRestoreSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/TriggerRestoreWithRehydration.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/TriggerRestoreWithRehydration.json
*/
/**
* Sample code: Trigger Restore With Rehydration.
@@ -1123,7 +1214,7 @@ public final class BackupInstancesTriggerRestoreSamples {
}
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/TriggerRestore.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/TriggerRestore.json
*/
/**
* Sample code: Trigger Restore.
@@ -1201,7 +1292,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestor
*/
public final class BackupInstancesValidateCrossRegionRestoreSamples {
/*
- * x-ms-original-file: 2026-07-01/CrossRegionRestore/ValidateCrossRegionRestore.json
+ * x-ms-original-file: 2026-08-31-preview/CrossRegionRestore/ValidateCrossRegionRestore.json
*/
/**
* Sample code: Validate Cross Region Restore.
@@ -1266,7 +1357,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest;
*/
public final class BackupInstancesValidateForBackupSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ValidateForBackup.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ValidateForBackup.json
*/
/**
* Sample code: Validate For Backup.
@@ -1325,7 +1416,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateForModifyBackupRe
*/
public final class BackupInstancesValidateForModifyBackupSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ValidateForModifyBackup.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ValidateForModifyBackup.json
*/
/**
* Sample code: Validate For Modify Backup.
@@ -1387,7 +1478,7 @@ import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObj
*/
public final class BackupInstancesValidateForRestoreSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ValidateRestore.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ValidateRestore.json
*/
/**
* Sample code: Validate Restore.
@@ -1442,7 +1533,7 @@ public final class BackupInstancesValidateForRestoreSamples {
*/
public final class BackupInstancesExtensionRoutingListSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json
*/
/**
* Sample code: List BackupInstances associated with an azure resource.
@@ -1459,6 +1550,56 @@ public final class BackupInstancesExtensionRoutingListSamples {
}
```
+### BackupInstancesFromDppCrossTenantVault_List
+
+```java
+/**
+ * Samples for BackupInstancesFromDppCrossTenantVault List.
+ */
+public final class BackupInstancesFromDppCrossTenantVaultListSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/BackupInstancesFromDppCrossTenantVault_List.json
+ */
+ /**
+ * Sample code: List backup instances from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void listBackupInstancesFromACrossTenantVault(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupInstancesFromDppCrossTenantVaults()
+ .list("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### BackupJobsFromDppCrossTenantVault_List
+
+```java
+/**
+ * Samples for BackupJobsFromDppCrossTenantVault List.
+ */
+public final class BackupJobsFromDppCrossTenantVaultListSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/BackupJobsFromDppCrossTenantVault_List.json
+ */
+ /**
+ * Sample code: List jobs from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ listJobsFromACrossTenantVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.backupJobsFromDppCrossTenantVaults()
+ .list("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### BackupPolicies_CreateOrUpdate
```java
@@ -1484,7 +1625,7 @@ import java.util.Arrays;
*/
public final class BackupPoliciesCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-07-01/PolicyCRUD/CreateOrUpdateBackupPolicy.json
+ * x-ms-original-file: 2026-08-31-preview/PolicyCRUD/CreateOrUpdateBackupPolicy.json
*/
/**
* Sample code: CreateOrUpdate BackupPolicy.
@@ -1555,7 +1696,7 @@ public final class BackupPoliciesCreateOrUpdateSamples {
*/
public final class BackupPoliciesDeleteSamples {
/*
- * x-ms-original-file: 2026-07-01/PolicyCRUD/DeleteBackupPolicy.json
+ * x-ms-original-file: 2026-08-31-preview/PolicyCRUD/DeleteBackupPolicy.json
*/
/**
* Sample code: Delete BackupPolicy.
@@ -1577,7 +1718,7 @@ public final class BackupPoliciesDeleteSamples {
*/
public final class BackupPoliciesGetSamples {
/*
- * x-ms-original-file: 2026-07-01/PolicyCRUD/GetBackupPolicy.json
+ * x-ms-original-file: 2026-08-31-preview/PolicyCRUD/GetBackupPolicy.json
*/
/**
* Sample code: Get BackupPolicy.
@@ -1599,7 +1740,7 @@ public final class BackupPoliciesGetSamples {
*/
public final class BackupPoliciesListSamples {
/*
- * x-ms-original-file: 2026-07-01/PolicyCRUD/ListBackupPolicy.json
+ * x-ms-original-file: 2026-08-31-preview/PolicyCRUD/ListBackupPolicy.json
*/
/**
* Sample code: List BackupPolicy.
@@ -1620,7 +1761,7 @@ public final class BackupPoliciesListSamples {
*/
public final class BackupVaultOperationResultsGetSamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/GetOperationResultPatch.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/GetOperationResultPatch.json
*/
/**
* Sample code: GetOperationResult Patch.
@@ -1646,7 +1787,7 @@ import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequ
*/
public final class BackupVaultsCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/CheckBackupVaultsNameAvailability.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/CheckBackupVaultsNameAvailability.json
*/
/**
* Sample code: Check BackupVaults name availability.
@@ -1683,10 +1824,8 @@ import com.azure.resourcemanager.dataprotection.models.EncryptionState;
import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
import com.azure.resourcemanager.dataprotection.models.GranularityLevel;
import com.azure.resourcemanager.dataprotection.models.IdentityType;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityConfiguration;
import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityType;
import com.azure.resourcemanager.dataprotection.models.InfrastructureEncryptionState;
import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
@@ -1704,7 +1843,7 @@ import java.util.Map;
*/
public final class BackupVaultsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PutBackupVault.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PutBackupVault.json
*/
/**
* Sample code: Create BackupVault.
@@ -1732,7 +1871,7 @@ public final class BackupVaultsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/PutBackupVaultWithUndelete.json
+ * x-ms-original-file: 2026-08-31-preview/PutBackupVaultWithUndelete.json
*/
/**
* Sample code: Restore a soft-deleted backup vault.
@@ -1767,7 +1906,7 @@ public final class BackupVaultsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PutBackupVaultWithCMK.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PutBackupVaultWithCMK.json
*/
/**
* Sample code: Create BackupVault With CMK.
@@ -1801,7 +1940,7 @@ public final class BackupVaultsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PutBackupVaultCMKSettings_ResourceGuardEnabled.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PutBackupVaultCMKSettings_ResourceGuardEnabled.json
*/
/**
* Sample code: Create or Update Backup Vault With CMK and Resource Guard Enabled.
@@ -1836,7 +1975,7 @@ public final class BackupVaultsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PutBackupVaultWithCostManagementSettings.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PutBackupVaultWithCostManagementSettings.json
*/
/**
* Sample code: Create BackupVault With Cost Management Settings.
@@ -1867,7 +2006,7 @@ public final class BackupVaultsCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PutBackupVaultWithMSI.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PutBackupVaultWithMSI.json
*/
/**
* Sample code: Create BackupVault With MSI.
@@ -1895,35 +2034,6 @@ public final class BackupVaultsCreateOrUpdateSamples {
.create();
}
- /*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PutBackupVaultWithTimedImmutability.json
- */
- /**
- * Sample code: Create BackupVault With Timed Immutability.
- *
- * @param manager Entry point to DataProtectionManager.
- */
- public static void
- createBackupVaultWithTimedImmutability(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
- manager.backupVaults()
- .define("swaggerExample")
- .withRegion("WestUS")
- .withExistingResourceGroup("SampleResourceGroup")
- .withProperties(new BackupVault()
- .withSecuritySettings(new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings().withState(SoftDeleteState.ON).withRetentionDurationInDays(14.0D))
- .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED)
- .withConfiguration(new ImmutabilityConfiguration().withType(ImmutabilityType.TIME_BASED)
- .withDurationInDays(30))))
- .withStorageSettings(
- Arrays.asList(new StorageSetting().withDatastoreType(StorageSettingStoreTypes.VAULT_STORE)
- .withType(StorageSettingTypes.LOCALLY_REDUNDANT))))
- .withTags(mapOf("key1", "fakeTokenPlaceholder"))
- .withIdentity(new DppIdentityDetails().withType("None"))
- .create();
- }
-
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
@@ -1946,7 +2056,7 @@ public final class BackupVaultsCreateOrUpdateSamples {
*/
public final class BackupVaultsDeleteSamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/DeleteBackupVault.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/DeleteBackupVault.json
*/
/**
* Sample code: Delete BackupVault.
@@ -1967,7 +2077,7 @@ public final class BackupVaultsDeleteSamples {
*/
public final class BackupVaultsGetByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/GetBackupVaultWithCostManagementSettings.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/GetBackupVaultWithCostManagementSettings.json
*/
/**
* Sample code: Get BackupVault with Cost Management Settings.
@@ -1981,7 +2091,7 @@ public final class BackupVaultsGetByResourceGroupSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/GetBackupVault.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/GetBackupVault.json
*/
/**
* Sample code: Get BackupVault.
@@ -1994,7 +2104,7 @@ public final class BackupVaultsGetByResourceGroupSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/GetBackupVaultWithMSI.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/GetBackupVaultWithMSI.json
*/
/**
* Sample code: Get BackupVault With MSI.
@@ -2007,7 +2117,7 @@ public final class BackupVaultsGetByResourceGroupSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/GetBackupVaultWithCMK.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/GetBackupVaultWithCMK.json
*/
/**
* Sample code: Get BackupVault With CMK.
@@ -2029,7 +2139,7 @@ public final class BackupVaultsGetByResourceGroupSamples {
*/
public final class BackupVaultsListSamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/GetBackupVaultsInSubscription.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/GetBackupVaultsInSubscription.json
*/
/**
* Sample code: Get BackupVaults in Subscription.
@@ -2051,7 +2161,7 @@ public final class BackupVaultsListSamples {
*/
public final class BackupVaultsListByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/GetBackupVaultsInResourceGroup.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/GetBackupVaultsInResourceGroup.json
*/
/**
* Sample code: Get BackupVaults in ResourceGroup.
@@ -2094,7 +2204,7 @@ import java.util.Map;
*/
public final class BackupVaultsUpdateSamples {
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PatchBackupVault.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PatchBackupVault.json
*/
/**
* Sample code: Patch BackupVault.
@@ -2114,7 +2224,7 @@ public final class BackupVaultsUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PatchBackupVaultWithCostManagementSettings.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PatchBackupVaultWithCostManagementSettings.json
*/
/**
* Sample code: Patch BackupVault with Cost Management Settings.
@@ -2134,7 +2244,7 @@ public final class BackupVaultsUpdateSamples {
}
/*
- * x-ms-original-file: 2026-07-01/VaultCRUD/PatchBackupVaultWithCMK.json
+ * x-ms-original-file: 2026-08-31-preview/VaultCRUD/PatchBackupVaultWithCMK.json
*/
/**
* Sample code: Patch BackupVault with CMK.
@@ -2186,7 +2296,7 @@ import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest;
*/
public final class DataProtectionCheckFeatureSupportSamples {
/*
- * x-ms-original-file: 2026-07-01/CheckfeatureSupport.json
+ * x-ms-original-file: 2026-08-31-preview/CheckfeatureSupport.json
*/
/**
* Sample code: Check Azure Vm Backup Feature Support.
@@ -2211,7 +2321,7 @@ public final class DataProtectionCheckFeatureSupportSamples {
*/
public final class DataProtectionOperationsListSamples {
/*
- * x-ms-original-file: 2026-07-01/Operations/List.json
+ * x-ms-original-file: 2026-08-31-preview/Operations/List.json
*/
/**
* Sample code: Returns the list of supported REST operations.
@@ -2233,7 +2343,7 @@ public final class DataProtectionOperationsListSamples {
*/
public final class DeletedBackupInstancesGetSamples {
/*
- * x-ms-original-file: 2026-07-01/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json
+ * x-ms-original-file: 2026-08-31-preview/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json
*/
/**
* Sample code: Get DeletedBackupInstance.
@@ -2257,7 +2367,7 @@ public final class DeletedBackupInstancesGetSamples {
*/
public final class DeletedBackupInstancesListSamples {
/*
- * x-ms-original-file: 2026-07-01/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json
+ * x-ms-original-file: 2026-08-31-preview/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json
*/
/**
* Sample code: List DeletedBackupInstances in a Vault.
@@ -2280,7 +2390,7 @@ public final class DeletedBackupInstancesListSamples {
*/
public final class DeletedBackupInstancesUndeleteSamples {
/*
- * x-ms-original-file: 2026-07-01/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json
+ * x-ms-original-file: 2026-08-31-preview/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json
*/
/**
* Sample code: Undelete Deleted BackupInstance.
@@ -2302,7 +2412,7 @@ public final class DeletedBackupInstancesUndeleteSamples {
*/
public final class DeletedBackupVaultsGetSamples {
/*
- * x-ms-original-file: 2026-07-01/DeletedBackupVaults_Get.json
+ * x-ms-original-file: 2026-08-31-preview/DeletedBackupVaults_Get.json
*/
/**
* Sample code: Get a deleted backup vault.
@@ -2323,7 +2433,7 @@ public final class DeletedBackupVaultsGetSamples {
*/
public final class DeletedBackupVaultsListByLocationSamples {
/*
- * x-ms-original-file: 2026-07-01/DeletedBackupVaults_ListByLocation.json
+ * x-ms-original-file: 2026-08-31-preview/DeletedBackupVaults_ListByLocation.json
*/
/**
* Sample code: List deleted backup vaults by location.
@@ -2337,6 +2447,135 @@ public final class DeletedBackupVaultsListByLocationSamples {
}
```
+### DppCrossTenantVaultMappingStatus_Check
+
+```java
+/**
+ * Samples for DppCrossTenantVaultMappingStatus Check.
+ */
+public final class DppCrossTenantVaultMappingStatusCheckSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/DppCrossTenantVaultMappingStatus_Check.json
+ */
+ /**
+ * Sample code: Get cross-tenant vault mapping status.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ getCrossTenantVaultMappingStatus(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.dppCrossTenantVaultMappingStatus()
+ .checkWithResponse("000pikumar", "PratikPrivatePreviewVault1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DppCrossTenantVaultMappings_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingProperties;
+import java.util.Arrays;
+
+/**
+ * Samples for DppCrossTenantVaultMappings CreateOrUpdate.
+ */
+public final class DppCrossTenantVaultMappingsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/DppCrossTenantVaultMappings_CreateOrUpdate.json
+ */
+ /**
+ * Sample code: Create or update a cross-tenant vault mapping.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ createOrUpdateACrossTenantVaultMapping(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.dppCrossTenantVaultMappings()
+ .define("sampleCrossTenantMapping")
+ .withExistingBackupVault("000pikumar", "PratikPrivatePreviewVault1")
+ .withProperties(new CrossTenantVaultMappingProperties().withSourceVaultId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/sourceRG/providers/Microsoft.DataProtection/backupVaults/sourceVault")
+ .withResourceGuardOperationRequests(Arrays.asList(
+ "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/backupResourceGuardProxies/swaggerExample")))
+ .create();
+ }
+}
+```
+
+### DppCrossTenantVaultMappings_Get
+
+```java
+/**
+ * Samples for DppCrossTenantVaultMappings Get.
+ */
+public final class DppCrossTenantVaultMappingsGetSamples {
+ /*
+ * x-ms-original-file: 2026-08-31-preview/CrossTenantVaultMappingOperations/DppCrossTenantVaultMappings_Get.json
+ */
+ /**
+ * Sample code: Get a cross-tenant vault mapping.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ getACrossTenantVaultMapping(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.dppCrossTenantVaultMappings()
+ .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DppCrossTenantVaultMappings_List
+
+```java
+/**
+ * Samples for DppCrossTenantVaultMappings List.
+ */
+public final class DppCrossTenantVaultMappingsListSamples {
+ /*
+ * x-ms-original-file: 2026-08-31-preview/CrossTenantVaultMappingOperations/DppCrossTenantVaultMappings_List.json
+ */
+ /**
+ * Sample code: List cross-tenant vault mappings in a vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ listCrossTenantVaultMappingsInAVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.dppCrossTenantVaultMappings()
+ .list("000pikumar", "PratikPrivatePreviewVault1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### DppCrossTenantVaultMappings_Remove
+
+```java
+
+/**
+ * Samples for DppCrossTenantVaultMappings Remove.
+ */
+public final class DppCrossTenantVaultMappingsRemoveSamples {
+ /*
+ * x-ms-original-file: 2026-08-31-preview/CrossTenantVaultMappingOperations/DppCrossTenantVaultMappings_Remove.json
+ */
+ /**
+ * Sample code: Remove a cross-tenant vault mapping.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ removeACrossTenantVaultMapping(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.dppCrossTenantVaultMappings()
+ .removeWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", null,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### DppResourceGuardProxy_CreateOrUpdate
```java
@@ -2347,7 +2586,7 @@ import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase;
*/
public final class DppResourceGuardProxyCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
*/
/**
* Sample code: Create ResourceGuardProxy.
@@ -2374,7 +2613,7 @@ public final class DppResourceGuardProxyCreateOrUpdateSamples {
*/
public final class DppResourceGuardProxyDeleteSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
*/
/**
* Sample code: Delete ResourceGuardProxy.
@@ -2398,7 +2637,7 @@ public final class DppResourceGuardProxyDeleteSamples {
*/
public final class DppResourceGuardProxyGetSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
*/
/**
* Sample code: Get ResourceGuardProxy.
@@ -2420,7 +2659,7 @@ public final class DppResourceGuardProxyGetSamples {
*/
public final class DppResourceGuardProxyListSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
*/
/**
* Sample code: Get ResourceGuardProxies.
@@ -2444,7 +2683,7 @@ import java.util.Arrays;
*/
public final class DppResourceGuardProxyUnlockDeleteSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
*/
/**
* Sample code: UnlockDelete ResourceGuardProxy.
@@ -2472,7 +2711,7 @@ public final class DppResourceGuardProxyUnlockDeleteSamples {
*/
public final class ExportJobsTriggerSamples {
/*
- * x-ms-original-file: 2026-07-01/JobCRUD/TriggerExportJobs.json
+ * x-ms-original-file: 2026-08-31-preview/JobCRUD/TriggerExportJobs.json
*/
/**
* Sample code: Trigger Export Jobs.
@@ -2493,7 +2732,7 @@ public final class ExportJobsTriggerSamples {
*/
public final class ExportJobsOperationResultGetSamples {
/*
- * x-ms-original-file: 2026-07-01/JobCRUD/GetExportJobsOperationResult.json
+ * x-ms-original-file: 2026-08-31-preview/JobCRUD/GetExportJobsOperationResult.json
*/
/**
* Sample code: Get Export Jobs Operation Result.
@@ -2519,7 +2758,7 @@ import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequ
*/
public final class FetchCrossRegionRestoreJobGetSamples {
/*
- * x-ms-original-file: 2026-07-01/CrossRegionRestore/FetchCrossRegionRestoreJob.json
+ * x-ms-original-file: 2026-08-31-preview/CrossRegionRestore/FetchCrossRegionRestoreJob.json
*/
/**
* Sample code: Get Cross Region Restore Job.
@@ -2547,7 +2786,7 @@ import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsReq
*/
public final class FetchCrossRegionRestoreJobsOperationListSamples {
/*
- * x-ms-original-file: 2026-07-01/CrossRegionRestore/FetchCrossRegionRestoreJobs.json
+ * x-ms-original-file: 2026-08-31-preview/CrossRegionRestore/FetchCrossRegionRestoreJobs.json
*/
/**
* Sample code: List Cross Region Restore Jobs.
@@ -2575,7 +2814,7 @@ import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestP
*/
public final class FetchSecondaryRecoveryPointsListSamples {
/*
- * x-ms-original-file: 2026-07-01/CrossRegionRestore/FetchSecondaryRPs.json
+ * x-ms-original-file: 2026-08-31-preview/CrossRegionRestore/FetchSecondaryRPs.json
*/
/**
* Sample code: Fetch SecondaryRPs.
@@ -2592,6 +2831,30 @@ public final class FetchSecondaryRecoveryPointsListSamples {
}
```
+### JobFromDppCrossTenantVault_Get
+
+```java
+/**
+ * Samples for JobFromDppCrossTenantVault Get.
+ */
+public final class JobFromDppCrossTenantVaultGetSamples {
+ /*
+ * x-ms-original-file: 2026-08-31-preview/CrossTenantVaultMappingOperations/JobFromDppCrossTenantVault_Get.json
+ */
+ /**
+ * Sample code: Get a job from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ getAJobFromACrossTenantVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.jobFromDppCrossTenantVaults()
+ .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping",
+ "00000000-0000-0000-0000-000000000000", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Jobs_Get
```java
@@ -2600,7 +2863,7 @@ public final class FetchSecondaryRecoveryPointsListSamples {
*/
public final class JobsGetSamples {
/*
- * x-ms-original-file: 2026-07-01/JobCRUD/GetJob.json
+ * x-ms-original-file: 2026-08-31-preview/JobCRUD/GetJob.json
*/
/**
* Sample code: Get Job.
@@ -2623,7 +2886,7 @@ public final class JobsGetSamples {
*/
public final class JobsListSamples {
/*
- * x-ms-original-file: 2026-07-01/JobCRUD/ListJobs.json
+ * x-ms-original-file: 2026-08-31-preview/JobCRUD/ListJobs.json
*/
/**
* Sample code: Get Jobs.
@@ -2644,7 +2907,7 @@ public final class JobsListSamples {
*/
public final class OperationResultGetSamples {
/*
- * x-ms-original-file: 2026-07-01/GetOperationResult.json
+ * x-ms-original-file: 2026-08-31-preview/GetOperationResult.json
*/
/**
* Sample code: Get OperationResult.
@@ -2668,7 +2931,7 @@ public final class OperationResultGetSamples {
*/
public final class OperationStatusGetSamples {
/*
- * x-ms-original-file: 2026-07-01/GetOperationStatus.json
+ * x-ms-original-file: 2026-08-31-preview/GetOperationStatus.json
*/
/**
* Sample code: Get OperationStatus.
@@ -2692,7 +2955,7 @@ public final class OperationStatusGetSamples {
*/
public final class OperationStatusBackupVaultContextGetSamples {
/*
- * x-ms-original-file: 2026-07-01/GetOperationStatusVaultContext.json
+ * x-ms-original-file: 2026-08-31-preview/GetOperationStatusVaultContext.json
*/
/**
* Sample code: Get OperationStatus.
@@ -2716,7 +2979,7 @@ public final class OperationStatusBackupVaultContextGetSamples {
*/
public final class OperationStatusResourceGroupContextGetByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-07-01/GetOperationStatusRGContext.json
+ * x-ms-original-file: 2026-08-31-preview/GetOperationStatusRGContext.json
*/
/**
* Sample code: Get OperationStatus.
@@ -2732,6 +2995,31 @@ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples
}
```
+### RecoveryPointFromDppCrossTenantVault_Get
+
+```java
+/**
+ * Samples for RecoveryPointFromDppCrossTenantVault Get.
+ */
+public final class RecoveryPointFromDppCrossTenantVaultGetSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/RecoveryPointFromDppCrossTenantVault_Get.json
+ */
+ /**
+ * Sample code: Get a recovery point from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ getARecoveryPointFromACrossTenantVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.recoveryPointFromDppCrossTenantVaults()
+ .getWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1",
+ "hardcodedRP", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### RecoveryPoints_Get
```java
@@ -2740,7 +3028,7 @@ public final class OperationStatusResourceGroupContextGetByResourceGroupSamples
*/
public final class RecoveryPointsGetSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/GetRecoveryPoint.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/GetRecoveryPoint.json
*/
/**
* Sample code: Get Recovery Point.
@@ -2763,7 +3051,7 @@ public final class RecoveryPointsGetSamples {
*/
public final class RecoveryPointsListSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/ListRecoveryPoints.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/ListRecoveryPoints.json
*/
/**
* Sample code: List Recovery Points in a Vault.
@@ -2779,6 +3067,31 @@ public final class RecoveryPointsListSamples {
}
```
+### RecoveryPointsFromDppCrossTenantVault_List
+
+```java
+/**
+ * Samples for RecoveryPointsFromDppCrossTenantVault List.
+ */
+public final class RecoveryPointsFromDppCrossTenantVaultListSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/RecoveryPointsFromDppCrossTenantVault_List.json
+ */
+ /**
+ * Sample code: List recovery points from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void listRecoveryPointsFromACrossTenantVault(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.recoveryPointsFromDppCrossTenantVaults()
+ .list("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1", null,
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### ResourceGuards_Delete
```java
@@ -2787,7 +3100,7 @@ public final class RecoveryPointsListSamples {
*/
public final class ResourceGuardsDeleteSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/DeleteResourceGuard.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/DeleteResourceGuard.json
*/
/**
* Sample code: Delete ResourceGuard.
@@ -2810,7 +3123,7 @@ public final class ResourceGuardsDeleteSamples {
*/
public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/ListBackupSecurityPINRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/ListBackupSecurityPINRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
@@ -2834,7 +3147,7 @@ public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples {
*/
public final class ResourceGuardsGetByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetResourceGuard.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetResourceGuard.json
*/
/**
* Sample code: Get ResourceGuard.
@@ -2856,7 +3169,7 @@ public final class ResourceGuardsGetByResourceGroupSamples {
*/
public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
@@ -2880,7 +3193,7 @@ public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSample
*/
public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
@@ -2904,7 +3217,7 @@ public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamp
*/
public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
@@ -2928,7 +3241,7 @@ public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjec
*/
public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
@@ -2952,7 +3265,7 @@ public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSample
*/
public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
@@ -2976,7 +3289,7 @@ public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamp
*/
public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
@@ -3000,7 +3313,7 @@ public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectS
*/
public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
@@ -3024,7 +3337,7 @@ public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples {
*/
public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
@@ -3048,7 +3361,7 @@ public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSampl
*/
public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
@@ -3072,7 +3385,7 @@ public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples {
*/
public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
@@ -3096,7 +3409,7 @@ public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples {
*/
public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
@@ -3120,7 +3433,7 @@ public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples
*/
public final class ResourceGuardsListSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetResourceGuardsInSubscription.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetResourceGuardsInSubscription.json
*/
/**
* Sample code: Get ResourceGuards in Subscription.
@@ -3142,7 +3455,7 @@ public final class ResourceGuardsListSamples {
*/
public final class ResourceGuardsListByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json
*/
/**
* Sample code: Get ResourceGuards in ResourceGroup.
@@ -3168,7 +3481,7 @@ import java.util.Map;
*/
public final class ResourceGuardsPatchSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/PatchResourceGuard.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/PatchResourceGuard.json
*/
/**
* Sample code: Patch ResourceGuard.
@@ -3207,7 +3520,7 @@ import java.util.Map;
*/
public final class ResourceGuardsPutSamples {
/*
- * x-ms-original-file: 2026-07-01/ResourceGuardCRUD/PutResourceGuard.json
+ * x-ms-original-file: 2026-08-31-preview/ResourceGuardCRUD/PutResourceGuard.json
*/
/**
* Sample code: Create ResourceGuard.
@@ -3248,7 +3561,7 @@ import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreTyp
*/
public final class RestorableTimeRangesFindSamples {
/*
- * x-ms-original-file: 2026-07-01/BackupInstanceOperations/FindRestorableTimeRanges.json
+ * x-ms-original-file: 2026-08-31-preview/BackupInstanceOperations/FindRestorableTimeRanges.json
*/
/**
* Sample code: Find Restorable Time Ranges.
@@ -3268,3 +3581,171 @@ public final class RestorableTimeRangesFindSamples {
}
```
+### RestorableTimeRangesFromDppCrossTenantVault_Find
+
+```java
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
+import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType;
+
+/**
+ * Samples for RestorableTimeRangesFromDppCrossTenantVault Find.
+ */
+public final class RestorableTimeRangesFromDppCrossTenantVaultFindSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/RestorableTimeRangesFromDppCrossTenantVault_Find.json
+ */
+ /**
+ * Sample code: Find restorable time ranges from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void findRestorableTimeRangesFromACrossTenantVault(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.restorableTimeRangesFromDppCrossTenantVaults()
+ .findWithResponse("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1",
+ new AzureBackupFindRestorableTimeRangesRequest()
+ .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE)
+ .withStartTime("2020-10-17T23:28:17.6829685Z")
+ .withEndTime("2021-02-24T00:35:17.6829685Z"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### RestoresFromDppCrossTenantVault_Trigger
+
+```java
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.Datasource;
+import com.azure.resourcemanager.dataprotection.models.DatasourceSet;
+import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
+import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
+import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfo;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreResource;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreType;
+import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
+
+/**
+ * Samples for RestoresFromDppCrossTenantVault Trigger.
+ */
+public final class RestoresFromDppCrossTenantVaultTriggerSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/RestoresFromDppCrossTenantVault_Trigger.json
+ */
+ /**
+ * Sample code: Trigger restore from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ triggerRestoreFromACrossTenantVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.restoresFromDppCrossTenantVaults()
+ .trigger("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1",
+ new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo()
+ .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
+ .withRestoreLocation("southeastasia")
+ .withDatasourceInfo(new Datasource()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("Datasource")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb")
+ .withResourceLocation("")
+ .withResourceName("targetdb")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withResourceUri(""))
+ .withDatasourceSetInfo(new DatasourceSet()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("DatasourceSet")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest")
+ .withResourceLocation("")
+ .withResourceName("viveksipgtest")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers")
+ .withResourceUri(""))
+ .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(
+ new SecretStoreResource().withUri("https://samplevault.vault.azure.net/secrets/credentials")
+ .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))))
+ .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE)
+ .withSourceResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb")
+ .withIdentityDetails(new IdentityDetails().withUseSystemAssignedIdentity(false)
+ .withUserAssignedIdentityArmUrl(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/rg-name/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUami"))
+ .withRecoveryPointId("hardcodedRP"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ValidateRestoreFromDppCrossTenantVault_Trigger
+
+```java
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.Datasource;
+import com.azure.resourcemanager.dataprotection.models.DatasourceSet;
+import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
+import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
+import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfo;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreResource;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreType;
+import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+
+/**
+ * Samples for ValidateRestoreFromDppCrossTenantVault Trigger.
+ */
+public final class ValidateRestoreFromDppCrossTenantVaultTriggerSamples {
+ /*
+ * x-ms-original-file:
+ * 2026-08-31-preview/CrossTenantVaultMappingOperations/ValidateRestoreFromDppCrossTenantVault_Trigger.json
+ */
+ /**
+ * Sample code: Validate restore from a cross-tenant vault.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void
+ validateRestoreFromACrossTenantVault(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager.validateRestoreFromDppCrossTenantVaults()
+ .trigger("000pikumar", "PratikPrivatePreviewVault1", "sampleCrossTenantMapping", "testInstance1",
+ new ValidateRestoreRequestObject().withRestoreRequestObject(
+ new AzureBackupRecoveryPointBasedRestoreRequest().withRestoreTargetInfo(new RestoreTargetInfo()
+ .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
+ .withRestoreLocation("southeastasia")
+ .withDatasourceInfo(new Datasource()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("Datasource")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb")
+ .withResourceLocation("")
+ .withResourceName("targetdb")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withResourceUri(""))
+ .withDatasourceSetInfo(new DatasourceSet()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("DatasourceSet")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest")
+ .withResourceLocation("")
+ .withResourceName("viveksipgtest")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers")
+ .withResourceUri(""))
+ .withDatasourceAuthCredentials(new SecretStoreBasedAuthCredentials().withSecretStoreResource(
+ new SecretStoreResource().withUri("https://samplevault.vault.azure.net/secrets/credentials")
+ .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))))
+ .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE)
+ .withSourceResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb")
+ .withIdentityDetails(new IdentityDetails().withUseSystemAssignedIdentity(false)
+ .withUserAssignedIdentityArmUrl(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/rg-name/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUami"))
+ .withRecoveryPointId("hardcodedRP")),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
index d287a5c52a2d5..7ba0fb05d9d49 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for Data Protection Management
- This package contains Microsoft Azure SDK for Data Protection 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 api-version 2026-07-01.
+ This package contains Microsoft Azure SDK for Data Protection 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 api-version 2026-08-31-preview.
https://github.com/Azure/azure-sdk-for-java
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 941d2e6a40e59..7d76a7a3d59f0 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
@@ -25,8 +25,13 @@
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.dataprotection.fluent.DataProtectionManagementClient;
+import com.azure.resourcemanager.dataprotection.implementation.BackupInstanceFromDppCrossTenantVaultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.BackupInstanceOperationResultFromDppCrossTenantVaultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesExtensionRoutingsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesFromDppCrossTenantVaultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesImpl;
+import com.azure.resourcemanager.dataprotection.implementation.BackupJobsFromDppCrossTenantVaultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupPoliciesImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupVaultOperationResultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.BackupVaultsImpl;
@@ -35,22 +40,35 @@
import com.azure.resourcemanager.dataprotection.implementation.DataProtectionsImpl;
import com.azure.resourcemanager.dataprotection.implementation.DeletedBackupInstancesImpl;
import com.azure.resourcemanager.dataprotection.implementation.DeletedBackupVaultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.DppCrossTenantVaultMappingStatusImpl;
+import com.azure.resourcemanager.dataprotection.implementation.DppCrossTenantVaultMappingsImpl;
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.FetchCrossRegionRestoreJobsImpl;
import com.azure.resourcemanager.dataprotection.implementation.FetchCrossRegionRestoreJobsOperationsImpl;
import com.azure.resourcemanager.dataprotection.implementation.FetchSecondaryRecoveryPointsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.JobFromDppCrossTenantVaultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.JobsImpl;
import com.azure.resourcemanager.dataprotection.implementation.OperationResultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.OperationStatusBackupVaultContextsImpl;
import com.azure.resourcemanager.dataprotection.implementation.OperationStatusImpl;
import com.azure.resourcemanager.dataprotection.implementation.OperationStatusResourceGroupContextsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.RecoveryPointFromDppCrossTenantVaultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.RecoveryPointsFromDppCrossTenantVaultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.RecoveryPointsImpl;
import com.azure.resourcemanager.dataprotection.implementation.ResourceGuardsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesFromDppCrossTenantVaultsImpl;
import com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesImpl;
+import com.azure.resourcemanager.dataprotection.implementation.RestoresFromDppCrossTenantVaultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.ValidateRestoreFromDppCrossTenantVaultsImpl;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceOperationResultFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceOperationStatusFromDppCrossTenantVaults;
import com.azure.resourcemanager.dataprotection.models.BackupInstances;
import com.azure.resourcemanager.dataprotection.models.BackupInstancesExtensionRoutings;
+import com.azure.resourcemanager.dataprotection.models.BackupInstancesFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.BackupJobsFromDppCrossTenantVaults;
import com.azure.resourcemanager.dataprotection.models.BackupPolicies;
import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResults;
import com.azure.resourcemanager.dataprotection.models.BackupVaults;
@@ -58,20 +76,28 @@
import com.azure.resourcemanager.dataprotection.models.DataProtections;
import com.azure.resourcemanager.dataprotection.models.DeletedBackupInstances;
import com.azure.resourcemanager.dataprotection.models.DeletedBackupVaults;
+import com.azure.resourcemanager.dataprotection.models.DppCrossTenantVaultMappingStatus;
+import com.azure.resourcemanager.dataprotection.models.DppCrossTenantVaultMappings;
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.FetchCrossRegionRestoreJobs;
import com.azure.resourcemanager.dataprotection.models.FetchCrossRegionRestoreJobsOperations;
import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRecoveryPoints;
+import com.azure.resourcemanager.dataprotection.models.JobFromDppCrossTenantVaults;
import com.azure.resourcemanager.dataprotection.models.Jobs;
import com.azure.resourcemanager.dataprotection.models.OperationResults;
import com.azure.resourcemanager.dataprotection.models.OperationStatus;
import com.azure.resourcemanager.dataprotection.models.OperationStatusBackupVaultContexts;
import com.azure.resourcemanager.dataprotection.models.OperationStatusResourceGroupContexts;
+import com.azure.resourcemanager.dataprotection.models.RecoveryPointFromDppCrossTenantVaults;
import com.azure.resourcemanager.dataprotection.models.RecoveryPoints;
+import com.azure.resourcemanager.dataprotection.models.RecoveryPointsFromDppCrossTenantVaults;
import com.azure.resourcemanager.dataprotection.models.ResourceGuards;
import com.azure.resourcemanager.dataprotection.models.RestorableTimeRanges;
+import com.azure.resourcemanager.dataprotection.models.RestorableTimeRangesFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.RestoresFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreFromDppCrossTenantVaults;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -95,6 +121,32 @@ public final class DataProtectionManager {
private ResourceGuards resourceGuards;
+ private DppCrossTenantVaultMappings dppCrossTenantVaultMappings;
+
+ private DppCrossTenantVaultMappingStatus dppCrossTenantVaultMappingStatus;
+
+ private BackupInstancesFromDppCrossTenantVaults backupInstancesFromDppCrossTenantVaults;
+
+ private BackupInstanceFromDppCrossTenantVaults backupInstanceFromDppCrossTenantVaults;
+
+ private RestoresFromDppCrossTenantVaults restoresFromDppCrossTenantVaults;
+
+ private ValidateRestoreFromDppCrossTenantVaults validateRestoreFromDppCrossTenantVaults;
+
+ private RestorableTimeRangesFromDppCrossTenantVaults restorableTimeRangesFromDppCrossTenantVaults;
+
+ private RecoveryPointsFromDppCrossTenantVaults recoveryPointsFromDppCrossTenantVaults;
+
+ private RecoveryPointFromDppCrossTenantVaults recoveryPointFromDppCrossTenantVaults;
+
+ private BackupJobsFromDppCrossTenantVaults backupJobsFromDppCrossTenantVaults;
+
+ private JobFromDppCrossTenantVaults jobFromDppCrossTenantVaults;
+
+ private BackupInstanceOperationStatusFromDppCrossTenantVaults backupInstanceOperationStatusFromDppCrossTenantVaults;
+
+ private BackupInstanceOperationResultFromDppCrossTenantVaults backupInstanceOperationResultFromDppCrossTenantVaults;
+
private BackupVaults backupVaults;
private OperationStatusBackupVaultContexts operationStatusBackupVaultContexts;
@@ -408,6 +460,179 @@ public ResourceGuards resourceGuards() {
return resourceGuards;
}
+ /**
+ * Gets the resource collection API of DppCrossTenantVaultMappings. It manages CrossTenantVaultMapping.
+ *
+ * @return Resource collection API of DppCrossTenantVaultMappings.
+ */
+ public DppCrossTenantVaultMappings dppCrossTenantVaultMappings() {
+ if (this.dppCrossTenantVaultMappings == null) {
+ this.dppCrossTenantVaultMappings
+ = new DppCrossTenantVaultMappingsImpl(clientObject.getDppCrossTenantVaultMappings(), this);
+ }
+ return dppCrossTenantVaultMappings;
+ }
+
+ /**
+ * Gets the resource collection API of DppCrossTenantVaultMappingStatus.
+ *
+ * @return Resource collection API of DppCrossTenantVaultMappingStatus.
+ */
+ public DppCrossTenantVaultMappingStatus dppCrossTenantVaultMappingStatus() {
+ if (this.dppCrossTenantVaultMappingStatus == null) {
+ this.dppCrossTenantVaultMappingStatus
+ = new DppCrossTenantVaultMappingStatusImpl(clientObject.getDppCrossTenantVaultMappingStatus(), this);
+ }
+ return dppCrossTenantVaultMappingStatus;
+ }
+
+ /**
+ * Gets the resource collection API of BackupInstancesFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of BackupInstancesFromDppCrossTenantVaults.
+ */
+ public BackupInstancesFromDppCrossTenantVaults backupInstancesFromDppCrossTenantVaults() {
+ if (this.backupInstancesFromDppCrossTenantVaults == null) {
+ this.backupInstancesFromDppCrossTenantVaults = new BackupInstancesFromDppCrossTenantVaultsImpl(
+ clientObject.getBackupInstancesFromDppCrossTenantVaults(), this);
+ }
+ return backupInstancesFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of BackupInstanceFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of BackupInstanceFromDppCrossTenantVaults.
+ */
+ public BackupInstanceFromDppCrossTenantVaults backupInstanceFromDppCrossTenantVaults() {
+ if (this.backupInstanceFromDppCrossTenantVaults == null) {
+ this.backupInstanceFromDppCrossTenantVaults = new BackupInstanceFromDppCrossTenantVaultsImpl(
+ clientObject.getBackupInstanceFromDppCrossTenantVaults(), this);
+ }
+ return backupInstanceFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of RestoresFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of RestoresFromDppCrossTenantVaults.
+ */
+ public RestoresFromDppCrossTenantVaults restoresFromDppCrossTenantVaults() {
+ if (this.restoresFromDppCrossTenantVaults == null) {
+ this.restoresFromDppCrossTenantVaults
+ = new RestoresFromDppCrossTenantVaultsImpl(clientObject.getRestoresFromDppCrossTenantVaults(), this);
+ }
+ return restoresFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of ValidateRestoreFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of ValidateRestoreFromDppCrossTenantVaults.
+ */
+ public ValidateRestoreFromDppCrossTenantVaults validateRestoreFromDppCrossTenantVaults() {
+ if (this.validateRestoreFromDppCrossTenantVaults == null) {
+ this.validateRestoreFromDppCrossTenantVaults = new ValidateRestoreFromDppCrossTenantVaultsImpl(
+ clientObject.getValidateRestoreFromDppCrossTenantVaults(), this);
+ }
+ return validateRestoreFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of RestorableTimeRangesFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of RestorableTimeRangesFromDppCrossTenantVaults.
+ */
+ public RestorableTimeRangesFromDppCrossTenantVaults restorableTimeRangesFromDppCrossTenantVaults() {
+ if (this.restorableTimeRangesFromDppCrossTenantVaults == null) {
+ this.restorableTimeRangesFromDppCrossTenantVaults = new RestorableTimeRangesFromDppCrossTenantVaultsImpl(
+ clientObject.getRestorableTimeRangesFromDppCrossTenantVaults(), this);
+ }
+ return restorableTimeRangesFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of RecoveryPointsFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of RecoveryPointsFromDppCrossTenantVaults.
+ */
+ public RecoveryPointsFromDppCrossTenantVaults recoveryPointsFromDppCrossTenantVaults() {
+ if (this.recoveryPointsFromDppCrossTenantVaults == null) {
+ this.recoveryPointsFromDppCrossTenantVaults = new RecoveryPointsFromDppCrossTenantVaultsImpl(
+ clientObject.getRecoveryPointsFromDppCrossTenantVaults(), this);
+ }
+ return recoveryPointsFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of RecoveryPointFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of RecoveryPointFromDppCrossTenantVaults.
+ */
+ public RecoveryPointFromDppCrossTenantVaults recoveryPointFromDppCrossTenantVaults() {
+ if (this.recoveryPointFromDppCrossTenantVaults == null) {
+ this.recoveryPointFromDppCrossTenantVaults = new RecoveryPointFromDppCrossTenantVaultsImpl(
+ clientObject.getRecoveryPointFromDppCrossTenantVaults(), this);
+ }
+ return recoveryPointFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of BackupJobsFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of BackupJobsFromDppCrossTenantVaults.
+ */
+ public BackupJobsFromDppCrossTenantVaults backupJobsFromDppCrossTenantVaults() {
+ if (this.backupJobsFromDppCrossTenantVaults == null) {
+ this.backupJobsFromDppCrossTenantVaults = new BackupJobsFromDppCrossTenantVaultsImpl(
+ clientObject.getBackupJobsFromDppCrossTenantVaults(), this);
+ }
+ return backupJobsFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of JobFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of JobFromDppCrossTenantVaults.
+ */
+ public JobFromDppCrossTenantVaults jobFromDppCrossTenantVaults() {
+ if (this.jobFromDppCrossTenantVaults == null) {
+ this.jobFromDppCrossTenantVaults
+ = new JobFromDppCrossTenantVaultsImpl(clientObject.getJobFromDppCrossTenantVaults(), this);
+ }
+ return jobFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of BackupInstanceOperationStatusFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of BackupInstanceOperationStatusFromDppCrossTenantVaults.
+ */
+ public BackupInstanceOperationStatusFromDppCrossTenantVaults
+ backupInstanceOperationStatusFromDppCrossTenantVaults() {
+ if (this.backupInstanceOperationStatusFromDppCrossTenantVaults == null) {
+ this.backupInstanceOperationStatusFromDppCrossTenantVaults
+ = new BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl(
+ clientObject.getBackupInstanceOperationStatusFromDppCrossTenantVaults(), this);
+ }
+ return backupInstanceOperationStatusFromDppCrossTenantVaults;
+ }
+
+ /**
+ * Gets the resource collection API of BackupInstanceOperationResultFromDppCrossTenantVaults.
+ *
+ * @return Resource collection API of BackupInstanceOperationResultFromDppCrossTenantVaults.
+ */
+ public BackupInstanceOperationResultFromDppCrossTenantVaults
+ backupInstanceOperationResultFromDppCrossTenantVaults() {
+ if (this.backupInstanceOperationResultFromDppCrossTenantVaults == null) {
+ this.backupInstanceOperationResultFromDppCrossTenantVaults
+ = new BackupInstanceOperationResultFromDppCrossTenantVaultsImpl(
+ clientObject.getBackupInstanceOperationResultFromDppCrossTenantVaults(), this);
+ }
+ return backupInstanceOperationResultFromDppCrossTenantVaults;
+ }
+
/**
* Gets the resource collection API of BackupVaults. It manages BackupVaultResource.
*
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..79ee519d363d5
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstanceFromDppCrossTenantVaultsClient.
+ */
+public interface BackupInstanceFromDppCrossTenantVaultsClient {
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, Context context);
+
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CrossTenantBackupInstanceResourceInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceOperationResultFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceOperationResultFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..465bb241e45b4
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceOperationResultFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstanceOperationResultFromDppCrossTenantVaultsClient.
+ */
+public interface BackupInstanceOperationResultFromDppCrossTenantVaultsClient {
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse getWithResponse(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName, String operationId, Context context);
+
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceOperationStatusFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceOperationStatusFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..4566608113625
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstanceOperationStatusFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec 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.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstanceOperationStatusFromDppCrossTenantVaultsClient.
+ */
+public interface BackupInstanceOperationStatusFromDppCrossTenantVaultsClient {
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @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 status of a cross-tenant operation (e.g along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId, Context context);
+
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a cross-tenant operation (e.g.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationResourceInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..df9c1ca0d7f3c
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.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.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstancesFromDppCrossTenantVaultsClient.
+ */
+public interface BackupInstancesFromDppCrossTenantVaultsClient {
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName);
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 cross-tenant BackupInstance resource list response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupJobsFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupJobsFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..3bb237d6df95e
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupJobsFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.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.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupJobsFromDppCrossTenantVaultsClient.
+ */
+public interface BackupJobsFromDppCrossTenantVaultsClient {
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, String mappingName);
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, String mappingName,
+ Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionManagementClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionManagementClient.java
index b3746ad1cd5f9..5566cc0d5e66d 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionManagementClient.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionManagementClient.java
@@ -81,6 +81,99 @@ public interface DataProtectionManagementClient {
*/
ResourceGuardsClient getResourceGuards();
+ /**
+ * Gets the DppCrossTenantVaultMappingsClient object to access its operations.
+ *
+ * @return the DppCrossTenantVaultMappingsClient object.
+ */
+ DppCrossTenantVaultMappingsClient getDppCrossTenantVaultMappings();
+
+ /**
+ * Gets the DppCrossTenantVaultMappingStatusClient object to access its operations.
+ *
+ * @return the DppCrossTenantVaultMappingStatusClient object.
+ */
+ DppCrossTenantVaultMappingStatusClient getDppCrossTenantVaultMappingStatus();
+
+ /**
+ * Gets the BackupInstancesFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstancesFromDppCrossTenantVaultsClient object.
+ */
+ BackupInstancesFromDppCrossTenantVaultsClient getBackupInstancesFromDppCrossTenantVaults();
+
+ /**
+ * Gets the BackupInstanceFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstanceFromDppCrossTenantVaultsClient object.
+ */
+ BackupInstanceFromDppCrossTenantVaultsClient getBackupInstanceFromDppCrossTenantVaults();
+
+ /**
+ * Gets the RestoresFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RestoresFromDppCrossTenantVaultsClient object.
+ */
+ RestoresFromDppCrossTenantVaultsClient getRestoresFromDppCrossTenantVaults();
+
+ /**
+ * Gets the ValidateRestoreFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the ValidateRestoreFromDppCrossTenantVaultsClient object.
+ */
+ ValidateRestoreFromDppCrossTenantVaultsClient getValidateRestoreFromDppCrossTenantVaults();
+
+ /**
+ * Gets the RestorableTimeRangesFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RestorableTimeRangesFromDppCrossTenantVaultsClient object.
+ */
+ RestorableTimeRangesFromDppCrossTenantVaultsClient getRestorableTimeRangesFromDppCrossTenantVaults();
+
+ /**
+ * Gets the RecoveryPointsFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RecoveryPointsFromDppCrossTenantVaultsClient object.
+ */
+ RecoveryPointsFromDppCrossTenantVaultsClient getRecoveryPointsFromDppCrossTenantVaults();
+
+ /**
+ * Gets the RecoveryPointFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RecoveryPointFromDppCrossTenantVaultsClient object.
+ */
+ RecoveryPointFromDppCrossTenantVaultsClient getRecoveryPointFromDppCrossTenantVaults();
+
+ /**
+ * Gets the BackupJobsFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupJobsFromDppCrossTenantVaultsClient object.
+ */
+ BackupJobsFromDppCrossTenantVaultsClient getBackupJobsFromDppCrossTenantVaults();
+
+ /**
+ * Gets the JobFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the JobFromDppCrossTenantVaultsClient object.
+ */
+ JobFromDppCrossTenantVaultsClient getJobFromDppCrossTenantVaults();
+
+ /**
+ * Gets the BackupInstanceOperationStatusFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstanceOperationStatusFromDppCrossTenantVaultsClient object.
+ */
+ BackupInstanceOperationStatusFromDppCrossTenantVaultsClient
+ getBackupInstanceOperationStatusFromDppCrossTenantVaults();
+
+ /**
+ * Gets the BackupInstanceOperationResultFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstanceOperationResultFromDppCrossTenantVaultsClient object.
+ */
+ BackupInstanceOperationResultFromDppCrossTenantVaultsClient
+ getBackupInstanceOperationResultFromDppCrossTenantVaults();
+
/**
* Gets the BackupVaultsClient object to access its operations.
*
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppCrossTenantVaultMappingStatusClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppCrossTenantVaultMappingStatusClient.java
new file mode 100644
index 0000000000000..ebcd0fadcd736
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppCrossTenantVaultMappingStatusClient.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingStatusResponseInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in DppCrossTenantVaultMappingStatusClient.
+ */
+public interface DppCrossTenantVaultMappingStatusClient {
+ /**
+ * Gets the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ *
+ * @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 the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkWithResponse(String resourceGroupName, String vaultName,
+ Context context);
+
+ /**
+ * Gets the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ *
+ * @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 the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CrossTenantVaultMappingStatusResponseInner check(String resourceGroupName, String vaultName);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppCrossTenantVaultMappingsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppCrossTenantVaultMappingsClient.java
new file mode 100644
index 0000000000000..afc8b1ef0f63d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DppCrossTenantVaultMappingsClient.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec 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.CrossTenantVaultMappingInner;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingRemoveRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in DppCrossTenantVaultMappingsClient.
+ */
+public interface DppCrossTenantVaultMappingsClient {
+ /**
+ * Gets a cross-tenant vault mapping by name from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a cross-tenant vault mapping by name from the target vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, Context context);
+
+ /**
+ * Gets a cross-tenant vault mapping by name from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a cross-tenant vault mapping by name from the target vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CrossTenantVaultMappingInner get(String resourceGroupName, String vaultName, String mappingName);
+
+ /**
+ * Creates or updates a cross-tenant vault mapping under the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant vault mapping resource for cross-tenant restore along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, CrossTenantVaultMappingInner resource, Context context);
+
+ /**
+ * Creates or updates a cross-tenant vault mapping under the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant vault mapping resource for cross-tenant restore.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CrossTenantVaultMappingInner createOrUpdate(String resourceGroupName, String vaultName, String mappingName,
+ CrossTenantVaultMappingInner resource);
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName);
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param body The content of the action request.
+ * @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 removeWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ CrossTenantVaultMappingRemoveRequest body, Context context);
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.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 remove(String resourceGroupName, String vaultName, String mappingName);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..9a4ab10407a21
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in JobFromDppCrossTenantVaultsClient.
+ */
+public interface JobFromDppCrossTenantVaultsClient {
+ /**
+ * Gets a job of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param jobId The name of the AzureBackupJobResource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job of the mapped source vault in a different tenant along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String jobId, Context context);
+
+ /**
+ * Gets a job of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param jobId The name of the AzureBackupJobResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job of the mapped source vault in a different tenant.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBackupJobResourceInner get(String resourceGroupName, String vaultName, String mappingName, String jobId);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..5ab3bb4d874cf
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * RecoveryPointFromDppCrossTenantVaultsClient.
+ */
+public interface RecoveryPointFromDppCrossTenantVaultsClient {
+ /**
+ * Gets a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param recoveryPointId The name of the AzureBackupRecoveryPointResource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String recoveryPointId, Context context);
+
+ /**
+ * Gets a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param recoveryPointId The name of the AzureBackupRecoveryPointResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBackupRecoveryPointResourceInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String recoveryPointId);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..abd7c05771906
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec 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.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * RecoveryPointsFromDppCrossTenantVaultsClient.
+ */
+public interface RecoveryPointsFromDppCrossTenantVaultsClient {
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName);
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param filter OData filter options.
+ * @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 azure backup recoveryPoint resource list as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String filter, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..ddfa1006d610a
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec 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.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * RestorableTimeRangesFromDppCrossTenantVaultsClient.
+ */
+public interface RestorableTimeRangesFromDppCrossTenantVaultsClient {
+ /**
+ * Finds the restorable time ranges for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 list Restore Ranges Response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response findWithResponse(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupFindRestorableTimeRangesRequest body, Context context);
+
+ /**
+ * Finds the restorable time ranges for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 list Restore Ranges Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBackupFindRestorableTimeRangesResponseResourceInner find(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest body);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestoresFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestoresFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..46db70effa613
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestoresFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in RestoresFromDppCrossTenantVaultsClient.
+ */
+public interface RestoresFromDppCrossTenantVaultsClient {
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupRestoreRequest body);
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupRestoreRequest body, Context context);
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body);
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ValidateRestoreFromDppCrossTenantVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ValidateRestoreFromDppCrossTenantVaultsClient.java
new file mode 100644
index 0000000000000..37e778c021448
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ValidateRestoreFromDppCrossTenantVaultsClient.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * ValidateRestoreFromDppCrossTenantVaultsClient.
+ */
+public interface ValidateRestoreFromDppCrossTenantVaultsClient {
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ ValidateRestoreRequestObject body);
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ ValidateRestoreRequestObject body, Context context);
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body);
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantBackupInstanceResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantBackupInstanceResourceInner.java
new file mode 100644
index 0000000000000..789712b2c4cc8
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantBackupInstanceResourceInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantBackupInstance;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * BackupInstance resource as returned by the cross-tenant read surface; its
+ * properties exclude SecretStoreResource.value.
+ */
+@Immutable
+public final class CrossTenantBackupInstanceResourceInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private CrossTenantBackupInstance properties;
+
+ /*
+ * Proxy Resource tags.
+ */
+ private Map tags;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of CrossTenantBackupInstanceResourceInner class.
+ */
+ private CrossTenantBackupInstanceResourceInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public CrossTenantBackupInstance properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the tags property: Proxy Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantBackupInstanceResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantBackupInstanceResourceInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CrossTenantBackupInstanceResourceInner.
+ */
+ public static CrossTenantBackupInstanceResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantBackupInstanceResourceInner deserializedCrossTenantBackupInstanceResourceInner
+ = new CrossTenantBackupInstanceResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCrossTenantBackupInstanceResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCrossTenantBackupInstanceResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCrossTenantBackupInstanceResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCrossTenantBackupInstanceResourceInner.properties
+ = CrossTenantBackupInstance.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedCrossTenantBackupInstanceResourceInner.tags = tags;
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCrossTenantBackupInstanceResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantBackupInstanceResourceInner;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantVaultMappingInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantVaultMappingInner.java
new file mode 100644
index 0000000000000..db25bc27f6303
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantVaultMappingInner.java
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingProperties;
+import java.io.IOException;
+
+/**
+ * Cross-tenant vault mapping resource for cross-tenant restore.
+ */
+@Fluent
+public final class CrossTenantVaultMappingInner extends ProxyResource {
+ /*
+ * CrossTenantVaultMapping properties.
+ */
+ private CrossTenantVaultMappingProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of CrossTenantVaultMappingInner class.
+ */
+ public CrossTenantVaultMappingInner() {
+ }
+
+ /**
+ * Get the properties property: CrossTenantVaultMapping properties.
+ *
+ * @return the properties value.
+ */
+ public CrossTenantVaultMappingProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: CrossTenantVaultMapping properties.
+ *
+ * @param properties the properties value to set.
+ * @return the CrossTenantVaultMappingInner object itself.
+ */
+ public CrossTenantVaultMappingInner withProperties(CrossTenantVaultMappingProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantVaultMappingInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantVaultMappingInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CrossTenantVaultMappingInner.
+ */
+ public static CrossTenantVaultMappingInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantVaultMappingInner deserializedCrossTenantVaultMappingInner = new CrossTenantVaultMappingInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingInner.properties
+ = CrossTenantVaultMappingProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantVaultMappingInner;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantVaultMappingStatusResponseInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantVaultMappingStatusResponseInner.java
new file mode 100644
index 0000000000000..0cd13902e6e00
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CrossTenantVaultMappingStatusResponseInner.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dataprotection.models.VaultMappingState;
+import java.io.IOException;
+
+/**
+ * Response for the cross-tenant vault mapping status check, from the source vault side.
+ */
+@Immutable
+public final class CrossTenantVaultMappingStatusResponseInner
+ implements JsonSerializable {
+ /*
+ * Name of the cross-tenant vault mapping, if the source vault is mapped.
+ */
+ private String mappingName;
+
+ /*
+ * Current state of the cross-tenant vault mapping.
+ */
+ private VaultMappingState mappingState;
+
+ /**
+ * Creates an instance of CrossTenantVaultMappingStatusResponseInner class.
+ */
+ private CrossTenantVaultMappingStatusResponseInner() {
+ }
+
+ /**
+ * Get the mappingName property: Name of the cross-tenant vault mapping, if the source vault is mapped.
+ *
+ * @return the mappingName value.
+ */
+ public String mappingName() {
+ return this.mappingName;
+ }
+
+ /**
+ * Get the mappingState property: Current state of the cross-tenant vault mapping.
+ *
+ * @return the mappingState value.
+ */
+ public VaultMappingState mappingState() {
+ return this.mappingState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("mappingName", this.mappingName);
+ jsonWriter.writeStringField("mappingState", this.mappingState == null ? null : this.mappingState.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantVaultMappingStatusResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantVaultMappingStatusResponseInner if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CrossTenantVaultMappingStatusResponseInner.
+ */
+ public static CrossTenantVaultMappingStatusResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantVaultMappingStatusResponseInner deserializedCrossTenantVaultMappingStatusResponseInner
+ = new CrossTenantVaultMappingStatusResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("mappingName".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingStatusResponseInner.mappingName = reader.getString();
+ } else if ("mappingState".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingStatusResponseInner.mappingState
+ = VaultMappingState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantVaultMappingStatusResponseInner;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..13cab368e74e1
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.BackupInstanceFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstanceFromDppCrossTenantVaultsClient.
+ */
+public final class BackupInstanceFromDppCrossTenantVaultsClientImpl
+ implements BackupInstanceFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupInstanceFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupInstanceFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupInstanceFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(BackupInstanceFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientBackupInstanceFromDppCrossTenantVaults
+ * to be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientBackupInstanceFromDppCrossTenantVaults")
+ public interface BackupInstanceFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName) {
+ return getWithResponseAsync(resourceGroupName, vaultName, mappingName, backupInstanceName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, backupInstanceName, accept, context);
+ }
+
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CrossTenantBackupInstanceResourceInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName) {
+ return getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..888591653d502
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+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.BackupInstanceFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantBackupInstanceResource;
+
+public final class BackupInstanceFromDppCrossTenantVaultsImpl implements BackupInstanceFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupInstanceFromDppCrossTenantVaultsImpl.class);
+
+ private final BackupInstanceFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupInstanceFromDppCrossTenantVaultsImpl(BackupInstanceFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CrossTenantBackupInstanceResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public CrossTenantBackupInstanceResource get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName) {
+ CrossTenantBackupInstanceResourceInner inner
+ = this.serviceClient().get(resourceGroupName, vaultName, mappingName, backupInstanceName);
+ if (inner != null) {
+ return new CrossTenantBackupInstanceResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupInstanceFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/BackupInstanceOperationResultFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationResultFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..0b03235d243a6
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationResultFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.BackupInstanceOperationResultFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstanceOperationResultFromDppCrossTenantVaultsClient.
+ */
+public final class BackupInstanceOperationResultFromDppCrossTenantVaultsClientImpl
+ implements BackupInstanceOperationResultFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupInstanceOperationResultFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupInstanceOperationResultFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupInstanceOperationResultFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(BackupInstanceOperationResultFromDppCrossTenantVaultsService.class,
+ client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for
+ * DataProtectionManagementClientBackupInstanceOperationResultFromDppCrossTenantVaults to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientBackupInstanceOperationResultFromDppCrossTenantVaults")
+ public interface BackupInstanceOperationResultFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/operationResults/{operationId}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono get(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/operationResults/{operationId}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Job Extended Info on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getWithResponseAsync(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName, String operationId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName,
+ operationId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Job Extended Info on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId) {
+ return getWithResponseAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse getWithResponse(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName, String operationId, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, backupInstanceName, operationId, accept, context);
+ }
+
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId) {
+ return getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId, Context.NONE)
+ .getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationResultFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationResultFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..dbcb766c0ee74
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationResultFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+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.BackupInstanceOperationResultFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceOperationResultFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse;
+import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
+
+public final class BackupInstanceOperationResultFromDppCrossTenantVaultsImpl
+ implements BackupInstanceOperationResultFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER
+ = new ClientLogger(BackupInstanceOperationResultFromDppCrossTenantVaultsImpl.class);
+
+ private final BackupInstanceOperationResultFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupInstanceOperationResultFromDppCrossTenantVaultsImpl(
+ BackupInstanceOperationResultFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String operationId, Context context) {
+ BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new OperationJobExtendedInfoImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId) {
+ OperationJobExtendedInfoInner inner
+ = this.serviceClient().get(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupInstanceOperationResultFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/BackupInstanceOperationStatusFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationStatusFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..7364d9c3a0a74
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationStatusFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.BackupInstanceOperationStatusFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstanceOperationStatusFromDppCrossTenantVaultsClient.
+ */
+public final class BackupInstanceOperationStatusFromDppCrossTenantVaultsClientImpl
+ implements BackupInstanceOperationStatusFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupInstanceOperationStatusFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupInstanceOperationStatusFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupInstanceOperationStatusFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(BackupInstanceOperationStatusFromDppCrossTenantVaultsService.class,
+ client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for
+ * DataProtectionManagementClientBackupInstanceOperationStatusFromDppCrossTenantVaults to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientBackupInstanceOperationStatusFromDppCrossTenantVaults")
+ public interface BackupInstanceOperationStatusFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/operationStatus/{operationId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/operationStatus/{operationId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a cross-tenant operation (e.g along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String operationId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName,
+ operationId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a cross-tenant operation (e.g on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId) {
+ return getWithResponseAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @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 status of a cross-tenant operation (e.g along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String operationId, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, backupInstanceName, operationId, accept, context);
+ }
+
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a cross-tenant operation (e.g.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationResourceInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId) {
+ return getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId, Context.NONE)
+ .getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..2ca11def17d53
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+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.BackupInstanceOperationStatusFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceOperationStatusFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.OperationResource;
+
+public final class BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl
+ implements BackupInstanceOperationStatusFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER
+ = new ClientLogger(BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl.class);
+
+ private final BackupInstanceOperationStatusFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupInstanceOperationStatusFromDppCrossTenantVaultsImpl(
+ BackupInstanceOperationStatusFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new OperationResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public OperationResource get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId) {
+ OperationResourceInner inner
+ = this.serviceClient().get(resourceGroupName, vaultName, mappingName, backupInstanceName, operationId);
+ if (inner != null) {
+ return new OperationResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupInstanceOperationStatusFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/BackupInstancesFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..ce6259bcfbf3d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,281 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.implementation.models.CrossTenantBackupInstanceResourceList;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * BackupInstancesFromDppCrossTenantVaultsClient.
+ */
+public final class BackupInstancesFromDppCrossTenantVaultsClientImpl
+ implements BackupInstancesFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupInstancesFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupInstancesFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupInstancesFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(BackupInstancesFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientBackupInstancesFromDppCrossTenantVaults
+ * to be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientBackupInstancesFromDppCrossTenantVaults")
+ public interface BackupInstancesFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String vaultName, String mappingName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, 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()));
+ }
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName,
+ String mappingName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, mappingName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String vaultName, String mappingName) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 cross-tenant BackupInstance resource list response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String vaultName, String mappingName, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, mappingName),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 cross-tenant BackupInstance resource list response as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, mappingName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..71432bb9e9121
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstancesFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantBackupInstanceResource;
+
+public final class BackupInstancesFromDppCrossTenantVaultsImpl implements BackupInstancesFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupInstancesFromDppCrossTenantVaultsImpl.class);
+
+ private final BackupInstancesFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupInstancesFromDppCrossTenantVaultsImpl(BackupInstancesFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, mappingName);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new CrossTenantBackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, mappingName, context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new CrossTenantBackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ private BackupInstancesFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/BackupJobsFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupJobsFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..081ab85c021f7
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupJobsFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,279 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dataprotection.fluent.BackupJobsFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.implementation.models.AzureBackupJobResourceList;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupJobsFromDppCrossTenantVaultsClient.
+ */
+public final class BackupJobsFromDppCrossTenantVaultsClientImpl implements BackupJobsFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupJobsFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupJobsFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupJobsFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(BackupJobsFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientBackupJobsFromDppCrossTenantVaults to
+ * be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientBackupJobsFromDppCrossTenantVaults")
+ public interface BackupJobsFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupJobs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupJobs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 AzureBackup Job resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String vaultName, String mappingName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, 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()));
+ }
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 AzureBackup Job resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName,
+ String mappingName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, mappingName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 AzureBackup Job resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String vaultName,
+ String mappingName) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 AzureBackup Job resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String vaultName,
+ String mappingName, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, mappingName),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, mappingName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of AzureBackup Job resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of AzureBackup Job resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupJobsFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupJobsFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..63638efef9bd0
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupJobsFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupJobsFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource;
+import com.azure.resourcemanager.dataprotection.models.BackupJobsFromDppCrossTenantVaults;
+
+public final class BackupJobsFromDppCrossTenantVaultsImpl implements BackupJobsFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupJobsFromDppCrossTenantVaultsImpl.class);
+
+ private final BackupJobsFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupJobsFromDppCrossTenantVaultsImpl(BackupJobsFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName, String mappingName) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, mappingName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName, String mappingName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, mappingName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
+ }
+
+ private BackupJobsFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/CrossTenantBackupInstanceResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossTenantBackupInstanceResourceImpl.java
new file mode 100644
index 0000000000000..58cc1382251d5
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossTenantBackupInstanceResourceImpl.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantBackupInstance;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantBackupInstanceResource;
+import java.util.Collections;
+import java.util.Map;
+
+public final class CrossTenantBackupInstanceResourceImpl implements CrossTenantBackupInstanceResource {
+ private CrossTenantBackupInstanceResourceInner innerObject;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ CrossTenantBackupInstanceResourceImpl(CrossTenantBackupInstanceResourceInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public CrossTenantBackupInstance properties() {
+ return this.innerModel().properties();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public CrossTenantBackupInstanceResourceInner 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/implementation/CrossTenantVaultMappingImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossTenantVaultMappingImpl.java
new file mode 100644
index 0000000000000..30bd970e5c0b0
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossTenantVaultMappingImpl.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.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.CrossTenantVaultMappingInner;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMapping;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingProperties;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingRemoveRequest;
+
+public final class CrossTenantVaultMappingImpl
+ implements CrossTenantVaultMapping, CrossTenantVaultMapping.Definition, CrossTenantVaultMapping.Update {
+ private CrossTenantVaultMappingInner 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 CrossTenantVaultMappingProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public CrossTenantVaultMappingInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String vaultName;
+
+ private String mappingName;
+
+ public CrossTenantVaultMappingImpl withExistingBackupVault(String resourceGroupName, String vaultName) {
+ this.resourceGroupName = resourceGroupName;
+ this.vaultName = vaultName;
+ return this;
+ }
+
+ public CrossTenantVaultMapping create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDppCrossTenantVaultMappings()
+ .createOrUpdateWithResponse(resourceGroupName, vaultName, mappingName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CrossTenantVaultMapping create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDppCrossTenantVaultMappings()
+ .createOrUpdateWithResponse(resourceGroupName, vaultName, mappingName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ CrossTenantVaultMappingImpl(String name,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = new CrossTenantVaultMappingInner();
+ this.serviceManager = serviceManager;
+ this.mappingName = name;
+ }
+
+ public CrossTenantVaultMappingImpl update() {
+ return this;
+ }
+
+ public CrossTenantVaultMapping apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDppCrossTenantVaultMappings()
+ .createOrUpdateWithResponse(resourceGroupName, vaultName, mappingName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CrossTenantVaultMapping apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDppCrossTenantVaultMappings()
+ .createOrUpdateWithResponse(resourceGroupName, vaultName, mappingName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ CrossTenantVaultMappingImpl(CrossTenantVaultMappingInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.vaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "backupVaults");
+ this.mappingName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "crossTenantVaultMappings");
+ }
+
+ public CrossTenantVaultMapping refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDppCrossTenantVaultMappings()
+ .getWithResponse(resourceGroupName, vaultName, mappingName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CrossTenantVaultMapping refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDppCrossTenantVaultMappings()
+ .getWithResponse(resourceGroupName, vaultName, mappingName, context)
+ .getValue();
+ return this;
+ }
+
+ public Response removeWithResponse(CrossTenantVaultMappingRemoveRequest body, Context context) {
+ return serviceManager.dppCrossTenantVaultMappings()
+ .removeWithResponse(resourceGroupName, vaultName, mappingName, body, context);
+ }
+
+ public void remove() {
+ serviceManager.dppCrossTenantVaultMappings().remove(resourceGroupName, vaultName, mappingName);
+ }
+
+ public CrossTenantVaultMappingImpl withProperties(CrossTenantVaultMappingProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossTenantVaultMappingStatusResponseImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossTenantVaultMappingStatusResponseImpl.java
new file mode 100644
index 0000000000000..544169c86b91f
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossTenantVaultMappingStatusResponseImpl.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingStatusResponseInner;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingStatusResponse;
+import com.azure.resourcemanager.dataprotection.models.VaultMappingState;
+
+public final class CrossTenantVaultMappingStatusResponseImpl implements CrossTenantVaultMappingStatusResponse {
+ private CrossTenantVaultMappingStatusResponseInner innerObject;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ CrossTenantVaultMappingStatusResponseImpl(CrossTenantVaultMappingStatusResponseInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String mappingName() {
+ return this.innerModel().mappingName();
+ }
+
+ public VaultMappingState mappingState() {
+ return this.innerModel().mappingState();
+ }
+
+ public CrossTenantVaultMappingStatusResponseInner 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/implementation/DataProtectionManagementClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionManagementClientImpl.java
index c4850e118e7db..ee3a98c985f67 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionManagementClientImpl.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionManagementClientImpl.java
@@ -26,8 +26,13 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstanceFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstanceOperationResultFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstanceOperationStatusFromDppCrossTenantVaultsClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.BackupJobsFromDppCrossTenantVaultsClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupVaultsClient;
@@ -36,20 +41,28 @@
import com.azure.resourcemanager.dataprotection.fluent.DataProtectionsClient;
import com.azure.resourcemanager.dataprotection.fluent.DeletedBackupInstancesClient;
import com.azure.resourcemanager.dataprotection.fluent.DeletedBackupVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.DppCrossTenantVaultMappingStatusClient;
+import com.azure.resourcemanager.dataprotection.fluent.DppCrossTenantVaultMappingsClient;
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.FetchCrossRegionRestoreJobsClient;
import com.azure.resourcemanager.dataprotection.fluent.FetchCrossRegionRestoreJobsOperationsClient;
import com.azure.resourcemanager.dataprotection.fluent.FetchSecondaryRecoveryPointsClient;
+import com.azure.resourcemanager.dataprotection.fluent.JobFromDppCrossTenantVaultsClient;
import com.azure.resourcemanager.dataprotection.fluent.JobsClient;
import com.azure.resourcemanager.dataprotection.fluent.OperationResultsClient;
import com.azure.resourcemanager.dataprotection.fluent.OperationStatusBackupVaultContextsClient;
import com.azure.resourcemanager.dataprotection.fluent.OperationStatusClient;
import com.azure.resourcemanager.dataprotection.fluent.OperationStatusResourceGroupContextsClient;
+import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointFromDppCrossTenantVaultsClient;
import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsClient;
+import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsFromDppCrossTenantVaultsClient;
import com.azure.resourcemanager.dataprotection.fluent.ResourceGuardsClient;
import com.azure.resourcemanager.dataprotection.fluent.RestorableTimeRangesClient;
+import com.azure.resourcemanager.dataprotection.fluent.RestorableTimeRangesFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.RestoresFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.ValidateRestoreFromDppCrossTenantVaultsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -218,6 +231,190 @@ public ResourceGuardsClient getResourceGuards() {
return this.resourceGuards;
}
+ /**
+ * The DppCrossTenantVaultMappingsClient object to access its operations.
+ */
+ private final DppCrossTenantVaultMappingsClient dppCrossTenantVaultMappings;
+
+ /**
+ * Gets the DppCrossTenantVaultMappingsClient object to access its operations.
+ *
+ * @return the DppCrossTenantVaultMappingsClient object.
+ */
+ public DppCrossTenantVaultMappingsClient getDppCrossTenantVaultMappings() {
+ return this.dppCrossTenantVaultMappings;
+ }
+
+ /**
+ * The DppCrossTenantVaultMappingStatusClient object to access its operations.
+ */
+ private final DppCrossTenantVaultMappingStatusClient dppCrossTenantVaultMappingStatus;
+
+ /**
+ * Gets the DppCrossTenantVaultMappingStatusClient object to access its operations.
+ *
+ * @return the DppCrossTenantVaultMappingStatusClient object.
+ */
+ public DppCrossTenantVaultMappingStatusClient getDppCrossTenantVaultMappingStatus() {
+ return this.dppCrossTenantVaultMappingStatus;
+ }
+
+ /**
+ * The BackupInstancesFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final BackupInstancesFromDppCrossTenantVaultsClient backupInstancesFromDppCrossTenantVaults;
+
+ /**
+ * Gets the BackupInstancesFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstancesFromDppCrossTenantVaultsClient object.
+ */
+ public BackupInstancesFromDppCrossTenantVaultsClient getBackupInstancesFromDppCrossTenantVaults() {
+ return this.backupInstancesFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The BackupInstanceFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final BackupInstanceFromDppCrossTenantVaultsClient backupInstanceFromDppCrossTenantVaults;
+
+ /**
+ * Gets the BackupInstanceFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstanceFromDppCrossTenantVaultsClient object.
+ */
+ public BackupInstanceFromDppCrossTenantVaultsClient getBackupInstanceFromDppCrossTenantVaults() {
+ return this.backupInstanceFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The RestoresFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final RestoresFromDppCrossTenantVaultsClient restoresFromDppCrossTenantVaults;
+
+ /**
+ * Gets the RestoresFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RestoresFromDppCrossTenantVaultsClient object.
+ */
+ public RestoresFromDppCrossTenantVaultsClient getRestoresFromDppCrossTenantVaults() {
+ return this.restoresFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The ValidateRestoreFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final ValidateRestoreFromDppCrossTenantVaultsClient validateRestoreFromDppCrossTenantVaults;
+
+ /**
+ * Gets the ValidateRestoreFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the ValidateRestoreFromDppCrossTenantVaultsClient object.
+ */
+ public ValidateRestoreFromDppCrossTenantVaultsClient getValidateRestoreFromDppCrossTenantVaults() {
+ return this.validateRestoreFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The RestorableTimeRangesFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final RestorableTimeRangesFromDppCrossTenantVaultsClient restorableTimeRangesFromDppCrossTenantVaults;
+
+ /**
+ * Gets the RestorableTimeRangesFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RestorableTimeRangesFromDppCrossTenantVaultsClient object.
+ */
+ public RestorableTimeRangesFromDppCrossTenantVaultsClient getRestorableTimeRangesFromDppCrossTenantVaults() {
+ return this.restorableTimeRangesFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The RecoveryPointsFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final RecoveryPointsFromDppCrossTenantVaultsClient recoveryPointsFromDppCrossTenantVaults;
+
+ /**
+ * Gets the RecoveryPointsFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RecoveryPointsFromDppCrossTenantVaultsClient object.
+ */
+ public RecoveryPointsFromDppCrossTenantVaultsClient getRecoveryPointsFromDppCrossTenantVaults() {
+ return this.recoveryPointsFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The RecoveryPointFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final RecoveryPointFromDppCrossTenantVaultsClient recoveryPointFromDppCrossTenantVaults;
+
+ /**
+ * Gets the RecoveryPointFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the RecoveryPointFromDppCrossTenantVaultsClient object.
+ */
+ public RecoveryPointFromDppCrossTenantVaultsClient getRecoveryPointFromDppCrossTenantVaults() {
+ return this.recoveryPointFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The BackupJobsFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final BackupJobsFromDppCrossTenantVaultsClient backupJobsFromDppCrossTenantVaults;
+
+ /**
+ * Gets the BackupJobsFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupJobsFromDppCrossTenantVaultsClient object.
+ */
+ public BackupJobsFromDppCrossTenantVaultsClient getBackupJobsFromDppCrossTenantVaults() {
+ return this.backupJobsFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The JobFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final JobFromDppCrossTenantVaultsClient jobFromDppCrossTenantVaults;
+
+ /**
+ * Gets the JobFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the JobFromDppCrossTenantVaultsClient object.
+ */
+ public JobFromDppCrossTenantVaultsClient getJobFromDppCrossTenantVaults() {
+ return this.jobFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The BackupInstanceOperationStatusFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final BackupInstanceOperationStatusFromDppCrossTenantVaultsClient backupInstanceOperationStatusFromDppCrossTenantVaults;
+
+ /**
+ * Gets the BackupInstanceOperationStatusFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstanceOperationStatusFromDppCrossTenantVaultsClient object.
+ */
+ public BackupInstanceOperationStatusFromDppCrossTenantVaultsClient
+ getBackupInstanceOperationStatusFromDppCrossTenantVaults() {
+ return this.backupInstanceOperationStatusFromDppCrossTenantVaults;
+ }
+
+ /**
+ * The BackupInstanceOperationResultFromDppCrossTenantVaultsClient object to access its operations.
+ */
+ private final BackupInstanceOperationResultFromDppCrossTenantVaultsClient backupInstanceOperationResultFromDppCrossTenantVaults;
+
+ /**
+ * Gets the BackupInstanceOperationResultFromDppCrossTenantVaultsClient object to access its operations.
+ *
+ * @return the BackupInstanceOperationResultFromDppCrossTenantVaultsClient object.
+ */
+ public BackupInstanceOperationResultFromDppCrossTenantVaultsClient
+ getBackupInstanceOperationResultFromDppCrossTenantVaults() {
+ return this.backupInstanceOperationResultFromDppCrossTenantVaults;
+ }
+
/**
* The BackupVaultsClient object to access its operations.
*/
@@ -487,12 +684,28 @@ public BackupInstancesExtensionRoutingsClient getBackupInstancesExtensionRouting
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
this.subscriptionId = subscriptionId;
- this.apiVersion = "2026-07-01";
+ this.apiVersion = "2026-08-31-preview";
this.dataProtectionOperations = new DataProtectionOperationsClientImpl(this);
this.backupInstances = new BackupInstancesClientImpl(this);
this.backupVaultOperationResults = new BackupVaultOperationResultsClientImpl(this);
this.deletedBackupVaults = new DeletedBackupVaultsClientImpl(this);
this.resourceGuards = new ResourceGuardsClientImpl(this);
+ this.dppCrossTenantVaultMappings = new DppCrossTenantVaultMappingsClientImpl(this);
+ this.dppCrossTenantVaultMappingStatus = new DppCrossTenantVaultMappingStatusClientImpl(this);
+ this.backupInstancesFromDppCrossTenantVaults = new BackupInstancesFromDppCrossTenantVaultsClientImpl(this);
+ this.backupInstanceFromDppCrossTenantVaults = new BackupInstanceFromDppCrossTenantVaultsClientImpl(this);
+ this.restoresFromDppCrossTenantVaults = new RestoresFromDppCrossTenantVaultsClientImpl(this);
+ this.validateRestoreFromDppCrossTenantVaults = new ValidateRestoreFromDppCrossTenantVaultsClientImpl(this);
+ this.restorableTimeRangesFromDppCrossTenantVaults
+ = new RestorableTimeRangesFromDppCrossTenantVaultsClientImpl(this);
+ this.recoveryPointsFromDppCrossTenantVaults = new RecoveryPointsFromDppCrossTenantVaultsClientImpl(this);
+ this.recoveryPointFromDppCrossTenantVaults = new RecoveryPointFromDppCrossTenantVaultsClientImpl(this);
+ this.backupJobsFromDppCrossTenantVaults = new BackupJobsFromDppCrossTenantVaultsClientImpl(this);
+ this.jobFromDppCrossTenantVaults = new JobFromDppCrossTenantVaultsClientImpl(this);
+ this.backupInstanceOperationStatusFromDppCrossTenantVaults
+ = new BackupInstanceOperationStatusFromDppCrossTenantVaultsClientImpl(this);
+ this.backupInstanceOperationResultFromDppCrossTenantVaults
+ = new BackupInstanceOperationResultFromDppCrossTenantVaultsClientImpl(this);
this.backupVaults = new BackupVaultsClientImpl(this);
this.operationStatusBackupVaultContexts = new OperationStatusBackupVaultContextsClientImpl(this);
this.exportJobs = new ExportJobsClientImpl(this);
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingStatusClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingStatusClientImpl.java
new file mode 100644
index 0000000000000..6d6b8a1985cf5
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingStatusClientImpl.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.DppCrossTenantVaultMappingStatusClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingStatusResponseInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DppCrossTenantVaultMappingStatusClient.
+ */
+public final class DppCrossTenantVaultMappingStatusClientImpl implements DppCrossTenantVaultMappingStatusClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DppCrossTenantVaultMappingStatusService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DppCrossTenantVaultMappingStatusClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DppCrossTenantVaultMappingStatusClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(DppCrossTenantVaultMappingStatusService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientDppCrossTenantVaultMappingStatus to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientDppCrossTenantVaultMappingStatus")
+ public interface DppCrossTenantVaultMappingStatusService {
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappingStatus")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> check(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappingStatus")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response checkSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ *
+ * @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 the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side along with
+ * {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkWithResponseAsync(String resourceGroupName,
+ String vaultName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.check(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ *
+ * @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 the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono checkAsync(String resourceGroupName, String vaultName) {
+ return checkWithResponseAsync(resourceGroupName, vaultName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ *
+ * @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 the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response checkWithResponse(String resourceGroupName,
+ String vaultName, Context context) {
+ final String accept = "application/json";
+ return service.checkSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context);
+ }
+
+ /**
+ * Gets the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ *
+ * @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 the status (Active/Inactive) of a cross-tenant vault mapping from the source vault side.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CrossTenantVaultMappingStatusResponseInner check(String resourceGroupName, String vaultName) {
+ return checkWithResponse(resourceGroupName, vaultName, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingStatusImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingStatusImpl.java
new file mode 100644
index 0000000000000..728c68c5cad72
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingStatusImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+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.DppCrossTenantVaultMappingStatusClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingStatusResponseInner;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingStatusResponse;
+import com.azure.resourcemanager.dataprotection.models.DppCrossTenantVaultMappingStatus;
+
+public final class DppCrossTenantVaultMappingStatusImpl implements DppCrossTenantVaultMappingStatus {
+ private static final ClientLogger LOGGER = new ClientLogger(DppCrossTenantVaultMappingStatusImpl.class);
+
+ private final DppCrossTenantVaultMappingStatusClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public DppCrossTenantVaultMappingStatusImpl(DppCrossTenantVaultMappingStatusClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response checkWithResponse(String resourceGroupName, String vaultName,
+ Context context) {
+ Response inner
+ = this.serviceClient().checkWithResponse(resourceGroupName, vaultName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CrossTenantVaultMappingStatusResponseImpl(inner.getValue(), this.manager()));
+ }
+
+ public CrossTenantVaultMappingStatusResponse check(String resourceGroupName, String vaultName) {
+ CrossTenantVaultMappingStatusResponseInner inner = this.serviceClient().check(resourceGroupName, vaultName);
+ if (inner != null) {
+ return new CrossTenantVaultMappingStatusResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private DppCrossTenantVaultMappingStatusClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/DppCrossTenantVaultMappingsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingsClientImpl.java
new file mode 100644
index 0000000000000..52f12ff8dba51
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingsClientImpl.java
@@ -0,0 +1,568 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.BodyParam;
+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.DppCrossTenantVaultMappingsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingInner;
+import com.azure.resourcemanager.dataprotection.implementation.models.CrossTenantVaultMappingList;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingRemoveRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DppCrossTenantVaultMappingsClient.
+ */
+public final class DppCrossTenantVaultMappingsClientImpl implements DppCrossTenantVaultMappingsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DppCrossTenantVaultMappingsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DppCrossTenantVaultMappingsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DppCrossTenantVaultMappingsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(DppCrossTenantVaultMappingsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientDppCrossTenantVaultMappings to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientDppCrossTenantVaultMappings")
+ public interface DppCrossTenantVaultMappingsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") CrossTenantVaultMappingInner resource,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") CrossTenantVaultMappingInner resource,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/remove")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> remove(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName,
+ @BodyParam("application/json") CrossTenantVaultMappingRemoveRequest body, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/remove")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response removeSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName,
+ @BodyParam("application/json") CrossTenantVaultMappingRemoveRequest body, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets a cross-tenant vault mapping by name from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a cross-tenant vault mapping by name from the target vault along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String vaultName, String mappingName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a cross-tenant vault mapping by name from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a cross-tenant vault mapping by name from the target vault on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName,
+ String mappingName) {
+ return getWithResponseAsync(resourceGroupName, vaultName, mappingName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a cross-tenant vault mapping by name from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a cross-tenant vault mapping by name from the target vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, accept, context);
+ }
+
+ /**
+ * Gets a cross-tenant vault mapping by name from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a cross-tenant vault mapping by name from the target vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CrossTenantVaultMappingInner get(String resourceGroupName, String vaultName, String mappingName) {
+ return getWithResponse(resourceGroupName, vaultName, mappingName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates a cross-tenant vault mapping under the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant vault mapping resource for cross-tenant restore along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String vaultName, String mappingName, CrossTenantVaultMappingInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, contentType, accept,
+ resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a cross-tenant vault mapping under the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant vault mapping resource for cross-tenant restore on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String vaultName,
+ String mappingName, CrossTenantVaultMappingInner resource) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, vaultName, mappingName, resource)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates or updates a cross-tenant vault mapping under the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant vault mapping resource for cross-tenant restore along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, CrossTenantVaultMappingInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, contentType, accept, resource,
+ context);
+ }
+
+ /**
+ * Creates or updates a cross-tenant vault mapping under the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant vault mapping resource for cross-tenant restore.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CrossTenantVaultMappingInner createOrUpdate(String resourceGroupName, String vaultName, String mappingName,
+ CrossTenantVaultMappingInner resource) {
+ return createOrUpdateWithResponse(resourceGroupName, vaultName, mappingName, resource, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String vaultName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, 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()));
+ }
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping 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));
+ }
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String vaultName) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String vaultName,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists the cross-tenant vault mappings under the target 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 cross-tenant vault mapping resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param body The content of the action request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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> removeWithResponseAsync(String resourceGroupName, String vaultName, String mappingName,
+ CrossTenantVaultMappingRemoveRequest body) {
+ return FluxUtil
+ .withContext(context -> service.remove(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 removeAsync(String resourceGroupName, String vaultName, String mappingName) {
+ final CrossTenantVaultMappingRemoveRequest body = null;
+ return removeWithResponseAsync(resourceGroupName, vaultName, mappingName, body)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @param body The content of the action request.
+ * @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 removeWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ CrossTenantVaultMappingRemoveRequest body, Context context) {
+ return service.removeSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, body, context);
+ }
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the backup vault.
+ * @param mappingName The name of the cross-tenant vault mapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 remove(String resourceGroupName, String vaultName, String mappingName) {
+ final CrossTenantVaultMappingRemoveRequest body = null;
+ removeWithResponse(resourceGroupName, vaultName, mappingName, body, Context.NONE);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of cross-tenant vault mapping resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of cross-tenant vault mapping resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of cross-tenant vault mapping resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingsImpl.java
new file mode 100644
index 0000000000000..7d495b7b59697
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DppCrossTenantVaultMappingsImpl.java
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec 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.DppCrossTenantVaultMappingsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingInner;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMapping;
+import com.azure.resourcemanager.dataprotection.models.CrossTenantVaultMappingRemoveRequest;
+import com.azure.resourcemanager.dataprotection.models.DppCrossTenantVaultMappings;
+
+public final class DppCrossTenantVaultMappingsImpl implements DppCrossTenantVaultMappings {
+ private static final ClientLogger LOGGER = new ClientLogger(DppCrossTenantVaultMappingsImpl.class);
+
+ private final DppCrossTenantVaultMappingsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public DppCrossTenantVaultMappingsImpl(DppCrossTenantVaultMappingsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, vaultName, mappingName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CrossTenantVaultMappingImpl(inner.getValue(), this.manager()));
+ }
+
+ public CrossTenantVaultMapping get(String resourceGroupName, String vaultName, String mappingName) {
+ CrossTenantVaultMappingInner inner = this.serviceClient().get(resourceGroupName, vaultName, mappingName);
+ if (inner != null) {
+ return new CrossTenantVaultMappingImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, vaultName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CrossTenantVaultMappingImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CrossTenantVaultMappingImpl(inner1, this.manager()));
+ }
+
+ public Response removeWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ CrossTenantVaultMappingRemoveRequest body, Context context) {
+ return this.serviceClient().removeWithResponse(resourceGroupName, vaultName, mappingName, body, context);
+ }
+
+ public void remove(String resourceGroupName, String vaultName, String mappingName) {
+ this.serviceClient().remove(resourceGroupName, vaultName, mappingName);
+ }
+
+ public CrossTenantVaultMapping getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String vaultName = ResourceManagerUtils.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 mappingName = ResourceManagerUtils.getValueFromIdByName(id, "crossTenantVaultMappings");
+ if (mappingName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'crossTenantVaultMappings'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, vaultName, mappingName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String vaultName = ResourceManagerUtils.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 mappingName = ResourceManagerUtils.getValueFromIdByName(id, "crossTenantVaultMappings");
+ if (mappingName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'crossTenantVaultMappings'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, vaultName, mappingName, context);
+ }
+
+ private DppCrossTenantVaultMappingsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+
+ public CrossTenantVaultMappingImpl define(String name) {
+ return new CrossTenantVaultMappingImpl(name, this.manager());
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..4c57620f1b49d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.JobFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in JobFromDppCrossTenantVaultsClient.
+ */
+public final class JobFromDppCrossTenantVaultsClientImpl implements JobFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final JobFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of JobFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ JobFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(JobFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientJobFromDppCrossTenantVaults to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientJobFromDppCrossTenantVaults")
+ public interface JobFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupJobs/{jobId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("jobId") String jobId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupJobs/{jobId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("jobId") String jobId,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets a job of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param jobId The name of the AzureBackupJobResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job of the mapped source vault in a different tenant along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String vaultName,
+ String mappingName, String jobId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, jobId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a job of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param jobId The name of the AzureBackupJobResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job of the mapped source vault in a different tenant on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName, String mappingName,
+ String jobId) {
+ return getWithResponseAsync(resourceGroupName, vaultName, mappingName, jobId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a job of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param jobId The name of the AzureBackupJobResource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job of the mapped source vault in a different tenant along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String jobId, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, jobId, accept, context);
+ }
+
+ /**
+ * Gets a job of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param jobId The name of the AzureBackupJobResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job of the mapped source vault in a different tenant.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureBackupJobResourceInner get(String resourceGroupName, String vaultName, String mappingName,
+ String jobId) {
+ return getWithResponse(resourceGroupName, vaultName, mappingName, jobId, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..35df72608fcc4
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+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.JobFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource;
+import com.azure.resourcemanager.dataprotection.models.JobFromDppCrossTenantVaults;
+
+public final class JobFromDppCrossTenantVaultsImpl implements JobFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(JobFromDppCrossTenantVaultsImpl.class);
+
+ private final JobFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public JobFromDppCrossTenantVaultsImpl(JobFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String jobId, Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, vaultName, mappingName, jobId, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AzureBackupJobResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public AzureBackupJobResource get(String resourceGroupName, String vaultName, String mappingName, String jobId) {
+ AzureBackupJobResourceInner inner = this.serviceClient().get(resourceGroupName, vaultName, mappingName, jobId);
+ if (inner != null) {
+ return new AzureBackupJobResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private JobFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/RecoveryPointFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..0e295dc807a00
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,173 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.RecoveryPointFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * RecoveryPointFromDppCrossTenantVaultsClient.
+ */
+public final class RecoveryPointFromDppCrossTenantVaultsClientImpl
+ implements RecoveryPointFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RecoveryPointFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RecoveryPointFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RecoveryPointFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(RecoveryPointFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientRecoveryPointFromDppCrossTenantVaults
+ * to be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientRecoveryPointFromDppCrossTenantVaults")
+ public interface RecoveryPointFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param recoveryPointId The name of the AzureBackupRecoveryPointResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant along
+ * with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName, String recoveryPointId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName,
+ recoveryPointId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param recoveryPointId The name of the AzureBackupRecoveryPointResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String recoveryPointId) {
+ return getWithResponseAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, recoveryPointId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param recoveryPointId The name of the AzureBackupRecoveryPointResource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String recoveryPointId, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, backupInstanceName, recoveryPointId, accept, context);
+ }
+
+ /**
+ * Gets a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param recoveryPointId The name of the AzureBackupRecoveryPointResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a vault-tier recovery point for a backup instance of the mapped source vault in a different tenant.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureBackupRecoveryPointResourceInner get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String recoveryPointId) {
+ return getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, recoveryPointId,
+ Context.NONE).getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..7c0ca6796fafa
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+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.RecoveryPointFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource;
+import com.azure.resourcemanager.dataprotection.models.RecoveryPointFromDppCrossTenantVaults;
+
+public final class RecoveryPointFromDppCrossTenantVaultsImpl implements RecoveryPointFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(RecoveryPointFromDppCrossTenantVaultsImpl.class);
+
+ private final RecoveryPointFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public RecoveryPointFromDppCrossTenantVaultsImpl(RecoveryPointFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String recoveryPointId, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, recoveryPointId, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AzureBackupRecoveryPointResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public AzureBackupRecoveryPointResource get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String recoveryPointId) {
+ AzureBackupRecoveryPointResourceInner inner
+ = this.serviceClient().get(resourceGroupName, vaultName, mappingName, backupInstanceName, recoveryPointId);
+ if (inner != null) {
+ return new AzureBackupRecoveryPointResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private RecoveryPointFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/RecoveryPointsFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..562bb0211fa41
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,320 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+import com.azure.resourcemanager.dataprotection.implementation.models.AzureBackupRecoveryPointResourceList;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * RecoveryPointsFromDppCrossTenantVaultsClient.
+ */
+public final class RecoveryPointsFromDppCrossTenantVaultsClientImpl
+ implements RecoveryPointsFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RecoveryPointsFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RecoveryPointsFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RecoveryPointsFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(RecoveryPointsFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientRecoveryPointsFromDppCrossTenantVaults
+ * to be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientRecoveryPointsFromDppCrossTenantVaults")
+ public interface RecoveryPointsFromDppCrossTenantVaultsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/recoveryPoints")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/recoveryPoints")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param filter OData filter options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName, String filter) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName, filter,
+ 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()));
+ }
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param filter OData filter options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String filter) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, filter),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName) {
+ final String filter = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, filter),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param filter OData filter options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName, String filter) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, backupInstanceName, filter, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param filter OData filter options.
+ * @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 azure backup recoveryPoint resource list along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName, String filter, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, backupInstanceName, filter, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName) {
+ final String filter = null;
+ return new PagedIterable<>(
+ () -> listSinglePage(resourceGroupName, vaultName, mappingName, backupInstanceName, filter),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Lists the vault-tier recovery points for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param filter OData filter options.
+ * @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 azure backup recoveryPoint resource list as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String filter, Context context) {
+ return new PagedIterable<>(
+ () -> listSinglePage(resourceGroupName, vaultName, mappingName, backupInstanceName, filter, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azure backup recoveryPoint resource list along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..dd8e1ada9984f
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RecoveryPointsFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource;
+import com.azure.resourcemanager.dataprotection.models.RecoveryPointsFromDppCrossTenantVaults;
+
+public final class RecoveryPointsFromDppCrossTenantVaultsImpl implements RecoveryPointsFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(RecoveryPointsFromDppCrossTenantVaultsImpl.class);
+
+ private final RecoveryPointsFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public RecoveryPointsFromDppCrossTenantVaultsImpl(RecoveryPointsFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, mappingName, backupInstanceName);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, String filter, Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, mappingName, backupInstanceName, filter, context);
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
+ }
+
+ private RecoveryPointsFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/RestorableTimeRangesFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..c63a81faf6021
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.RestorableTimeRangesFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * RestorableTimeRangesFromDppCrossTenantVaultsClient.
+ */
+public final class RestorableTimeRangesFromDppCrossTenantVaultsClientImpl
+ implements RestorableTimeRangesFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RestorableTimeRangesFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RestorableTimeRangesFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RestorableTimeRangesFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(RestorableTimeRangesFromDppCrossTenantVaultsService.class,
+ client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for
+ * DataProtectionManagementClientRestorableTimeRangesFromDppCrossTenantVaults to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientRestorableTimeRangesFromDppCrossTenantVaults")
+ public interface RestorableTimeRangesFromDppCrossTenantVaultsService {
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> find(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureBackupFindRestorableTimeRangesRequest body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response findSync(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureBackupFindRestorableTimeRangesRequest body, Context context);
+ }
+
+ /**
+ * Finds the restorable time ranges for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 list Restore Ranges Response along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> findWithResponseAsync(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupFindRestorableTimeRangesRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.find(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName,
+ contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Finds the restorable time ranges for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 list Restore Ranges Response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono findAsync(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupFindRestorableTimeRangesRequest body) {
+ return findWithResponseAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Finds the restorable time ranges for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 list Restore Ranges Response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response findWithResponse(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupFindRestorableTimeRangesRequest body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.findSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, mappingName, backupInstanceName, contentType, accept, body, context);
+ }
+
+ /**
+ * Finds the restorable time ranges for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 list Restore Ranges Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureBackupFindRestorableTimeRangesResponseResourceInner find(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest body) {
+ return findWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, body, Context.NONE)
+ .getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..860fa662b3f99
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestorableTimeRangesFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+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.RestorableTimeRangesFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponseResource;
+import com.azure.resourcemanager.dataprotection.models.RestorableTimeRangesFromDppCrossTenantVaults;
+
+public final class RestorableTimeRangesFromDppCrossTenantVaultsImpl
+ implements RestorableTimeRangesFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(RestorableTimeRangesFromDppCrossTenantVaultsImpl.class);
+
+ private final RestorableTimeRangesFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public RestorableTimeRangesFromDppCrossTenantVaultsImpl(
+ RestorableTimeRangesFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response findWithResponse(String resourceGroupName,
+ String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupFindRestorableTimeRangesRequest body, Context context) {
+ Response inner = this.serviceClient()
+ .findWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, body, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AzureBackupFindRestorableTimeRangesResponseResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public AzureBackupFindRestorableTimeRangesResponseResource find(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, AzureBackupFindRestorableTimeRangesRequest body) {
+ AzureBackupFindRestorableTimeRangesResponseResourceInner inner
+ = this.serviceClient().find(resourceGroupName, vaultName, mappingName, backupInstanceName, body);
+ if (inner != null) {
+ return new AzureBackupFindRestorableTimeRangesResponseResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private RestorableTimeRangesFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/RestoresFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestoresFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..67a69278a6a6f
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestoresFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,290 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.RestoresFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in RestoresFromDppCrossTenantVaultsClient.
+ */
+public final class RestoresFromDppCrossTenantVaultsClientImpl implements RestoresFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RestoresFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RestoresFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RestoresFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(RestoresFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientRestoresFromDppCrossTenantVaults to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientRestoresFromDppCrossTenantVaults")
+ public interface RestoresFromDppCrossTenantVaultsService {
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/restore")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> trigger(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureBackupRestoreRequest body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/restore")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response triggerSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AzureBackupRestoreRequest body, Context context);
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerWithResponseAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, AzureBackupRestoreRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName,
+ contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response triggerWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName, contentType,
+ accept, body, Context.NONE);
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response triggerWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link PollerFlux} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperationJobExtendedInfoInner> beginTriggerAsync(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupRestoreRequest body) {
+ Mono>> mono
+ = triggerWithResponseAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, body);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupRestoreRequest body) {
+ Response response
+ = triggerWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, body);
+ return this.client.getLroResult(response,
+ OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, Context.NONE);
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ AzureBackupRestoreRequest body, Context context) {
+ Response response
+ = triggerWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, body, context);
+ return this.client.getLroResult(response,
+ OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, context);
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, AzureBackupRestoreRequest body) {
+ return beginTriggerAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, body).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body) {
+ return beginTrigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body).getFinalResult();
+ }
+
+ /**
+ * Triggers restore for a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body, Context context) {
+ return beginTrigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body, context)
+ .getFinalResult();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestoresFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestoresFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..c2e971c1c4345
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/RestoresFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.RestoresFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
+import com.azure.resourcemanager.dataprotection.models.RestoresFromDppCrossTenantVaults;
+
+public final class RestoresFromDppCrossTenantVaultsImpl implements RestoresFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(RestoresFromDppCrossTenantVaultsImpl.class);
+
+ private final RestoresFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public RestoresFromDppCrossTenantVaultsImpl(RestoresFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationJobExtendedInfo trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body) {
+ OperationJobExtendedInfoInner inner
+ = this.serviceClient().trigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, AzureBackupRestoreRequest body, Context context) {
+ OperationJobExtendedInfoInner inner = this.serviceClient()
+ .trigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private RestoresFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/ValidateRestoreFromDppCrossTenantVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ValidateRestoreFromDppCrossTenantVaultsClientImpl.java
new file mode 100644
index 0000000000000..fa81785f88e38
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ValidateRestoreFromDppCrossTenantVaultsClientImpl.java
@@ -0,0 +1,301 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.ValidateRestoreFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in
+ * ValidateRestoreFromDppCrossTenantVaultsClient.
+ */
+public final class ValidateRestoreFromDppCrossTenantVaultsClientImpl
+ implements ValidateRestoreFromDppCrossTenantVaultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ValidateRestoreFromDppCrossTenantVaultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final DataProtectionManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ValidateRestoreFromDppCrossTenantVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ValidateRestoreFromDppCrossTenantVaultsClientImpl(DataProtectionManagementClientImpl client) {
+ this.service = RestProxy.create(ValidateRestoreFromDppCrossTenantVaultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionManagementClientValidateRestoreFromDppCrossTenantVaults
+ * to be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataProtectionManagementClientValidateRestoreFromDppCrossTenantVaults")
+ public interface ValidateRestoreFromDppCrossTenantVaultsService {
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/validateRestore")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> trigger(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ValidateRestoreRequestObject body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/crossTenantVaultMappings/{mappingName}/backupInstances/{backupInstanceName}/validateRestore")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response triggerSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("mappingName") String mappingName, @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ValidateRestoreRequestObject body, Context context);
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerWithResponseAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, ValidateRestoreRequestObject body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName,
+ contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response triggerWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName, contentType,
+ accept, body, Context.NONE);
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response triggerWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, mappingName, backupInstanceName, contentType,
+ accept, body, context);
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link PollerFlux} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperationJobExtendedInfoInner> beginTriggerAsync(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ ValidateRestoreRequestObject body) {
+ Mono>> mono
+ = triggerWithResponseAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, body);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ ValidateRestoreRequestObject body) {
+ Response response
+ = triggerWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, body);
+ return this.client.getLroResult(response,
+ OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, Context.NONE);
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 the {@link SyncPoller} for polling of operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperationJobExtendedInfoInner> beginTrigger(
+ String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ ValidateRestoreRequestObject body, Context context) {
+ Response response
+ = triggerWithResponse(resourceGroupName, vaultName, mappingName, backupInstanceName, body, context);
+ return this.client.getLroResult(response,
+ OperationJobExtendedInfoInner.class, OperationJobExtendedInfoInner.class, context);
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerAsync(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, ValidateRestoreRequestObject body) {
+ return beginTriggerAsync(resourceGroupName, vaultName, mappingName, backupInstanceName, body).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body) {
+ return beginTrigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body).getFinalResult();
+ }
+
+ /**
+ * Validates whether restore can be triggered for a backup instance of the mapped source vault in a different
+ * tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param body 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 operation Job Extended Info.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body, Context context) {
+ return beginTrigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body, context)
+ .getFinalResult();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ValidateRestoreFromDppCrossTenantVaultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ValidateRestoreFromDppCrossTenantVaultsImpl.java
new file mode 100644
index 0000000000000..b0cb36a841868
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/ValidateRestoreFromDppCrossTenantVaultsImpl.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.ValidateRestoreFromDppCrossTenantVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreFromDppCrossTenantVaults;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+
+public final class ValidateRestoreFromDppCrossTenantVaultsImpl implements ValidateRestoreFromDppCrossTenantVaults {
+ private static final ClientLogger LOGGER = new ClientLogger(ValidateRestoreFromDppCrossTenantVaultsImpl.class);
+
+ private final ValidateRestoreFromDppCrossTenantVaultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public ValidateRestoreFromDppCrossTenantVaultsImpl(ValidateRestoreFromDppCrossTenantVaultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationJobExtendedInfo trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body) {
+ OperationJobExtendedInfoInner inner
+ = this.serviceClient().trigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo trigger(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, ValidateRestoreRequestObject body, Context context) {
+ OperationJobExtendedInfoInner inner = this.serviceClient()
+ .trigger(resourceGroupName, vaultName, mappingName, backupInstanceName, body, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private ValidateRestoreFromDppCrossTenantVaultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ 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/implementation/models/CrossTenantBackupInstanceResourceList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/models/CrossTenantBackupInstanceResourceList.java
new file mode 100644
index 0000000000000..6780c494194b0
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/models/CrossTenantBackupInstanceResourceList.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.DppResourceList;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Cross-tenant BackupInstance resource list response.
+ */
+@Immutable
+public final class CrossTenantBackupInstanceResourceList extends DppResourceList {
+ /*
+ * List of resources.
+ */
+ private List value;
+
+ /*
+ * The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of CrossTenantBackupInstanceResourceList class.
+ */
+ private CrossTenantBackupInstanceResourceList() {
+ }
+
+ /**
+ * Get the value property: List of resources.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of
+ * resources.
+ *
+ * @return the nextLink value.
+ */
+ @Override
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("nextLink", nextLink());
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantBackupInstanceResourceList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantBackupInstanceResourceList if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CrossTenantBackupInstanceResourceList.
+ */
+ public static CrossTenantBackupInstanceResourceList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantBackupInstanceResourceList deserializedCrossTenantBackupInstanceResourceList
+ = new CrossTenantBackupInstanceResourceList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nextLink".equals(fieldName)) {
+ deserializedCrossTenantBackupInstanceResourceList.nextLink = reader.getString();
+ } else if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> CrossTenantBackupInstanceResourceInner.fromJson(reader1));
+ deserializedCrossTenantBackupInstanceResourceList.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantBackupInstanceResourceList;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/models/CrossTenantVaultMappingList.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/models/CrossTenantVaultMappingList.java
new file mode 100644
index 0000000000000..e3ab03d4d185d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/models/CrossTenantVaultMappingList.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingInner;
+import com.azure.resourcemanager.dataprotection.models.DppResourceList;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * List of cross-tenant vault mapping resources.
+ */
+@Immutable
+public final class CrossTenantVaultMappingList extends DppResourceList {
+ /*
+ * List of resources.
+ */
+ private List value;
+
+ /*
+ * The uri to fetch the next page of resources. Call ListNext() fetches next page of resources.
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of CrossTenantVaultMappingList class.
+ */
+ private CrossTenantVaultMappingList() {
+ }
+
+ /**
+ * Get the value property: List of resources.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The uri to fetch the next page of resources. Call ListNext() fetches next page of
+ * resources.
+ *
+ * @return the nextLink value.
+ */
+ @Override
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("nextLink", nextLink());
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantVaultMappingList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantVaultMappingList if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CrossTenantVaultMappingList.
+ */
+ public static CrossTenantVaultMappingList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantVaultMappingList deserializedCrossTenantVaultMappingList = new CrossTenantVaultMappingList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nextLink".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingList.nextLink = reader.getString();
+ } else if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> CrossTenantVaultMappingInner.fromJson(reader1));
+ deserializedCrossTenantVaultMappingList.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantVaultMappingList;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceFromDppCrossTenantVaults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceFromDppCrossTenantVaults.java
new file mode 100644
index 0000000000000..cd44e6480b078
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceFromDppCrossTenantVaults.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of BackupInstanceFromDppCrossTenantVaults.
+ */
+public interface BackupInstanceFromDppCrossTenantVaults {
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant along with {@link Response}.
+ */
+ Response getWithResponse(String resourceGroupName, String vaultName,
+ String mappingName, String backupInstanceName, Context context);
+
+ /**
+ * Gets a backup instance of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance of the mapped source vault in a different tenant.
+ */
+ CrossTenantBackupInstanceResource get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaults.java
new file mode 100644
index 0000000000000..93e34398a250d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaults.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of BackupInstanceOperationResultFromDppCrossTenantVaults.
+ */
+public interface BackupInstanceOperationResultFromDppCrossTenantVaults {
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @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 operation Job Extended Info.
+ */
+ Response getWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId, Context context);
+
+ /**
+ * Fetches the result of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the
+ * mapped source vault - the leg the restore's Location header points at. Returns 202 with Location/Retry-After
+ * while pending, and 200 with the operation result body when complete.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation Job Extended Info.
+ */
+ OperationJobExtendedInfo get(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders.java
new file mode 100644
index 0000000000000..99d9d4c33796c
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+
+/**
+ * The BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders model.
+ */
+@Immutable
+public final class BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders {
+ /*
+ * The Location property.
+ */
+ private final String location;
+
+ /*
+ * The Retry-After property.
+ */
+ private final Integer retryAfter;
+
+ // HttpHeaders containing the raw property values.
+ /**
+ * Creates an instance of BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders class.
+ *
+ * @param rawHeaders The raw HttpHeaders that will be used to create the property values.
+ */
+ public BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders(HttpHeaders rawHeaders) {
+ this.location = rawHeaders.getValue(HttpHeaderName.LOCATION);
+ String retryAfter = rawHeaders.getValue(HttpHeaderName.RETRY_AFTER);
+ if (retryAfter != null) {
+ this.retryAfter = Integer.parseInt(retryAfter);
+ } else {
+ this.retryAfter = null;
+ }
+ }
+
+ /**
+ * Get the location property: The Location property.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Get the retryAfter property: The Retry-After property.
+ *
+ * @return the retryAfter value.
+ */
+ public Integer retryAfter() {
+ return this.retryAfter;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse.java
new file mode 100644
index 0000000000000..98da098154ffe
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.rest.ResponseBase;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+
+/**
+ * Contains all response data for the get operation.
+ */
+public final class BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse extends
+ ResponseBase {
+ /**
+ * Creates an instance of BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse.
+ *
+ * @param request the request which resulted in this
+ * BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse.
+ * @param statusCode the status code of the HTTP response.
+ * @param rawHeaders the raw headers of the HTTP response.
+ * @param value the deserialized value of the HTTP response.
+ * @param headers the deserialized headers of the HTTP response.
+ */
+ public BackupInstanceOperationResultFromDppCrossTenantVaultsGetResponse(HttpRequest request, int statusCode,
+ HttpHeaders rawHeaders, OperationJobExtendedInfoInner value,
+ BackupInstanceOperationResultFromDppCrossTenantVaultsGetHeaders headers) {
+ super(request, statusCode, rawHeaders, value, headers);
+ }
+
+ /**
+ * Gets the deserialized response body.
+ *
+ * @return the deserialized response body.
+ */
+ @Override
+ public OperationJobExtendedInfoInner getValue() {
+ return super.getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationStatusFromDppCrossTenantVaults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationStatusFromDppCrossTenantVaults.java
new file mode 100644
index 0000000000000..9f212bdd53122
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstanceOperationStatusFromDppCrossTenantVaults.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of BackupInstanceOperationStatusFromDppCrossTenantVaults.
+ */
+public interface BackupInstanceOperationStatusFromDppCrossTenantVaults {
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @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 status of a cross-tenant operation (e.g along with {@link Response}.
+ */
+ Response getWithResponse(String resourceGroupName, String vaultName, String mappingName,
+ String backupInstanceName, String operationId, Context context);
+
+ /**
+ * Gets the status of a cross-tenant operation (e.g. a cross-tenant restore) for a backup instance of the mapped
+ * source vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @param backupInstanceName The name of the BackupInstanceResource.
+ * @param operationId The name of the BackupInstanceResource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a cross-tenant operation (e.g.
+ */
+ OperationResource get(String resourceGroupName, String vaultName, String mappingName, String backupInstanceName,
+ String operationId);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesFromDppCrossTenantVaults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesFromDppCrossTenantVaults.java
new file mode 100644
index 0000000000000..0567cd0ca8a93
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesFromDppCrossTenantVaults.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of BackupInstancesFromDppCrossTenantVaults.
+ */
+public interface BackupInstancesFromDppCrossTenantVaults {
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cross-tenant BackupInstance resource list response as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName);
+
+ /**
+ * Lists the backup instances of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 cross-tenant BackupInstance resource list response as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String vaultName,
+ String mappingName, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupJobsFromDppCrossTenantVaults.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupJobsFromDppCrossTenantVaults.java
new file mode 100644
index 0000000000000..1d83e9353fc26
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupJobsFromDppCrossTenantVaults.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of BackupJobsFromDppCrossTenantVaults.
+ */
+public interface BackupJobsFromDppCrossTenantVaults {
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.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 AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String vaultName, String mappingName);
+
+ /**
+ * Lists the jobs of the mapped source vault in a different tenant.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the BackupVaultResource.
+ * @param mappingName The name of the CrossTenantVaultMapping.
+ * @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 AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String vaultName, String mappingName,
+ Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BlobBackupRuleBasedAutoProtectionSettings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BlobBackupRuleBasedAutoProtectionSettings.java
index 677f1fce4be85..3362ef865d620 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BlobBackupRuleBasedAutoProtectionSettings.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BlobBackupRuleBasedAutoProtectionSettings.java
@@ -22,6 +22,7 @@ public final class BlobBackupRuleBasedAutoProtectionSettings extends BlobBackupA
private String objectType = "BlobBackupRuleBasedAutoProtectionSettings";
/*
+ *
* Rules are evaluated in the order provided. Inclusion adds candidates; exclusion removes candidates.
* If no rules are present, all containers are considered eligible when enabled = true.
*/
@@ -44,8 +45,8 @@ public String objectType() {
}
/**
- * Get the rules property: Rules are evaluated in the order provided. Inclusion adds candidates; exclusion removes
- * candidates.
+ * Get the rules property:
+ * Rules are evaluated in the order provided. Inclusion adds candidates; exclusion removes candidates.
* If no rules are present, all containers are considered eligible when enabled = true.
*
* @return the rules value.
@@ -55,8 +56,8 @@ public List rules() {
}
/**
- * Set the rules property: Rules are evaluated in the order provided. Inclusion adds candidates; exclusion removes
- * candidates.
+ * Set the rules property:
+ * Rules are evaluated in the order provided. Inclusion adds candidates; exclusion removes candidates.
* If no rules are present, all containers are considered eligible when enabled = true.
*
* @param rules the rules value to set.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantAuthCredentials.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantAuthCredentials.java
new file mode 100644
index 0000000000000..d46da4a27d000
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantAuthCredentials.java
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cross-tenant projection of the authentication-credentials discriminated base,
+ * forked so its secret-store subtype references the value-less
+ * CrossTenantSecretStoreResource. Mirror any new AuthCredentials subtype here.
+ */
+@Immutable
+public class CrossTenantAuthCredentials implements JsonSerializable {
+ /*
+ * Type of the specific object - used for deserializing.
+ */
+ private String objectType = "CrossTenantAuthCredentials";
+
+ /**
+ * Creates an instance of CrossTenantAuthCredentials class.
+ */
+ protected CrossTenantAuthCredentials() {
+ }
+
+ /**
+ * Get the objectType property: Type of the specific object - used for deserializing.
+ *
+ * @return the objectType value.
+ */
+ public String objectType() {
+ return this.objectType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("objectType", this.objectType);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantAuthCredentials from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantAuthCredentials if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CrossTenantAuthCredentials.
+ */
+ public static CrossTenantAuthCredentials fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("objectType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("SecretStoreBasedAuthCredentials".equals(discriminatorValue)) {
+ return CrossTenantSecretStoreBasedAuthCredentials.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static CrossTenantAuthCredentials fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantAuthCredentials deserializedCrossTenantAuthCredentials = new CrossTenantAuthCredentials();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("objectType".equals(fieldName)) {
+ deserializedCrossTenantAuthCredentials.objectType = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantAuthCredentials;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantBackupInstance.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantBackupInstance.java
new file mode 100644
index 0000000000000..f32f386e83850
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantBackupInstance.java
@@ -0,0 +1,291 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Cross-tenant read projection of BackupInstance. Spreads the shared model so new
+ * fields flow through automatically; only datasourceAuthCredentials is re-typed to
+ * the value-less CrossTenantAuthCredentials chain.
+ */
+@Immutable
+public final class CrossTenantBackupInstance implements JsonSerializable {
+ /*
+ * Gets or sets the Backup Instance friendly name.
+ */
+ private String friendlyName;
+
+ /*
+ * Gets or sets the data source information.
+ */
+ private Datasource dataSourceInfo;
+
+ /*
+ * Gets or sets the data source set information.
+ */
+ private DatasourceSet dataSourceSetInfo;
+
+ /*
+ * Gets or sets the policy information.
+ */
+ private PolicyInfo policyInfo;
+
+ /*
+ * ResourceGuardOperationRequests on which LAC check will be performed
+ */
+ private List resourceGuardOperationRequests;
+
+ /*
+ * Specifies the protection status of the resource
+ */
+ private ProtectionStatusDetails protectionStatus;
+
+ /*
+ * Specifies the current protection state of the resource
+ */
+ private CurrentProtectionState currentProtectionState;
+
+ /*
+ * Specifies the protection error of the resource
+ */
+ private UserFacingError protectionErrorDetails;
+
+ /*
+ * Specifies the provisioning state of the resource i.e. provisioning/updating/Succeeded/Failed
+ */
+ private String provisioningState;
+
+ /*
+ * Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run
+ * again.
+ */
+ private ValidationType validationType;
+
+ /*
+ * Contains information of the Identity Details for the BI.
+ * If it is null, default will be considered as System Assigned.
+ */
+ private IdentityDetails identityDetails;
+
+ /*
+ * The objectType property.
+ */
+ private String objectType;
+
+ /*
+ * Credentials to use to authenticate with data source provider.
+ */
+ private CrossTenantAuthCredentials datasourceAuthCredentials;
+
+ /**
+ * Creates an instance of CrossTenantBackupInstance class.
+ */
+ private CrossTenantBackupInstance() {
+ }
+
+ /**
+ * Get the friendlyName property: Gets or sets the Backup Instance friendly name.
+ *
+ * @return the friendlyName value.
+ */
+ public String friendlyName() {
+ return this.friendlyName;
+ }
+
+ /**
+ * Get the dataSourceInfo property: Gets or sets the data source information.
+ *
+ * @return the dataSourceInfo value.
+ */
+ public Datasource dataSourceInfo() {
+ return this.dataSourceInfo;
+ }
+
+ /**
+ * Get the dataSourceSetInfo property: Gets or sets the data source set information.
+ *
+ * @return the dataSourceSetInfo value.
+ */
+ public DatasourceSet dataSourceSetInfo() {
+ return this.dataSourceSetInfo;
+ }
+
+ /**
+ * Get the policyInfo property: Gets or sets the policy information.
+ *
+ * @return the policyInfo value.
+ */
+ public PolicyInfo policyInfo() {
+ return this.policyInfo;
+ }
+
+ /**
+ * Get the resourceGuardOperationRequests property: ResourceGuardOperationRequests on which LAC check will be
+ * performed.
+ *
+ * @return the resourceGuardOperationRequests value.
+ */
+ public List resourceGuardOperationRequests() {
+ return this.resourceGuardOperationRequests;
+ }
+
+ /**
+ * Get the protectionStatus property: Specifies the protection status of the resource.
+ *
+ * @return the protectionStatus value.
+ */
+ public ProtectionStatusDetails protectionStatus() {
+ return this.protectionStatus;
+ }
+
+ /**
+ * Get the currentProtectionState property: Specifies the current protection state of the resource.
+ *
+ * @return the currentProtectionState value.
+ */
+ public CurrentProtectionState currentProtectionState() {
+ return this.currentProtectionState;
+ }
+
+ /**
+ * Get the protectionErrorDetails property: Specifies the protection error of the resource.
+ *
+ * @return the protectionErrorDetails value.
+ */
+ public UserFacingError protectionErrorDetails() {
+ return this.protectionErrorDetails;
+ }
+
+ /**
+ * Get the provisioningState property: Specifies the provisioning state of the resource i.e.
+ * provisioning/updating/Succeeded/Failed.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the validationType property: Specifies the type of validation. In case of DeepValidation, all validations
+ * from /validateForBackup API will run again.
+ *
+ * @return the validationType value.
+ */
+ public ValidationType validationType() {
+ return this.validationType;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the objectType property: The objectType property.
+ *
+ * @return the objectType value.
+ */
+ public String objectType() {
+ return this.objectType;
+ }
+
+ /**
+ * Get the datasourceAuthCredentials property: Credentials to use to authenticate with data source provider.
+ *
+ * @return the datasourceAuthCredentials value.
+ */
+ public CrossTenantAuthCredentials datasourceAuthCredentials() {
+ return this.datasourceAuthCredentials;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("dataSourceInfo", this.dataSourceInfo);
+ jsonWriter.writeJsonField("policyInfo", this.policyInfo);
+ jsonWriter.writeStringField("objectType", this.objectType);
+ jsonWriter.writeStringField("friendlyName", this.friendlyName);
+ jsonWriter.writeJsonField("dataSourceSetInfo", this.dataSourceSetInfo);
+ jsonWriter.writeArrayField("resourceGuardOperationRequests", this.resourceGuardOperationRequests,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("validationType",
+ this.validationType == null ? null : this.validationType.toString());
+ jsonWriter.writeJsonField("identityDetails", this.identityDetails);
+ jsonWriter.writeJsonField("datasourceAuthCredentials", this.datasourceAuthCredentials);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantBackupInstance from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantBackupInstance if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CrossTenantBackupInstance.
+ */
+ public static CrossTenantBackupInstance fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantBackupInstance deserializedCrossTenantBackupInstance = new CrossTenantBackupInstance();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("dataSourceInfo".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.dataSourceInfo = Datasource.fromJson(reader);
+ } else if ("policyInfo".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.policyInfo = PolicyInfo.fromJson(reader);
+ } else if ("objectType".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.objectType = reader.getString();
+ } else if ("friendlyName".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.friendlyName = reader.getString();
+ } else if ("dataSourceSetInfo".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.dataSourceSetInfo = DatasourceSet.fromJson(reader);
+ } else if ("resourceGuardOperationRequests".equals(fieldName)) {
+ List resourceGuardOperationRequests = reader.readArray(reader1 -> reader1.getString());
+ deserializedCrossTenantBackupInstance.resourceGuardOperationRequests
+ = resourceGuardOperationRequests;
+ } else if ("protectionStatus".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.protectionStatus = ProtectionStatusDetails.fromJson(reader);
+ } else if ("currentProtectionState".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.currentProtectionState
+ = CurrentProtectionState.fromString(reader.getString());
+ } else if ("protectionErrorDetails".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.protectionErrorDetails = UserFacingError.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.provisioningState = reader.getString();
+ } else if ("validationType".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.validationType
+ = ValidationType.fromString(reader.getString());
+ } else if ("identityDetails".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.identityDetails = IdentityDetails.fromJson(reader);
+ } else if ("datasourceAuthCredentials".equals(fieldName)) {
+ deserializedCrossTenantBackupInstance.datasourceAuthCredentials
+ = CrossTenantAuthCredentials.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantBackupInstance;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantBackupInstanceResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantBackupInstanceResource.java
new file mode 100644
index 0000000000000..95a92c6311562
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantBackupInstanceResource.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner;
+import java.util.Map;
+
+/**
+ * An immutable client-side representation of CrossTenantBackupInstanceResource.
+ */
+public interface CrossTenantBackupInstanceResource {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ CrossTenantBackupInstance properties();
+
+ /**
+ * Gets the tags property: Proxy Resource tags.
+ *
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantBackupInstanceResourceInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ CrossTenantBackupInstanceResourceInner innerModel();
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantSecretStoreBasedAuthCredentials.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantSecretStoreBasedAuthCredentials.java
new file mode 100644
index 0000000000000..d19a362a9c6d0
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantSecretStoreBasedAuthCredentials.java
@@ -0,0 +1,94 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cross-tenant projection of SecretStoreBasedAuthCredentials whose secret store
+ * omits `value`.
+ */
+@Immutable
+public final class CrossTenantSecretStoreBasedAuthCredentials extends CrossTenantAuthCredentials {
+ /*
+ * Type of the specific object - used for deserializing.
+ */
+ private String objectType = "SecretStoreBasedAuthCredentials";
+
+ /*
+ * Secret store resource (cross-tenant read projection, without `value`).
+ */
+ private CrossTenantSecretStoreResource secretStoreResource;
+
+ /**
+ * Creates an instance of CrossTenantSecretStoreBasedAuthCredentials class.
+ */
+ private CrossTenantSecretStoreBasedAuthCredentials() {
+ }
+
+ /**
+ * Get the objectType property: Type of the specific object - used for deserializing.
+ *
+ * @return the objectType value.
+ */
+ @Override
+ public String objectType() {
+ return this.objectType;
+ }
+
+ /**
+ * Get the secretStoreResource property: Secret store resource (cross-tenant read projection, without `value`).
+ *
+ * @return the secretStoreResource value.
+ */
+ public CrossTenantSecretStoreResource secretStoreResource() {
+ return this.secretStoreResource;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("objectType", this.objectType);
+ jsonWriter.writeJsonField("secretStoreResource", this.secretStoreResource);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantSecretStoreBasedAuthCredentials from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantSecretStoreBasedAuthCredentials if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CrossTenantSecretStoreBasedAuthCredentials.
+ */
+ public static CrossTenantSecretStoreBasedAuthCredentials fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantSecretStoreBasedAuthCredentials deserializedCrossTenantSecretStoreBasedAuthCredentials
+ = new CrossTenantSecretStoreBasedAuthCredentials();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("objectType".equals(fieldName)) {
+ deserializedCrossTenantSecretStoreBasedAuthCredentials.objectType = reader.getString();
+ } else if ("secretStoreResource".equals(fieldName)) {
+ deserializedCrossTenantSecretStoreBasedAuthCredentials.secretStoreResource
+ = CrossTenantSecretStoreResource.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantSecretStoreBasedAuthCredentials;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantSecretStoreResource.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantSecretStoreResource.java
new file mode 100644
index 0000000000000..18b0227738bd6
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantSecretStoreResource.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cross-tenant projection of SecretStoreResource used only by the cross-tenant
+ * backup-instance read surface: the shared model minus `value` (a write-time
+ * credential the service never returns). Spread keeps uri/secretStoreType in sync.
+ */
+@Immutable
+public final class CrossTenantSecretStoreResource implements JsonSerializable {
+ /*
+ * Uri to get to the resource
+ */
+ private String uri;
+
+ /*
+ * Gets or sets the type of secret store
+ */
+ private SecretStoreType secretStoreType;
+
+ /**
+ * Creates an instance of CrossTenantSecretStoreResource class.
+ */
+ private CrossTenantSecretStoreResource() {
+ }
+
+ /**
+ * Get the uri property: Uri to get to the resource.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.uri;
+ }
+
+ /**
+ * Get the secretStoreType property: Gets or sets the type of secret store.
+ *
+ * @return the secretStoreType value.
+ */
+ public SecretStoreType secretStoreType() {
+ return this.secretStoreType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("secretStoreType",
+ this.secretStoreType == null ? null : this.secretStoreType.toString());
+ jsonWriter.writeStringField("uri", this.uri);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantSecretStoreResource from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantSecretStoreResource if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CrossTenantSecretStoreResource.
+ */
+ public static CrossTenantSecretStoreResource fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantSecretStoreResource deserializedCrossTenantSecretStoreResource
+ = new CrossTenantSecretStoreResource();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("secretStoreType".equals(fieldName)) {
+ deserializedCrossTenantSecretStoreResource.secretStoreType
+ = SecretStoreType.fromString(reader.getString());
+ } else if ("uri".equals(fieldName)) {
+ deserializedCrossTenantSecretStoreResource.uri = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantSecretStoreResource;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMapping.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMapping.java
new file mode 100644
index 0000000000000..212c486baf5e9
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMapping.java
@@ -0,0 +1,210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.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.CrossTenantVaultMappingInner;
+
+/**
+ * An immutable client-side representation of CrossTenantVaultMapping.
+ */
+public interface CrossTenantVaultMapping {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the properties property: CrossTenantVaultMapping properties.
+ *
+ * @return the properties value.
+ */
+ CrossTenantVaultMappingProperties properties();
+
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the name of the resource group.
+ *
+ * @return the name of the resource group.
+ */
+ String resourceGroupName();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.CrossTenantVaultMappingInner object.
+ *
+ * @return the inner object.
+ */
+ CrossTenantVaultMappingInner innerModel();
+
+ /**
+ * The entirety of the CrossTenantVaultMapping definition.
+ */
+ interface Definition
+ extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * The CrossTenantVaultMapping definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of the CrossTenantVaultMapping definition.
+ */
+ interface Blank extends WithParentResource {
+ }
+
+ /**
+ * The stage of the CrossTenantVaultMapping 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 CrossTenantVaultMapping 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.
+ */
+ CrossTenantVaultMapping create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ CrossTenantVaultMapping create(Context context);
+ }
+
+ /**
+ * The stage of the CrossTenantVaultMapping definition allowing to specify properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: CrossTenantVaultMapping properties..
+ *
+ * @param properties CrossTenantVaultMapping properties.
+ * @return the next definition stage.
+ */
+ WithCreate withProperties(CrossTenantVaultMappingProperties properties);
+ }
+ }
+
+ /**
+ * Begins update for the CrossTenantVaultMapping resource.
+ *
+ * @return the stage of resource update.
+ */
+ CrossTenantVaultMapping.Update update();
+
+ /**
+ * The template for CrossTenantVaultMapping update.
+ */
+ interface Update extends UpdateStages.WithProperties {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ CrossTenantVaultMapping apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ CrossTenantVaultMapping apply(Context context);
+ }
+
+ /**
+ * The CrossTenantVaultMapping update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the CrossTenantVaultMapping update allowing to specify properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: CrossTenantVaultMapping properties..
+ *
+ * @param properties CrossTenantVaultMapping properties.
+ * @return the next definition stage.
+ */
+ Update withProperties(CrossTenantVaultMappingProperties properties);
+ }
+ }
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ CrossTenantVaultMapping refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ CrossTenantVaultMapping refresh(Context context);
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @param body The content of the action request.
+ * @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 removeWithResponse(CrossTenantVaultMappingRemoveRequest body, Context context);
+
+ /**
+ * Removes a cross-tenant vault mapping from the target vault.
+ *
+ * @throws com.azure.core.management.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 remove();
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingProperties.java
new file mode 100644
index 0000000000000..ed0e37a2f116b
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingProperties.java
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Cross-tenant vault mapping properties for cross-tenant restore.
+ */
+@Fluent
+public final class CrossTenantVaultMappingProperties implements JsonSerializable {
+ /*
+ * ARM resource ID of the source backup vault whose data can be restored across tenants.
+ */
+ private String sourceVaultId;
+
+ /*
+ * ResourceGuardOperationRequests on which the MUA (LAC) check will be performed.
+ */
+ private List resourceGuardOperationRequests;
+
+ /*
+ * Tenant ID of the source vault in the cross-tenant vault mapping.
+ */
+ private String sourceTenantId;
+
+ /*
+ * Provisioning state of the cross-tenant vault mapping.
+ */
+ private ProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of CrossTenantVaultMappingProperties class.
+ */
+ public CrossTenantVaultMappingProperties() {
+ }
+
+ /**
+ * Get the sourceVaultId property: ARM resource ID of the source backup vault whose data can be restored across
+ * tenants.
+ *
+ * @return the sourceVaultId value.
+ */
+ public String sourceVaultId() {
+ return this.sourceVaultId;
+ }
+
+ /**
+ * Set the sourceVaultId property: ARM resource ID of the source backup vault whose data can be restored across
+ * tenants.
+ *
+ * @param sourceVaultId the sourceVaultId value to set.
+ * @return the CrossTenantVaultMappingProperties object itself.
+ */
+ public CrossTenantVaultMappingProperties withSourceVaultId(String sourceVaultId) {
+ this.sourceVaultId = sourceVaultId;
+ return this;
+ }
+
+ /**
+ * Get the resourceGuardOperationRequests property: ResourceGuardOperationRequests on which the MUA (LAC) check will
+ * be performed.
+ *
+ * @return the resourceGuardOperationRequests value.
+ */
+ public List resourceGuardOperationRequests() {
+ return this.resourceGuardOperationRequests;
+ }
+
+ /**
+ * Set the resourceGuardOperationRequests property: ResourceGuardOperationRequests on which the MUA (LAC) check will
+ * be performed.
+ *
+ * @param resourceGuardOperationRequests the resourceGuardOperationRequests value to set.
+ * @return the CrossTenantVaultMappingProperties object itself.
+ */
+ public CrossTenantVaultMappingProperties
+ withResourceGuardOperationRequests(List resourceGuardOperationRequests) {
+ this.resourceGuardOperationRequests = resourceGuardOperationRequests;
+ return this;
+ }
+
+ /**
+ * Get the sourceTenantId property: Tenant ID of the source vault in the cross-tenant vault mapping.
+ *
+ * @return the sourceTenantId value.
+ */
+ public String sourceTenantId() {
+ return this.sourceTenantId;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state of the cross-tenant vault mapping.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("sourceVaultId", this.sourceVaultId);
+ jsonWriter.writeArrayField("resourceGuardOperationRequests", this.resourceGuardOperationRequests,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantVaultMappingProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantVaultMappingProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CrossTenantVaultMappingProperties.
+ */
+ public static CrossTenantVaultMappingProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantVaultMappingProperties deserializedCrossTenantVaultMappingProperties
+ = new CrossTenantVaultMappingProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("sourceVaultId".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingProperties.sourceVaultId = reader.getString();
+ } else if ("resourceGuardOperationRequests".equals(fieldName)) {
+ List resourceGuardOperationRequests = reader.readArray(reader1 -> reader1.getString());
+ deserializedCrossTenantVaultMappingProperties.resourceGuardOperationRequests
+ = resourceGuardOperationRequests;
+ } else if ("sourceTenantId".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingProperties.sourceTenantId = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingProperties.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantVaultMappingProperties;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingRemoveRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingRemoveRequest.java
new file mode 100644
index 0000000000000..c59129d5f28fc
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingRemoveRequest.java
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Request body for the remove cross-tenant vault mapping action. Carries the Resource Guard
+ * operation requests used for the MUA (multi-user authorization) check on the remove.
+ */
+@Fluent
+public final class CrossTenantVaultMappingRemoveRequest
+ implements JsonSerializable {
+ /*
+ * Properties of the remove cross-tenant vault mapping request.
+ */
+ private CrossTenantVaultMappingRemoveRequestProperties properties;
+
+ /**
+ * Creates an instance of CrossTenantVaultMappingRemoveRequest class.
+ */
+ public CrossTenantVaultMappingRemoveRequest() {
+ }
+
+ /**
+ * Get the properties property: Properties of the remove cross-tenant vault mapping request.
+ *
+ * @return the properties value.
+ */
+ public CrossTenantVaultMappingRemoveRequestProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the remove cross-tenant vault mapping request.
+ *
+ * @param properties the properties value to set.
+ * @return the CrossTenantVaultMappingRemoveRequest object itself.
+ */
+ public CrossTenantVaultMappingRemoveRequest
+ withProperties(CrossTenantVaultMappingRemoveRequestProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantVaultMappingRemoveRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantVaultMappingRemoveRequest if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CrossTenantVaultMappingRemoveRequest.
+ */
+ public static CrossTenantVaultMappingRemoveRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantVaultMappingRemoveRequest deserializedCrossTenantVaultMappingRemoveRequest
+ = new CrossTenantVaultMappingRemoveRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedCrossTenantVaultMappingRemoveRequest.properties
+ = CrossTenantVaultMappingRemoveRequestProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrossTenantVaultMappingRemoveRequest;
+ });
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingRemoveRequestProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingRemoveRequestProperties.java
new file mode 100644
index 0000000000000..6d50a6747eb69
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossTenantVaultMappingRemoveRequestProperties.java
@@ -0,0 +1,94 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Properties of the remove cross-tenant vault mapping request.
+ */
+@Fluent
+public final class CrossTenantVaultMappingRemoveRequestProperties
+ implements JsonSerializable {
+ /*
+ * ResourceGuardOperationRequests on which the MUA (LAC) check will be performed for the remove.
+ */
+ private List resourceGuardOperationRequests;
+
+ /**
+ * Creates an instance of CrossTenantVaultMappingRemoveRequestProperties class.
+ */
+ public CrossTenantVaultMappingRemoveRequestProperties() {
+ }
+
+ /**
+ * Get the resourceGuardOperationRequests property: ResourceGuardOperationRequests on which the MUA (LAC) check will
+ * be performed for the remove.
+ *
+ * @return the resourceGuardOperationRequests value.
+ */
+ public List resourceGuardOperationRequests() {
+ return this.resourceGuardOperationRequests;
+ }
+
+ /**
+ * Set the resourceGuardOperationRequests property: ResourceGuardOperationRequests on which the MUA (LAC) check will
+ * be performed for the remove.
+ *
+ * @param resourceGuardOperationRequests the resourceGuardOperationRequests value to set.
+ * @return the CrossTenantVaultMappingRemoveRequestProperties object itself.
+ */
+ public CrossTenantVaultMappingRemoveRequestProperties
+ withResourceGuardOperationRequests(List resourceGuardOperationRequests) {
+ this.resourceGuardOperationRequests = resourceGuardOperationRequests;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("resourceGuardOperationRequests", this.resourceGuardOperationRequests,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrossTenantVaultMappingRemoveRequestProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrossTenantVaultMappingRemoveRequestProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CrossTenantVaultMappingRemoveRequestProperties.
+ */
+ public static CrossTenantVaultMappingRemoveRequestProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrossTenantVaultMappingRemoveRequestProperties deserializedCrossTenantVaultMappingRemoveRequestProperties
+ = new CrossTenantVaultMappingRemoveRequestProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("resourceGuardOperationRequests".equals(fieldName)) {
+ List