scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of Recovery Services Backup Crr service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Recovery Services Backup Crr service API instance.
+ */
+ public RecoveryServicesBackupCrrManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore")
+ .append("/")
+ .append(clientVersion);
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new RecoveryServicesBackupCrrManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of BackupResourceStorageConfigs.
+ *
+ * @return Resource collection API of BackupResourceStorageConfigs.
+ */
+ public BackupResourceStorageConfigs backupResourceStorageConfigs() {
+ if (this.backupResourceStorageConfigs == null) {
+ this.backupResourceStorageConfigs
+ = new BackupResourceStorageConfigsImpl(clientObject.getBackupResourceStorageConfigs(), this);
+ }
+ return backupResourceStorageConfigs;
+ }
+
+ /**
+ * Gets the resource collection API of RecoveryPointsCrrs.
+ *
+ * @return Resource collection API of RecoveryPointsCrrs.
+ */
+ public RecoveryPointsCrrs recoveryPointsCrrs() {
+ if (this.recoveryPointsCrrs == null) {
+ this.recoveryPointsCrrs = new RecoveryPointsCrrsImpl(clientObject.getRecoveryPointsCrrs(), this);
+ }
+ return recoveryPointsCrrs;
+ }
+
+ /**
+ * Gets the resource collection API of RecoveryPoints.
+ *
+ * @return Resource collection API of RecoveryPoints.
+ */
+ public RecoveryPoints recoveryPoints() {
+ if (this.recoveryPoints == null) {
+ this.recoveryPoints = new RecoveryPointsImpl(clientObject.getRecoveryPoints(), this);
+ }
+ return recoveryPoints;
+ }
+
+ /**
+ * Gets the resource collection API of BackupUsageSummariesCRRs.
+ *
+ * @return Resource collection API of BackupUsageSummariesCRRs.
+ */
+ public BackupUsageSummariesCRRs backupUsageSummariesCRRs() {
+ if (this.backupUsageSummariesCRRs == null) {
+ this.backupUsageSummariesCRRs
+ = new BackupUsageSummariesCRRsImpl(clientObject.getBackupUsageSummariesCRRs(), this);
+ }
+ return backupUsageSummariesCRRs;
+ }
+
+ /**
+ * Gets the resource collection API of AadPropertiesOperations.
+ *
+ * @return Resource collection API of AadPropertiesOperations.
+ */
+ public AadPropertiesOperations aadPropertiesOperations() {
+ if (this.aadPropertiesOperations == null) {
+ this.aadPropertiesOperations
+ = new AadPropertiesOperationsImpl(clientObject.getAadPropertiesOperations(), this);
+ }
+ return aadPropertiesOperations;
+ }
+
+ /**
+ * Gets the resource collection API of CrossRegionRestores.
+ *
+ * @return Resource collection API of CrossRegionRestores.
+ */
+ public CrossRegionRestores crossRegionRestores() {
+ if (this.crossRegionRestores == null) {
+ this.crossRegionRestores = new CrossRegionRestoresImpl(clientObject.getCrossRegionRestores(), this);
+ }
+ return crossRegionRestores;
+ }
+
+ /**
+ * Gets the resource collection API of BackupCrrJobDetails.
+ *
+ * @return Resource collection API of BackupCrrJobDetails.
+ */
+ public BackupCrrJobDetails backupCrrJobDetails() {
+ if (this.backupCrrJobDetails == null) {
+ this.backupCrrJobDetails = new BackupCrrJobDetailsImpl(clientObject.getBackupCrrJobDetails(), this);
+ }
+ return backupCrrJobDetails;
+ }
+
+ /**
+ * Gets the resource collection API of BackupCrrJobs.
+ *
+ * @return Resource collection API of BackupCrrJobs.
+ */
+ public BackupCrrJobs backupCrrJobs() {
+ if (this.backupCrrJobs == null) {
+ this.backupCrrJobs = new BackupCrrJobsImpl(clientObject.getBackupCrrJobs(), this);
+ }
+ return backupCrrJobs;
+ }
+
+ /**
+ * Gets the resource collection API of CrrOperationResults.
+ *
+ * @return Resource collection API of CrrOperationResults.
+ */
+ public CrrOperationResults crrOperationResults() {
+ if (this.crrOperationResults == null) {
+ this.crrOperationResults = new CrrOperationResultsImpl(clientObject.getCrrOperationResults(), this);
+ }
+ return crrOperationResults;
+ }
+
+ /**
+ * Gets the resource collection API of CrrOperationStatus.
+ *
+ * @return Resource collection API of CrrOperationStatus.
+ */
+ public CrrOperationStatus crrOperationStatus() {
+ if (this.crrOperationStatus == null) {
+ this.crrOperationStatus = new CrrOperationStatusImpl(clientObject.getCrrOperationStatus(), this);
+ }
+ return crrOperationStatus;
+ }
+
+ /**
+ * Gets the resource collection API of BackupProtectedItemsCrrs.
+ *
+ * @return Resource collection API of BackupProtectedItemsCrrs.
+ */
+ public BackupProtectedItemsCrrs backupProtectedItemsCrrs() {
+ if (this.backupProtectedItemsCrrs == null) {
+ this.backupProtectedItemsCrrs
+ = new BackupProtectedItemsCrrsImpl(clientObject.getBackupProtectedItemsCrrs(), this);
+ }
+ return backupProtectedItemsCrrs;
+ }
+
+ /**
+ * Gets wrapped service client RecoveryServicesBackupCrrManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client RecoveryServicesBackupCrrManagementClient.
+ */
+ public RecoveryServicesBackupCrrManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/AadPropertiesOperationsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/AadPropertiesOperationsClient.java
new file mode 100644
index 000000000000..4d4ba76aa384
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/AadPropertiesOperationsClient.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in AadPropertiesOperationsClient.
+ */
+public interface AadPropertiesOperationsClient {
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String azureRegion, String filter, Context context);
+
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AADPropertiesResourceInner get(String azureRegion);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupCrrJobDetailsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupCrrJobDetailsClient.java
new file mode 100644
index 000000000000..eced9d3ffff7
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupCrrJobDetailsClient.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrJobRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupCrrJobDetailsClient.
+ */
+public interface BackupCrrJobDetailsClient {
+ /**
+ * Get CRR job details from target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job 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 cRR job details from target region along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String azureRegion, CrrJobRequest parameters, Context context);
+
+ /**
+ * Get CRR job details from target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job request.
+ * @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 cRR job details from target region.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobResourceInner get(String azureRegion, CrrJobRequest parameters);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupCrrJobsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupCrrJobsClient.java
new file mode 100644
index 000000000000..c8d0880dd482
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupCrrJobsClient.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrJobRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupCrrJobsClient.
+ */
+public interface BackupCrrJobsClient {
+ /**
+ * Gets the list of CRR jobs from the target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job request.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 list of CRR jobs from the target region along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(String azureRegion, CrrJobRequest parameters, String filter,
+ String skipToken, Context context);
+
+ /**
+ * Gets the list of CRR jobs from the target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job request.
+ * @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 list of CRR jobs from the target region.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobResourceListInner list(String azureRegion, CrrJobRequest parameters);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupProtectedItemsCrrsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupProtectedItemsCrrsClient.java
new file mode 100644
index 000000000000..587e4383cbbf
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupProtectedItemsCrrsClient.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.ProtectedItemResourceListInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupProtectedItemsCrrsClient.
+ */
+public interface BackupProtectedItemsCrrsClient {
+ /**
+ * Provides a pageable list of all items that are backed up within a vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 ProtectedItem resources along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(String resourceGroupName, String vaultName, String filter,
+ String skipToken, Context context);
+
+ /**
+ * Provides a pageable list of all items that are backed up within a vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 ProtectedItem resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProtectedItemResourceListInner list(String resourceGroupName, String vaultName);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupResourceStorageConfigsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupResourceStorageConfigsClient.java
new file mode 100644
index 000000000000..9178edb719ad
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupResourceStorageConfigsClient.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.BackupResourceConfigResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupResourceStorageConfigsClient.
+ */
+public interface BackupResourceStorageConfigsClient {
+ /**
+ * Fetches resource storage config.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 resource storage details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName,
+ Context context);
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupResourceConfigResourceInner get(String resourceGroupName, String vaultName);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 resource storage details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters, Context context);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config request.
+ * @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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupResourceConfigResourceInner update(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 patchWithResponse(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters, Context context);
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config request.
+ * @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 patch(String resourceGroupName, String vaultName, BackupResourceConfigResourceInner parameters);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupUsageSummariesCRRsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupUsageSummariesCRRsClient.java
new file mode 100644
index 000000000000..f618e82a73df
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/BackupUsageSummariesCRRsClient.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.BackupManagementUsageListInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupUsageSummariesCRRsClient.
+ */
+public interface BackupUsageSummariesCRRsClient {
+ /**
+ * Fetches the backup management usage summaries of the vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 backup management usage for vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(String resourceGroupName, String vaultName, String filter,
+ String skipToken, Context context);
+
+ /**
+ * Fetches the backup management usage summaries of the vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 backup management usage for vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupManagementUsageListInner list(String resourceGroupName, String vaultName);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrossRegionRestoresClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrossRegionRestoresClient.java
new file mode 100644
index 000000000000..0b4be42f9187
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrossRegionRestoresClient.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.models.CrossRegionRestoreRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in CrossRegionRestoresClient.
+ */
+public interface CrossRegionRestoresClient {
+ /**
+ * Restores the specified backed up data in a different region as compared to where the data is backed up.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters resource cross region restore 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 triggerWithResponse(String azureRegion, CrossRegionRestoreRequest parameters, Context context);
+
+ /**
+ * Restores the specified backed up data in a different region as compared to where the data is backed up.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters resource cross region restore request.
+ * @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 trigger(String azureRegion, CrossRegionRestoreRequest parameters);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrrOperationResultsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrrOperationResultsClient.java
new file mode 100644
index 000000000000..bf59804dddbf
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrrOperationResultsClient.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.recoveryservicesbackupcrossregionrestore.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;
+
+/**
+ * An instance of this class provides access to all the operations defined in CrrOperationResultsClient.
+ */
+public interface CrrOperationResultsClient {
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @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 getWithResponse(String azureRegion, String operationId, Context context);
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @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 get(String azureRegion, String operationId);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrrOperationStatusClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrrOperationStatusClient.java
new file mode 100644
index 000000000000..314ab103f877
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/CrrOperationStatusClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.OperationStatusInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in CrrOperationStatusClient.
+ */
+public interface CrrOperationStatusClient {
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @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 status along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String azureRegion, String operationId, Context context);
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @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 status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner get(String azureRegion, String operationId);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryPointsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryPointsClient.java
new file mode 100644
index 000000000000..b9b7ab9b3683
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryPointsClient.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.CrrAccessTokenResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in RecoveryPointsClient.
+ */
+public interface RecoveryPointsClient {
+ /**
+ * Returns the Access token for communication between BMS and Protection service.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @param parameters Get Access Token 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
+ * status code 400.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getAccessTokenWithResponse(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String recoveryPointId,
+ AADPropertiesResourceInner parameters, Context context);
+
+ /**
+ * Returns the Access token for communication between BMS and Protection service.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @param parameters Get Access Token request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
+ * status code 400.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CrrAccessTokenResourceInner getAccessToken(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String recoveryPointId, AADPropertiesResourceInner parameters);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryPointsCrrsClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryPointsCrrsClient.java
new file mode 100644
index 000000000000..4e7f21da8144
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryPointsCrrsClient.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.RecoveryPointResourceInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in RecoveryPointsCrrsClient.
+ */
+public interface RecoveryPointsCrrsClient {
+ /**
+ * Provides the information of the backed up data identified using RecoveryPointID.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return base class for backup copies along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String recoveryPointId, Context context);
+
+ /**
+ * Provides the information of the backed up data identified using RecoveryPointID.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return base class for backup copies.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RecoveryPointResourceInner get(String resourceGroupName, String vaultName, String fabricName, String containerName,
+ String protectedItemName, String recoveryPointId);
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 RecoveryPoint resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName);
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 list of RecoveryPoint resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String filter, Context context);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryServicesBackupCrrManagementClient.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryServicesBackupCrrManagementClient.java
new file mode 100644
index 000000000000..d9390ede045a
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/RecoveryServicesBackupCrrManagementClient.java
@@ -0,0 +1,125 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for RecoveryServicesBackupCrrManagementClient class.
+ */
+public interface RecoveryServicesBackupCrrManagementClient {
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the BackupResourceStorageConfigsClient object to access its operations.
+ *
+ * @return the BackupResourceStorageConfigsClient object.
+ */
+ BackupResourceStorageConfigsClient getBackupResourceStorageConfigs();
+
+ /**
+ * Gets the RecoveryPointsCrrsClient object to access its operations.
+ *
+ * @return the RecoveryPointsCrrsClient object.
+ */
+ RecoveryPointsCrrsClient getRecoveryPointsCrrs();
+
+ /**
+ * Gets the RecoveryPointsClient object to access its operations.
+ *
+ * @return the RecoveryPointsClient object.
+ */
+ RecoveryPointsClient getRecoveryPoints();
+
+ /**
+ * Gets the BackupUsageSummariesCRRsClient object to access its operations.
+ *
+ * @return the BackupUsageSummariesCRRsClient object.
+ */
+ BackupUsageSummariesCRRsClient getBackupUsageSummariesCRRs();
+
+ /**
+ * Gets the AadPropertiesOperationsClient object to access its operations.
+ *
+ * @return the AadPropertiesOperationsClient object.
+ */
+ AadPropertiesOperationsClient getAadPropertiesOperations();
+
+ /**
+ * Gets the CrossRegionRestoresClient object to access its operations.
+ *
+ * @return the CrossRegionRestoresClient object.
+ */
+ CrossRegionRestoresClient getCrossRegionRestores();
+
+ /**
+ * Gets the BackupCrrJobDetailsClient object to access its operations.
+ *
+ * @return the BackupCrrJobDetailsClient object.
+ */
+ BackupCrrJobDetailsClient getBackupCrrJobDetails();
+
+ /**
+ * Gets the BackupCrrJobsClient object to access its operations.
+ *
+ * @return the BackupCrrJobsClient object.
+ */
+ BackupCrrJobsClient getBackupCrrJobs();
+
+ /**
+ * Gets the CrrOperationResultsClient object to access its operations.
+ *
+ * @return the CrrOperationResultsClient object.
+ */
+ CrrOperationResultsClient getCrrOperationResults();
+
+ /**
+ * Gets the CrrOperationStatusClient object to access its operations.
+ *
+ * @return the CrrOperationStatusClient object.
+ */
+ CrrOperationStatusClient getCrrOperationStatus();
+
+ /**
+ * Gets the BackupProtectedItemsCrrsClient object to access its operations.
+ *
+ * @return the BackupProtectedItemsCrrsClient object.
+ */
+ BackupProtectedItemsCrrsClient getBackupProtectedItemsCrrs();
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/AADPropertiesResourceInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/AADPropertiesResourceInner.java
new file mode 100644
index 000000000000..1cee6f8f8f3e
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/AADPropertiesResourceInner.java
@@ -0,0 +1,192 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.AADProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The AADPropertiesResource model.
+ */
+@Fluent
+public final class AADPropertiesResourceInner extends Resource {
+ /*
+ * AADPropertiesResource properties
+ */
+ private AADProperties properties;
+
+ /*
+ * Optional ETag.
+ */
+ private String eTag;
+
+ /*
+ * 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 AADPropertiesResourceInner class.
+ */
+ public AADPropertiesResourceInner() {
+ }
+
+ /**
+ * Get the properties property: AADPropertiesResource properties.
+ *
+ * @return the properties value.
+ */
+ public AADProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: AADPropertiesResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the AADPropertiesResourceInner object itself.
+ */
+ public AADPropertiesResourceInner withProperties(AADProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: Optional ETag.
+ *
+ * @return the eTag value.
+ */
+ public String eTag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: Optional ETag.
+ *
+ * @param eTag the eTag value to set.
+ * @return the AADPropertiesResourceInner object itself.
+ */
+ public AADPropertiesResourceInner withETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * 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 AADPropertiesResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public AADPropertiesResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("eTag", this.eTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AADPropertiesResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AADPropertiesResourceInner 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 AADPropertiesResourceInner.
+ */
+ public static AADPropertiesResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AADPropertiesResourceInner deserializedAADPropertiesResourceInner = new AADPropertiesResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAADPropertiesResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAADPropertiesResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAADPropertiesResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedAADPropertiesResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedAADPropertiesResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedAADPropertiesResourceInner.properties = AADProperties.fromJson(reader);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedAADPropertiesResourceInner.eTag = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAADPropertiesResourceInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/BackupManagementUsageListInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/BackupManagementUsageListInner.java
new file mode 100644
index 000000000000..c2d8d442a46d
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/BackupManagementUsageListInner.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.models.BackupManagementUsage;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Backup management usage for vault.
+ */
+@Immutable
+public final class BackupManagementUsageListInner implements JsonSerializable {
+ /*
+ * The list of backup management usages for the given vault.
+ */
+ private List value;
+
+ /**
+ * Creates an instance of BackupManagementUsageListInner class.
+ */
+ private BackupManagementUsageListInner() {
+ }
+
+ /**
+ * Get the value property: The list of backup management usages for the given vault.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupManagementUsageListInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupManagementUsageListInner 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 BackupManagementUsageListInner.
+ */
+ public static BackupManagementUsageListInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupManagementUsageListInner deserializedBackupManagementUsageListInner
+ = new BackupManagementUsageListInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> BackupManagementUsage.fromJson(reader1));
+ deserializedBackupManagementUsageListInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupManagementUsageListInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/BackupResourceConfigResourceInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/BackupResourceConfigResourceInner.java
new file mode 100644
index 000000000000..358a396fa239
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/BackupResourceConfigResourceInner.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.models.BackupResourceConfig;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The resource storage details.
+ */
+@Fluent
+public final class BackupResourceConfigResourceInner extends ProxyResource {
+ /*
+ * BackupResourceConfigResource properties
+ */
+ private BackupResourceConfig properties;
+
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
+ /*
+ * The geo-location where the resource lives
+ */
+ private String location;
+
+ /*
+ * Optional ETag.
+ */
+ private String eTag;
+
+ /*
+ * 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 BackupResourceConfigResourceInner class.
+ */
+ public BackupResourceConfigResourceInner() {
+ }
+
+ /**
+ * Get the properties property: BackupResourceConfigResource properties.
+ *
+ * @return the properties value.
+ */
+ public BackupResourceConfig properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: BackupResourceConfigResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the BackupResourceConfigResourceInner object itself.
+ */
+ public BackupResourceConfigResourceInner withProperties(BackupResourceConfig properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the BackupResourceConfigResourceInner object itself.
+ */
+ public BackupResourceConfigResourceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the location property: The geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The geo-location where the resource lives.
+ *
+ * @param location the location value to set.
+ * @return the BackupResourceConfigResourceInner object itself.
+ */
+ public BackupResourceConfigResourceInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the eTag property: Optional ETag.
+ *
+ * @return the eTag value.
+ */
+ public String eTag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: Optional ETag.
+ *
+ * @param eTag the eTag value to set.
+ * @return the BackupResourceConfigResourceInner object itself.
+ */
+ public BackupResourceConfigResourceInner withETag(String eTag) {
+ this.eTag = eTag;
+ 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);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeStringField("eTag", this.eTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of BackupResourceConfigResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of BackupResourceConfigResourceInner 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 BackupResourceConfigResourceInner.
+ */
+ public static BackupResourceConfigResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ BackupResourceConfigResourceInner deserializedBackupResourceConfigResourceInner
+ = new BackupResourceConfigResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedBackupResourceConfigResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedBackupResourceConfigResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedBackupResourceConfigResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedBackupResourceConfigResourceInner.properties = BackupResourceConfig.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedBackupResourceConfigResourceInner.tags = tags;
+ } else if ("location".equals(fieldName)) {
+ deserializedBackupResourceConfigResourceInner.location = reader.getString();
+ } else if ("eTag".equals(fieldName)) {
+ deserializedBackupResourceConfigResourceInner.eTag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedBackupResourceConfigResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedBackupResourceConfigResourceInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/CrrAccessTokenResourceInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/CrrAccessTokenResourceInner.java
new file mode 100644
index 000000000000..c08591032875
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/CrrAccessTokenResourceInner.java
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.Resource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrAccessToken;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The CrrAccessTokenResource model.
+ */
+@Immutable
+public final class CrrAccessTokenResourceInner extends Resource {
+ /*
+ * CrrAccessTokenResource properties
+ */
+ private CrrAccessToken properties;
+
+ /*
+ * Optional ETag.
+ */
+ private String eTag;
+
+ /*
+ * 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 CrrAccessTokenResourceInner class.
+ */
+ private CrrAccessTokenResourceInner() {
+ }
+
+ /**
+ * Get the properties property: CrrAccessTokenResource properties.
+ *
+ * @return the properties value.
+ */
+ public CrrAccessToken properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the eTag property: Optional ETag.
+ *
+ * @return the eTag value.
+ */
+ public String eTag() {
+ return this.eTag;
+ }
+
+ /**
+ * 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.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("eTag", this.eTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CrrAccessTokenResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CrrAccessTokenResourceInner 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 CrrAccessTokenResourceInner.
+ */
+ public static CrrAccessTokenResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CrrAccessTokenResourceInner deserializedCrrAccessTokenResourceInner = new CrrAccessTokenResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCrrAccessTokenResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCrrAccessTokenResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCrrAccessTokenResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedCrrAccessTokenResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedCrrAccessTokenResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedCrrAccessTokenResourceInner.properties = CrrAccessToken.fromJson(reader);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedCrrAccessTokenResourceInner.eTag = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCrrAccessTokenResourceInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/JobResourceInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/JobResourceInner.java
new file mode 100644
index 000000000000..4dd757bad340
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/JobResourceInner.java
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.Resource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.Job;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Defines workload agnostic properties for a job.
+ */
+@Immutable
+public final class JobResourceInner extends Resource {
+ /*
+ * JobResource properties
+ */
+ private Job properties;
+
+ /*
+ * Optional ETag.
+ */
+ private String eTag;
+
+ /*
+ * 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 JobResourceInner class.
+ */
+ private JobResourceInner() {
+ }
+
+ /**
+ * Get the properties property: JobResource properties.
+ *
+ * @return the properties value.
+ */
+ public Job properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the eTag property: Optional ETag.
+ *
+ * @return the eTag value.
+ */
+ public String eTag() {
+ return this.eTag;
+ }
+
+ /**
+ * 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.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("eTag", this.eTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of JobResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of JobResourceInner 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 JobResourceInner.
+ */
+ public static JobResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ JobResourceInner deserializedJobResourceInner = new JobResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedJobResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedJobResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedJobResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedJobResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedJobResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedJobResourceInner.properties = Job.fromJson(reader);
+ } else if ("eTag".equals(fieldName)) {
+ deserializedJobResourceInner.eTag = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedJobResourceInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/JobResourceListInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/JobResourceListInner.java
new file mode 100644
index 000000000000..a50cfd049f0b
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/JobResourceListInner.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.recoveryservicesbackupcrossregionrestore.fluent.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.recoveryservicesbackupcrossregionrestore.models.ResourceList;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * List of Job resources.
+ */
+@Immutable
+public final class JobResourceListInner extends ResourceList {
+ /*
+ * 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 JobResourceListInner class.
+ */
+ private JobResourceListInner() {
+ }
+
+ /**
+ * 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 JobResourceListInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of JobResourceListInner 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 JobResourceListInner.
+ */
+ public static JobResourceListInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ JobResourceListInner deserializedJobResourceListInner = new JobResourceListInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nextLink".equals(fieldName)) {
+ deserializedJobResourceListInner.nextLink = reader.getString();
+ } else if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> JobResourceInner.fromJson(reader1));
+ deserializedJobResourceListInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedJobResourceListInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/OperationStatusInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/OperationStatusInner.java
new file mode 100644
index 000000000000..e01ca69701f4
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/OperationStatusInner.java
@@ -0,0 +1,186 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatusError;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatusExtendedInfo;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatusValues;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * Operation status.
+ */
+@Immutable
+public final class OperationStatusInner implements JsonSerializable {
+ /*
+ * ID of the operation.
+ */
+ private String id;
+
+ /*
+ * Name of the operation.
+ */
+ private String name;
+
+ /*
+ * Operation status.
+ */
+ private OperationStatusValues status;
+
+ /*
+ * Operation start time. Format: ISO-8601.
+ */
+ private OffsetDateTime startTime;
+
+ /*
+ * Operation end time. Format: ISO-8601.
+ */
+ private OffsetDateTime endTime;
+
+ /*
+ * Error information related to this operation.
+ */
+ private OperationStatusError error;
+
+ /*
+ * Additional information associated with this operation.
+ */
+ private OperationStatusExtendedInfo properties;
+
+ /**
+ * Creates an instance of OperationStatusInner class.
+ */
+ private OperationStatusInner() {
+ }
+
+ /**
+ * Get the id property: ID of the operation.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: Name of the operation.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the status property: Operation status.
+ *
+ * @return the status value.
+ */
+ public OperationStatusValues status() {
+ return this.status;
+ }
+
+ /**
+ * Get the startTime property: Operation start time. Format: ISO-8601.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Get the endTime property: Operation end time. Format: ISO-8601.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Get the error property: Error information related to this operation.
+ *
+ * @return the error value.
+ */
+ public OperationStatusError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the properties property: Additional information associated with this operation.
+ *
+ * @return the properties value.
+ */
+ public OperationStatusExtendedInfo properties() {
+ return this.properties;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("id", this.id);
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
+ jsonWriter.writeStringField("startTime",
+ this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime));
+ jsonWriter.writeStringField("endTime",
+ this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime));
+ jsonWriter.writeJsonField("error", this.error);
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationStatusInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationStatusInner 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 OperationStatusInner.
+ */
+ public static OperationStatusInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationStatusInner deserializedOperationStatusInner = new OperationStatusInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedOperationStatusInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOperationStatusInner.name = reader.getString();
+ } else if ("status".equals(fieldName)) {
+ deserializedOperationStatusInner.status = OperationStatusValues.fromString(reader.getString());
+ } else if ("startTime".equals(fieldName)) {
+ deserializedOperationStatusInner.startTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("endTime".equals(fieldName)) {
+ deserializedOperationStatusInner.endTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("error".equals(fieldName)) {
+ deserializedOperationStatusInner.error = OperationStatusError.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedOperationStatusInner.properties = OperationStatusExtendedInfo.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationStatusInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/ProtectedItemResourceListInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/ProtectedItemResourceListInner.java
new file mode 100644
index 000000000000..a5db241c98a5
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/ProtectedItemResourceListInner.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.recoveryservicesbackupcrossregionrestore.fluent.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.recoveryservicesbackupcrossregionrestore.models.ProtectedItemResource;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.ResourceList;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * List of ProtectedItem resources.
+ */
+@Immutable
+public final class ProtectedItemResourceListInner extends ResourceList {
+ /*
+ * 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 ProtectedItemResourceListInner class.
+ */
+ private ProtectedItemResourceListInner() {
+ }
+
+ /**
+ * 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 ProtectedItemResourceListInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ProtectedItemResourceListInner 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 ProtectedItemResourceListInner.
+ */
+ public static ProtectedItemResourceListInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ProtectedItemResourceListInner deserializedProtectedItemResourceListInner
+ = new ProtectedItemResourceListInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nextLink".equals(fieldName)) {
+ deserializedProtectedItemResourceListInner.nextLink = reader.getString();
+ } else if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ProtectedItemResource.fromJson(reader1));
+ deserializedProtectedItemResourceListInner.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedProtectedItemResourceListInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/RecoveryPointResourceInner.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/RecoveryPointResourceInner.java
new file mode 100644
index 000000000000..693a8b95f202
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/RecoveryPointResourceInner.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.models.RecoveryPoint;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Base class for backup copies. Workload-specific backup copies are derived from this class.
+ */
+@Immutable
+public final class RecoveryPointResourceInner extends ProxyResource {
+ /*
+ * RecoveryPointResource properties
+ */
+ private RecoveryPoint properties;
+
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
+ /*
+ * The geo-location where the resource lives
+ */
+ private String location;
+
+ /*
+ * Optional ETag.
+ */
+ private String eTag;
+
+ /*
+ * 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 RecoveryPointResourceInner class.
+ */
+ private RecoveryPointResourceInner() {
+ }
+
+ /**
+ * Get the properties property: RecoveryPointResource properties.
+ *
+ * @return the properties value.
+ */
+ public RecoveryPoint properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Get the location property: The geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Get the eTag property: Optional ETag.
+ *
+ * @return the eTag value.
+ */
+ public String eTag() {
+ return this.eTag;
+ }
+
+ /**
+ * 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));
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeStringField("eTag", this.eTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RecoveryPointResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RecoveryPointResourceInner 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 RecoveryPointResourceInner.
+ */
+ public static RecoveryPointResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RecoveryPointResourceInner deserializedRecoveryPointResourceInner = new RecoveryPointResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedRecoveryPointResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedRecoveryPointResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedRecoveryPointResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedRecoveryPointResourceInner.properties = RecoveryPoint.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedRecoveryPointResourceInner.tags = tags;
+ } else if ("location".equals(fieldName)) {
+ deserializedRecoveryPointResourceInner.location = reader.getString();
+ } else if ("eTag".equals(fieldName)) {
+ deserializedRecoveryPointResourceInner.eTag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedRecoveryPointResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRecoveryPointResourceInner;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/package-info.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/package-info.java
new file mode 100644
index 000000000000..5d2b198d02e1
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for RecoveryServicesBackupCrr.
+ * Open API 2.0 Specs for Azure Recovery Services Backup CRR (Cross Region Restore) service.
+ */
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models;
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/package-info.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/package-info.java
new file mode 100644
index 000000000000..b416de6085df
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for RecoveryServicesBackupCrr.
+ * Open API 2.0 Specs for Azure Recovery Services Backup CRR (Cross Region Restore) service.
+ */
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent;
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AADPropertiesResourceImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AADPropertiesResourceImpl.java
new file mode 100644
index 000000000000..28a5e4e6c337
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AADPropertiesResourceImpl.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.AADProperties;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.AADPropertiesResource;
+import java.util.Collections;
+import java.util.Map;
+
+public final class AADPropertiesResourceImpl implements AADPropertiesResource {
+ private AADPropertiesResourceInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ AADPropertiesResourceImpl(AADPropertiesResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager 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 String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public AADProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public String eTag() {
+ return this.innerModel().eTag();
+ }
+
+ public AADPropertiesResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AadPropertiesOperationsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AadPropertiesOperationsClientImpl.java
new file mode 100644
index 000000000000..79bec99f4a4f
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AadPropertiesOperationsClientImpl.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.AadPropertiesOperationsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in AadPropertiesOperationsClient.
+ */
+public final class AadPropertiesOperationsClientImpl implements AadPropertiesOperationsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AadPropertiesOperationsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AadPropertiesOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AadPropertiesOperationsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(AadPropertiesOperationsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientAadPropertiesOperations to
+ * be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientAadPropertiesOperations")
+ public interface AadPropertiesOperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("azureRegion") String azureRegion, @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("azureRegion") String azureRegion, @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 the response body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String azureRegion, String filter) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), azureRegion, filter, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 response body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String azureRegion) {
+ final String filter = null;
+ return getWithResponseAsync(azureRegion, filter).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String azureRegion, String filter, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ azureRegion, filter, accept, context);
+ }
+
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AADPropertiesResourceInner get(String azureRegion) {
+ final String filter = null;
+ return getWithResponse(azureRegion, filter, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AadPropertiesOperationsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AadPropertiesOperationsImpl.java
new file mode 100644
index 000000000000..d30ba5935ea6
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/AadPropertiesOperationsImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.AadPropertiesOperationsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.AADPropertiesResource;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.AadPropertiesOperations;
+
+public final class AadPropertiesOperationsImpl implements AadPropertiesOperations {
+ private static final ClientLogger LOGGER = new ClientLogger(AadPropertiesOperationsImpl.class);
+
+ private final AadPropertiesOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public AadPropertiesOperationsImpl(AadPropertiesOperationsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String azureRegion, String filter, Context context) {
+ Response inner = this.serviceClient().getWithResponse(azureRegion, filter, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AADPropertiesResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public AADPropertiesResource get(String azureRegion) {
+ AADPropertiesResourceInner inner = this.serviceClient().get(azureRegion);
+ if (inner != null) {
+ return new AADPropertiesResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private AadPropertiesOperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobDetailsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobDetailsClientImpl.java
new file mode 100644
index 000000000000..8242c0316b8a
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobDetailsClientImpl.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupCrrJobDetailsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrJobRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupCrrJobDetailsClient.
+ */
+public final class BackupCrrJobDetailsClientImpl implements BackupCrrJobDetailsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupCrrJobDetailsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupCrrJobDetailsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupCrrJobDetailsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(BackupCrrJobDetailsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientBackupCrrJobDetails to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientBackupCrrJobDetails")
+ public interface BackupCrrJobDetailsService {
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion,
+ @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") CrrJobRequest parameters,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion,
+ @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") CrrJobRequest parameters,
+ Context context);
+ }
+
+ /**
+ * Get CRR job details from target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job 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 cRR job details from target region along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String azureRegion, CrrJobRequest parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), contentType, accept, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get CRR job details from target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job 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 cRR job details from target region on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String azureRegion, CrrJobRequest parameters) {
+ return getWithResponseAsync(azureRegion, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get CRR job details from target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job 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 cRR job details from target region along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String azureRegion, CrrJobRequest parameters, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), contentType, accept, parameters, context);
+ }
+
+ /**
+ * Get CRR job details from target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job 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 cRR job details from target region.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobResourceInner get(String azureRegion, CrrJobRequest parameters) {
+ return getWithResponse(azureRegion, parameters, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobDetailsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobDetailsImpl.java
new file mode 100644
index 000000000000..ce8c09f6a42f
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobDetailsImpl.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupCrrJobDetailsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupCrrJobDetails;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrJobRequest;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.JobResource;
+
+public final class BackupCrrJobDetailsImpl implements BackupCrrJobDetails {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupCrrJobDetailsImpl.class);
+
+ private final BackupCrrJobDetailsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public BackupCrrJobDetailsImpl(BackupCrrJobDetailsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String azureRegion, CrrJobRequest parameters, Context context) {
+ Response inner = this.serviceClient().getWithResponse(azureRegion, parameters, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new JobResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public JobResource get(String azureRegion, CrrJobRequest parameters) {
+ JobResourceInner inner = this.serviceClient().get(azureRegion, parameters);
+ if (inner != null) {
+ return new JobResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupCrrJobDetailsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobsClientImpl.java
new file mode 100644
index 000000000000..b61a9c03c6f3
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobsClientImpl.java
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupCrrJobsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrJobRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupCrrJobsClient.
+ */
+public final class BackupCrrJobsClientImpl implements BackupCrrJobsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupCrrJobsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupCrrJobsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupCrrJobsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service
+ = RestProxy.create(BackupCrrJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientBackupCrrJobs to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientBackupCrrJobs")
+ public interface BackupCrrJobsService {
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion,
+ @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter,
+ @QueryParam("$skipToken") String skipToken, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") CrrJobRequest parameters,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion,
+ @PathParam("subscriptionId") String subscriptionId, @QueryParam("$filter") String filter,
+ @QueryParam("$skipToken") String skipToken, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") CrrJobRequest parameters,
+ Context context);
+ }
+
+ /**
+ * Gets the list of CRR jobs from the target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job request.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 list of CRR jobs from the target region along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listWithResponseAsync(String azureRegion, CrrJobRequest parameters,
+ String filter, String skipToken) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), filter, skipToken, contentType, accept, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the list of CRR jobs from the target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job 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 list of CRR jobs from the target region on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listAsync(String azureRegion, CrrJobRequest parameters) {
+ final String filter = null;
+ final String skipToken = null;
+ return listWithResponseAsync(azureRegion, parameters, filter, skipToken)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the list of CRR jobs from the target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job request.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 list of CRR jobs from the target region along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listWithResponse(String azureRegion, CrrJobRequest parameters, String filter,
+ String skipToken, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), filter, skipToken, contentType, accept, parameters, context);
+ }
+
+ /**
+ * Gets the list of CRR jobs from the target region.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters CRR job 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 list of CRR jobs from the target region.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobResourceListInner list(String azureRegion, CrrJobRequest parameters) {
+ final String filter = null;
+ final String skipToken = null;
+ return listWithResponse(azureRegion, parameters, filter, skipToken, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobsImpl.java
new file mode 100644
index 000000000000..1a01095477fd
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupCrrJobsImpl.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupCrrJobsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupCrrJobs;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrJobRequest;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.JobResourceList;
+
+public final class BackupCrrJobsImpl implements BackupCrrJobs {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupCrrJobsImpl.class);
+
+ private final BackupCrrJobsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public BackupCrrJobsImpl(BackupCrrJobsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response listWithResponse(String azureRegion, CrrJobRequest parameters, String filter,
+ String skipToken, Context context) {
+ Response inner
+ = this.serviceClient().listWithResponse(azureRegion, parameters, filter, skipToken, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new JobResourceListImpl(inner.getValue(), this.manager()));
+ }
+
+ public JobResourceList list(String azureRegion, CrrJobRequest parameters) {
+ JobResourceListInner inner = this.serviceClient().list(azureRegion, parameters);
+ if (inner != null) {
+ return new JobResourceListImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupCrrJobsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupManagementUsageListImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupManagementUsageListImpl.java
new file mode 100644
index 000000000000..c8e7ec6c8e3b
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupManagementUsageListImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.BackupManagementUsageListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupManagementUsage;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupManagementUsageList;
+import java.util.Collections;
+import java.util.List;
+
+public final class BackupManagementUsageListImpl implements BackupManagementUsageList {
+ private BackupManagementUsageListInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ BackupManagementUsageListImpl(BackupManagementUsageListInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public BackupManagementUsageListInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupProtectedItemsCrrsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupProtectedItemsCrrsClientImpl.java
new file mode 100644
index 000000000000..185ac8667884
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupProtectedItemsCrrsClientImpl.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupProtectedItemsCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.ProtectedItemResourceListInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupProtectedItemsCrrsClient.
+ */
+public final class BackupProtectedItemsCrrsClientImpl implements BackupProtectedItemsCrrsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupProtectedItemsCrrsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupProtectedItemsCrrsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupProtectedItemsCrrsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(BackupProtectedItemsCrrsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientBackupProtectedItemsCrrs to
+ * be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientBackupProtectedItemsCrrs")
+ public interface BackupProtectedItemsCrrsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/")
+ @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,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems/")
+ @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,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Provides a pageable list of all items that are backed up within a vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 ProtectedItem resources along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listWithResponseAsync(String resourceGroupName,
+ String vaultName, String filter, String skipToken) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, skipToken, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Provides a pageable list of all items that are backed up within a vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 ProtectedItem resources on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listAsync(String resourceGroupName, String vaultName) {
+ final String filter = null;
+ final String skipToken = null;
+ return listWithResponseAsync(resourceGroupName, vaultName, filter, skipToken)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Provides a pageable list of all items that are backed up within a vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 ProtectedItem resources along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listWithResponse(String resourceGroupName, String vaultName,
+ String filter, String skipToken, Context context) {
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, filter, skipToken, accept, context);
+ }
+
+ /**
+ * Provides a pageable list of all items that are backed up within a vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 ProtectedItem resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ProtectedItemResourceListInner list(String resourceGroupName, String vaultName) {
+ final String filter = null;
+ final String skipToken = null;
+ return listWithResponse(resourceGroupName, vaultName, filter, skipToken, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupProtectedItemsCrrsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupProtectedItemsCrrsImpl.java
new file mode 100644
index 000000000000..91251c5844a2
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupProtectedItemsCrrsImpl.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupProtectedItemsCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.ProtectedItemResourceListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupProtectedItemsCrrs;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.ProtectedItemResourceList;
+
+public final class BackupProtectedItemsCrrsImpl implements BackupProtectedItemsCrrs {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupProtectedItemsCrrsImpl.class);
+
+ private final BackupProtectedItemsCrrsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public BackupProtectedItemsCrrsImpl(BackupProtectedItemsCrrsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response listWithResponse(String resourceGroupName, String vaultName,
+ String filter, String skipToken, Context context) {
+ Response inner
+ = this.serviceClient().listWithResponse(resourceGroupName, vaultName, filter, skipToken, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ProtectedItemResourceListImpl(inner.getValue(), this.manager()));
+ }
+
+ public ProtectedItemResourceList list(String resourceGroupName, String vaultName) {
+ ProtectedItemResourceListInner inner = this.serviceClient().list(resourceGroupName, vaultName);
+ if (inner != null) {
+ return new ProtectedItemResourceListImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupProtectedItemsCrrsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceConfigResourceImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceConfigResourceImpl.java
new file mode 100644
index 000000000000..22543295b394
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceConfigResourceImpl.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.BackupResourceConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupResourceConfig;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupResourceConfigResource;
+import java.util.Collections;
+import java.util.Map;
+
+public final class BackupResourceConfigResourceImpl implements BackupResourceConfigResource {
+ private BackupResourceConfigResourceInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ BackupResourceConfigResourceImpl(BackupResourceConfigResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager 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 BackupResourceConfig 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 String location() {
+ return this.innerModel().location();
+ }
+
+ public String eTag() {
+ return this.innerModel().eTag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public BackupResourceConfigResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceStorageConfigsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceStorageConfigsClientImpl.java
new file mode 100644
index 000000000000..5af1bd37bbe1
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceStorageConfigsClientImpl.java
@@ -0,0 +1,338 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.Patch;
+import com.azure.core.annotation.PathParam;
+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.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.recoveryservicesbackupcrossregionrestore.fluent.BackupResourceStorageConfigsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.BackupResourceConfigResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupResourceStorageConfigsClient.
+ */
+public final class BackupResourceStorageConfigsClientImpl implements BackupResourceStorageConfigsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupResourceStorageConfigsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupResourceStorageConfigsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupResourceStorageConfigsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(BackupResourceStorageConfigsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientBackupResourceStorageConfigs
+ * to be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientBackupResourceStorageConfigs")
+ public interface BackupResourceStorageConfigsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @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,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @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,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> patch(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response patchSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") BackupResourceConfigResourceInner parameters, Context context);
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 resource storage details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String vaultName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 resource storage details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName) {
+ return getWithResponseAsync(resourceGroupName, vaultName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 resource storage details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, accept, context);
+ }
+
+ /**
+ * Fetches resource storage config.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupResourceConfigResourceInner get(String resourceGroupName, String vaultName) {
+ return getWithResponse(resourceGroupName, vaultName, Context.NONE).getValue();
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 resource storage details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName,
+ String vaultName, BackupResourceConfigResourceInner parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 resource storage details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters) {
+ return updateWithResponseAsync(resourceGroupName, vaultName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 resource storage details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, accept, parameters, context);
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 resource storage details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupResourceConfigResourceInner update(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters) {
+ return updateWithResponse(resourceGroupName, vaultName, parameters, Context.NONE).getValue();
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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> patchWithResponseAsync(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters) {
+ final String contentType = "application/json";
+ return FluxUtil
+ .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono patchAsync(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters) {
+ return patchWithResponseAsync(resourceGroupName, vaultName, parameters).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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 patchWithResponse(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters, Context context) {
+ final String contentType = "application/json";
+ return service.patchSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, contentType, parameters, context);
+ }
+
+ /**
+ * Updates vault storage model type.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param parameters Vault storage config 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void patch(String resourceGroupName, String vaultName, BackupResourceConfigResourceInner parameters) {
+ patchWithResponse(resourceGroupName, vaultName, parameters, Context.NONE);
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceStorageConfigsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceStorageConfigsImpl.java
new file mode 100644
index 000000000000..351cae186fc2
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupResourceStorageConfigsImpl.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupResourceStorageConfigsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.BackupResourceConfigResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupResourceConfigResource;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupResourceStorageConfigs;
+
+public final class BackupResourceStorageConfigsImpl implements BackupResourceStorageConfigs {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupResourceStorageConfigsImpl.class);
+
+ private final BackupResourceStorageConfigsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public BackupResourceStorageConfigsImpl(BackupResourceStorageConfigsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, vaultName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BackupResourceConfigResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public BackupResourceConfigResource get(String resourceGroupName, String vaultName) {
+ BackupResourceConfigResourceInner inner = this.serviceClient().get(resourceGroupName, vaultName);
+ if (inner != null) {
+ return new BackupResourceConfigResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response updateWithResponse(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters, Context context) {
+ Response inner
+ = this.serviceClient().updateWithResponse(resourceGroupName, vaultName, parameters, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BackupResourceConfigResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public BackupResourceConfigResource update(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters) {
+ BackupResourceConfigResourceInner inner = this.serviceClient().update(resourceGroupName, vaultName, parameters);
+ if (inner != null) {
+ return new BackupResourceConfigResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response patchWithResponse(String resourceGroupName, String vaultName,
+ BackupResourceConfigResourceInner parameters, Context context) {
+ return this.serviceClient().patchWithResponse(resourceGroupName, vaultName, parameters, context);
+ }
+
+ public void patch(String resourceGroupName, String vaultName, BackupResourceConfigResourceInner parameters) {
+ this.serviceClient().patch(resourceGroupName, vaultName, parameters);
+ }
+
+ private BackupResourceStorageConfigsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupUsageSummariesCRRsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupUsageSummariesCRRsClientImpl.java
new file mode 100644
index 000000000000..7a643949cf49
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupUsageSummariesCRRsClientImpl.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupUsageSummariesCRRsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.BackupManagementUsageListInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in BackupUsageSummariesCRRsClient.
+ */
+public final class BackupUsageSummariesCRRsClientImpl implements BackupUsageSummariesCRRsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final BackupUsageSummariesCRRsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of BackupUsageSummariesCRRsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupUsageSummariesCRRsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(BackupUsageSummariesCRRsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientBackupUsageSummariesCRRs to
+ * be used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientBackupUsageSummariesCRRs")
+ public interface BackupUsageSummariesCRRsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries")
+ @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,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupUsageSummaries")
+ @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,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Fetches the backup management usage summaries of the vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 backup management usage for vault along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listWithResponseAsync(String resourceGroupName,
+ String vaultName, String filter, String skipToken) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, filter, skipToken, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetches the backup management usage summaries of the vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 backup management usage for vault on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listAsync(String resourceGroupName, String vaultName) {
+ final String filter = null;
+ final String skipToken = null;
+ return listWithResponseAsync(resourceGroupName, vaultName, filter, skipToken)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Fetches the backup management usage summaries of the vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @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 backup management usage for vault along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listWithResponse(String resourceGroupName, String vaultName,
+ String filter, String skipToken, Context context) {
+ final String accept = "application/json";
+ return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, filter, skipToken, accept, context);
+ }
+
+ /**
+ * Fetches the backup management usage summaries of the vault.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services 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 backup management usage for vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupManagementUsageListInner list(String resourceGroupName, String vaultName) {
+ final String filter = null;
+ final String skipToken = null;
+ return listWithResponse(resourceGroupName, vaultName, filter, skipToken, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupUsageSummariesCRRsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupUsageSummariesCRRsImpl.java
new file mode 100644
index 000000000000..14488c2600c2
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/BackupUsageSummariesCRRsImpl.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.BackupUsageSummariesCRRsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.BackupManagementUsageListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupManagementUsageList;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.BackupUsageSummariesCRRs;
+
+public final class BackupUsageSummariesCRRsImpl implements BackupUsageSummariesCRRs {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupUsageSummariesCRRsImpl.class);
+
+ private final BackupUsageSummariesCRRsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public BackupUsageSummariesCRRsImpl(BackupUsageSummariesCRRsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response listWithResponse(String resourceGroupName, String vaultName,
+ String filter, String skipToken, Context context) {
+ Response inner
+ = this.serviceClient().listWithResponse(resourceGroupName, vaultName, filter, skipToken, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new BackupManagementUsageListImpl(inner.getValue(), this.manager()));
+ }
+
+ public BackupManagementUsageList list(String resourceGroupName, String vaultName) {
+ BackupManagementUsageListInner inner = this.serviceClient().list(resourceGroupName, vaultName);
+ if (inner != null) {
+ return new BackupManagementUsageListImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private BackupUsageSummariesCRRsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrossRegionRestoresClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrossRegionRestoresClientImpl.java
new file mode 100644
index 000000000000..9c0d8d926e19
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrossRegionRestoresClientImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.annotation.BodyParam;
+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.recoveryservicesbackupcrossregionrestore.fluent.CrossRegionRestoresClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrossRegionRestoreRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CrossRegionRestoresClient.
+ */
+public final class CrossRegionRestoresClientImpl implements CrossRegionRestoresClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final CrossRegionRestoresService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CrossRegionRestoresClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CrossRegionRestoresClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(CrossRegionRestoresService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientCrossRegionRestores to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientCrossRegionRestores")
+ public interface CrossRegionRestoresService {
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> trigger(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion,
+ @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") CrossRegionRestoreRequest parameters, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response triggerSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("azureRegion") String azureRegion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") CrossRegionRestoreRequest parameters, Context context);
+ }
+
+ /**
+ * Restores the specified backed up data in a different region as compared to where the data is backed up.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters resource cross region restore 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> triggerWithResponseAsync(String azureRegion, CrossRegionRestoreRequest parameters) {
+ final String contentType = "application/json";
+ return FluxUtil
+ .withContext(context -> service.trigger(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), contentType, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Restores the specified backed up data in a different region as compared to where the data is backed up.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters resource cross region restore 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerAsync(String azureRegion, CrossRegionRestoreRequest parameters) {
+ return triggerWithResponseAsync(azureRegion, parameters).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Restores the specified backed up data in a different region as compared to where the data is backed up.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters resource cross region restore 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 triggerWithResponse(String azureRegion, CrossRegionRestoreRequest parameters,
+ Context context) {
+ final String contentType = "application/json";
+ return service.triggerSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), contentType, parameters, context);
+ }
+
+ /**
+ * Restores the specified backed up data in a different region as compared to where the data is backed up.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param parameters resource cross region restore 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void trigger(String azureRegion, CrossRegionRestoreRequest parameters) {
+ triggerWithResponse(azureRegion, parameters, Context.NONE);
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrossRegionRestoresImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrossRegionRestoresImpl.java
new file mode 100644
index 000000000000..25603fc3673f
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrossRegionRestoresImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.CrossRegionRestoresClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrossRegionRestoreRequest;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrossRegionRestores;
+
+public final class CrossRegionRestoresImpl implements CrossRegionRestores {
+ private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoresImpl.class);
+
+ private final CrossRegionRestoresClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public CrossRegionRestoresImpl(CrossRegionRestoresClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response triggerWithResponse(String azureRegion, CrossRegionRestoreRequest parameters,
+ Context context) {
+ return this.serviceClient().triggerWithResponse(azureRegion, parameters, context);
+ }
+
+ public void trigger(String azureRegion, CrossRegionRestoreRequest parameters) {
+ this.serviceClient().trigger(azureRegion, parameters);
+ }
+
+ private CrossRegionRestoresClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrAccessTokenResourceImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrAccessTokenResourceImpl.java
new file mode 100644
index 000000000000..388e6df98f3d
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrAccessTokenResourceImpl.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.CrrAccessTokenResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrAccessToken;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrAccessTokenResource;
+import java.util.Collections;
+import java.util.Map;
+
+public final class CrrAccessTokenResourceImpl implements CrrAccessTokenResource {
+ private CrrAccessTokenResourceInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ CrrAccessTokenResourceImpl(CrrAccessTokenResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager 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 String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public CrrAccessToken properties() {
+ return this.innerModel().properties();
+ }
+
+ public String eTag() {
+ return this.innerModel().eTag();
+ }
+
+ public CrrAccessTokenResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationResultsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationResultsClientImpl.java
new file mode 100644
index 000000000000..9a87e87d681c
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationResultsClientImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+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.recoveryservicesbackupcrossregionrestore.fluent.CrrOperationResultsClient;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CrrOperationResultsClient.
+ */
+public final class CrrOperationResultsClientImpl implements CrrOperationResultsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final CrrOperationResultsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CrrOperationResultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CrrOperationResultsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(CrrOperationResultsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientCrrOperationResults to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientCrrOperationResults")
+ public interface CrrOperationResultsService {
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("azureRegion") String azureRegion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("operationId") String operationId, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("azureRegion") String azureRegion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("operationId") String operationId, Context context);
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String azureRegion, String operationId) {
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), operationId, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String azureRegion, String operationId) {
+ return getWithResponseAsync(azureRegion, operationId).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String azureRegion, String operationId, Context context) {
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), operationId, context);
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void get(String azureRegion, String operationId) {
+ getWithResponse(azureRegion, operationId, Context.NONE);
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationResultsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationResultsImpl.java
new file mode 100644
index 000000000000..78c38f115dda
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationResultsImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.CrrOperationResultsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrOperationResults;
+
+public final class CrrOperationResultsImpl implements CrrOperationResults {
+ private static final ClientLogger LOGGER = new ClientLogger(CrrOperationResultsImpl.class);
+
+ private final CrrOperationResultsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public CrrOperationResultsImpl(CrrOperationResultsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String azureRegion, String operationId, Context context) {
+ return this.serviceClient().getWithResponse(azureRegion, operationId, context);
+ }
+
+ public void get(String azureRegion, String operationId) {
+ this.serviceClient().get(azureRegion, operationId);
+ }
+
+ private CrrOperationResultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationStatusClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationStatusClientImpl.java
new file mode 100644
index 000000000000..d6fe168cf38d
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationStatusClientImpl.java
@@ -0,0 +1,145 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.CrrOperationStatusClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.OperationStatusInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CrrOperationStatusClient.
+ */
+public final class CrrOperationStatusClientImpl implements CrrOperationStatusClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final CrrOperationStatusService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CrrOperationStatusClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CrrOperationStatusClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(CrrOperationStatusService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientCrrOperationStatus to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientCrrOperationStatus")
+ public interface CrrOperationStatusService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("azureRegion") String azureRegion,
+ @PathParam("subscriptionId") String subscriptionId, @PathParam("operationId") String operationId,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String azureRegion, String operationId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), operationId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String azureRegion, String operationId) {
+ return getWithResponseAsync(azureRegion, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String azureRegion, String operationId, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), azureRegion,
+ this.client.getSubscriptionId(), operationId, accept, context);
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @param operationId The operationId parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner get(String azureRegion, String operationId) {
+ return getWithResponse(azureRegion, operationId, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationStatusImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationStatusImpl.java
new file mode 100644
index 000000000000..9262443b8cbb
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/CrrOperationStatusImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.CrrOperationStatusClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrOperationStatus;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatus;
+
+public final class CrrOperationStatusImpl implements CrrOperationStatus {
+ private static final ClientLogger LOGGER = new ClientLogger(CrrOperationStatusImpl.class);
+
+ private final CrrOperationStatusClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public CrrOperationStatusImpl(CrrOperationStatusClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String azureRegion, String operationId, Context context) {
+ Response inner = this.serviceClient().getWithResponse(azureRegion, operationId, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new OperationStatusImpl(inner.getValue(), this.manager()));
+ }
+
+ public OperationStatus get(String azureRegion, String operationId) {
+ OperationStatusInner inner = this.serviceClient().get(azureRegion, operationId);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private CrrOperationStatusClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/JobResourceImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/JobResourceImpl.java
new file mode 100644
index 000000000000..506ef3340ed9
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/JobResourceImpl.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.Job;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.JobResource;
+import java.util.Collections;
+import java.util.Map;
+
+public final class JobResourceImpl implements JobResource {
+ private JobResourceInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ JobResourceImpl(JobResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager 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 String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Job properties() {
+ return this.innerModel().properties();
+ }
+
+ public String eTag() {
+ return this.innerModel().eTag();
+ }
+
+ public JobResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/JobResourceListImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/JobResourceListImpl.java
new file mode 100644
index 000000000000..6041df08c1cd
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/JobResourceListImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.JobResourceListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.JobResource;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.JobResourceList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public final class JobResourceListImpl implements JobResourceList {
+ private JobResourceListInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ JobResourceListImpl(JobResourceListInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String nextLink() {
+ return this.innerModel().nextLink();
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections.unmodifiableList(
+ inner.stream().map(inner1 -> new JobResourceImpl(inner1, this.manager())).collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public JobResourceListInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/OperationStatusImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/OperationStatusImpl.java
new file mode 100644
index 000000000000..adee36eccb4b
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/OperationStatusImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatus;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatusError;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatusExtendedInfo;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.OperationStatusValues;
+import java.time.OffsetDateTime;
+
+public final class OperationStatusImpl implements OperationStatus {
+ private OperationStatusInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ OperationStatusImpl(OperationStatusInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationStatusValues status() {
+ return this.innerModel().status();
+ }
+
+ public OffsetDateTime startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public OffsetDateTime endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public OperationStatusError error() {
+ return this.innerModel().error();
+ }
+
+ public OperationStatusExtendedInfo properties() {
+ return this.innerModel().properties();
+ }
+
+ public OperationStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/ProtectedItemResourceListImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/ProtectedItemResourceListImpl.java
new file mode 100644
index 000000000000..0280c96050d8
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/ProtectedItemResourceListImpl.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.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.ProtectedItemResourceListInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.ProtectedItemResource;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.ProtectedItemResourceList;
+import java.util.Collections;
+import java.util.List;
+
+public final class ProtectedItemResourceListImpl implements ProtectedItemResourceList {
+ private ProtectedItemResourceListInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ ProtectedItemResourceListImpl(ProtectedItemResourceListInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String nextLink() {
+ return this.innerModel().nextLink();
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ProtectedItemResourceListInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointResourceImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointResourceImpl.java
new file mode 100644
index 000000000000..d9e4cc033f2b
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointResourceImpl.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.RecoveryPointResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.RecoveryPoint;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.RecoveryPointResource;
+import java.util.Collections;
+import java.util.Map;
+
+public final class RecoveryPointResourceImpl implements RecoveryPointResource {
+ private RecoveryPointResourceInner innerObject;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ RecoveryPointResourceImpl(RecoveryPointResourceInner innerObject,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager 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 RecoveryPoint 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 String location() {
+ return this.innerModel().location();
+ }
+
+ public String eTag() {
+ return this.innerModel().eTag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public RecoveryPointResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsClientImpl.java
new file mode 100644
index 000000000000..893118fbf8f2
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsClientImpl.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.RecoveryPointsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.CrrAccessTokenResourceInner;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in RecoveryPointsClient.
+ */
+public final class RecoveryPointsClientImpl implements RecoveryPointsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RecoveryPointsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RecoveryPointsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RecoveryPointsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service
+ = RestProxy.create(RecoveryPointsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientRecoveryPoints to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientRecoveryPoints")
+ public interface RecoveryPointsService {
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 400 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getAccessToken(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName,
+ @PathParam("protectedItemName") String protectedItemName,
+ @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") AADPropertiesResourceInner parameters,
+ Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 400 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getAccessTokenSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vaultName") String vaultName,
+ @PathParam("fabricName") String fabricName, @PathParam("containerName") String containerName,
+ @PathParam("protectedItemName") String protectedItemName,
+ @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") AADPropertiesResourceInner parameters,
+ Context context);
+ }
+
+ /**
+ * Returns the Access token for communication between BMS and Protection service.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @param parameters Get Access Token request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws ManagementException thrown if the request is rejected by server on status code 400.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAccessTokenWithResponseAsync(String resourceGroupName,
+ String vaultName, String fabricName, String containerName, String protectedItemName, String recoveryPointId,
+ AADPropertiesResourceInner parameters) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getAccessToken(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName,
+ protectedItemName, recoveryPointId, contentType, accept, parameters, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns the Access token for communication between BMS and Protection service.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @param parameters Get Access Token request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws ManagementException thrown if the request is rejected by server on status code 400.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAccessTokenAsync(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String recoveryPointId,
+ AADPropertiesResourceInner parameters) {
+ return getAccessTokenWithResponseAsync(resourceGroupName, vaultName, fabricName, containerName,
+ protectedItemName, recoveryPointId, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Returns the Access token for communication between BMS and Protection service.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @param parameters Get Access Token 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 ManagementException thrown if the request is rejected by server on status code 400.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getAccessTokenWithResponse(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String recoveryPointId,
+ AADPropertiesResourceInner parameters, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.getAccessTokenSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName, protectedItemName,
+ recoveryPointId, contentType, accept, parameters, context);
+ }
+
+ /**
+ * Returns the Access token for communication between BMS and Protection service.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @param parameters Get Access Token request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws ManagementException thrown if the request is rejected by server on status code 400.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CrrAccessTokenResourceInner getAccessToken(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String recoveryPointId, AADPropertiesResourceInner parameters) {
+ return getAccessTokenWithResponse(resourceGroupName, vaultName, fabricName, containerName, protectedItemName,
+ recoveryPointId, parameters, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsCrrsClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsCrrsClientImpl.java
new file mode 100644
index 000000000000..d31e0161f0d4
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsCrrsClientImpl.java
@@ -0,0 +1,366 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.RecoveryPointsCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.RecoveryPointResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation.models.RecoveryPointResourceList;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in RecoveryPointsCrrsClient.
+ */
+public final class RecoveryPointsCrrsClientImpl implements RecoveryPointsCrrsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final RecoveryPointsCrrsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final RecoveryServicesBackupCrrManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RecoveryPointsCrrsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ RecoveryPointsCrrsClientImpl(RecoveryServicesBackupCrrManagementClientImpl client) {
+ this.service = RestProxy.create(RecoveryPointsCrrsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoveryServicesBackupCrrManagementClientRecoveryPointsCrrs to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "RecoveryServicesBackupCrrManagementClientRecoveryPointsCrrs")
+ public interface RecoveryPointsCrrsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/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("fabricName") String fabricName, @PathParam("containerName") String containerName,
+ @PathParam("protectedItemName") String protectedItemName,
+ @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/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("fabricName") String fabricName, @PathParam("containerName") String containerName,
+ @PathParam("protectedItemName") String protectedItemName,
+ @PathParam("recoveryPointId") String recoveryPointId, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/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("fabricName") String fabricName, @PathParam("containerName") String containerName,
+ @PathParam("protectedItemName") String protectedItemName, @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/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("fabricName") String fabricName, @PathParam("containerName") String containerName,
+ @PathParam("protectedItemName") String protectedItemName, @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Provides the information of the backed up data identified using RecoveryPointID.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @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 base class for backup copies along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String recoveryPointId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName,
+ protectedItemName, recoveryPointId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Provides the information of the backed up data identified using RecoveryPointID.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @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 base class for backup copies on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String recoveryPointId) {
+ return getWithResponseAsync(resourceGroupName, vaultName, fabricName, containerName, protectedItemName,
+ recoveryPointId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Provides the information of the backed up data identified using RecoveryPointID.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @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 base class for backup copies along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId, accept,
+ context);
+ }
+
+ /**
+ * Provides the information of the backed up data identified using RecoveryPointID.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @param recoveryPointId Recovery Point Id.
+ * @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 base class for backup copies.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public RecoveryPointResourceInner get(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String recoveryPointId) {
+ return getWithResponse(resourceGroupName, vaultName, fabricName, containerName, protectedItemName,
+ recoveryPointId, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 list of RecoveryPoint resources along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName,
+ String vaultName, String fabricName, String containerName, String protectedItemName, String filter) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName, containerName,
+ protectedItemName, filter, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 list of RecoveryPoint resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String filter) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, fabricName, containerName,
+ protectedItemName, filter));
+ }
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 RecoveryPoint resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName) {
+ final String filter = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, vaultName, fabricName, containerName,
+ protectedItemName, filter));
+ }
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 list of RecoveryPoint resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String filter) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, vaultName, fabricName,
+ containerName, protectedItemName, filter, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ null, null);
+ }
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 list of RecoveryPoint resources along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String filter, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, vaultName, fabricName, containerName, protectedItemName, filter, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ null, null);
+ }
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 RecoveryPoint resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName) {
+ final String filter = null;
+ return new PagedIterable<>(
+ () -> listSinglePage(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, filter));
+ }
+
+ /**
+ * Lists the backup copies for the backed up item.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param vaultName The name of the recovery services vault.
+ * @param fabricName Fabric name associated with the container.
+ * @param containerName Name of the container.
+ * @param protectedItemName Name of the Protected Item.
+ * @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 list of RecoveryPoint resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String filter, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, vaultName, fabricName, containerName,
+ protectedItemName, filter, context));
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsCrrsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsCrrsImpl.java
new file mode 100644
index 000000000000..644d0e25732e
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsCrrsImpl.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.RecoveryPointsCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.RecoveryPointResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.RecoveryPointResource;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.RecoveryPointsCrrs;
+
+public final class RecoveryPointsCrrsImpl implements RecoveryPointsCrrs {
+ private static final ClientLogger LOGGER = new ClientLogger(RecoveryPointsCrrsImpl.class);
+
+ private final RecoveryPointsCrrsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public RecoveryPointsCrrsImpl(RecoveryPointsCrrsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String recoveryPointId, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, vaultName, fabricName, containerName, protectedItemName,
+ recoveryPointId, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new RecoveryPointResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public RecoveryPointResource get(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String recoveryPointId) {
+ RecoveryPointResourceInner inner = this.serviceClient()
+ .get(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId);
+ if (inner != null) {
+ return new RecoveryPointResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, vaultName, fabricName, containerName, protectedItemName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryPointResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String filter, Context context) {
+ PagedIterable inner = this.serviceClient()
+ .list(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, filter, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new RecoveryPointResourceImpl(inner1, this.manager()));
+ }
+
+ private RecoveryPointsCrrsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsImpl.java
new file mode 100644
index 000000000000..8305cad881a6
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryPointsImpl.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.RecoveryPointsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.CrrAccessTokenResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.CrrAccessTokenResource;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.RecoveryPoints;
+
+public final class RecoveryPointsImpl implements RecoveryPoints {
+ private static final ClientLogger LOGGER = new ClientLogger(RecoveryPointsImpl.class);
+
+ private final RecoveryPointsClient innerClient;
+
+ private final com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager;
+
+ public RecoveryPointsImpl(RecoveryPointsClient innerClient,
+ com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getAccessTokenWithResponse(String resourceGroupName, String vaultName,
+ String fabricName, String containerName, String protectedItemName, String recoveryPointId,
+ AADPropertiesResourceInner parameters, Context context) {
+ Response inner = this.serviceClient()
+ .getAccessTokenWithResponse(resourceGroupName, vaultName, fabricName, containerName, protectedItemName,
+ recoveryPointId, parameters, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CrrAccessTokenResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public CrrAccessTokenResource getAccessToken(String resourceGroupName, String vaultName, String fabricName,
+ String containerName, String protectedItemName, String recoveryPointId, AADPropertiesResourceInner parameters) {
+ CrrAccessTokenResourceInner inner = this.serviceClient()
+ .getAccessToken(resourceGroupName, vaultName, fabricName, containerName, protectedItemName, recoveryPointId,
+ parameters);
+ if (inner != null) {
+ return new CrrAccessTokenResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private RecoveryPointsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.RecoveryServicesBackupCrrManager
+ manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryServicesBackupCrrManagementClientBuilder.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryServicesBackupCrrManagementClientBuilder.java
new file mode 100644
index 000000000000..6adcb419d714
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryServicesBackupCrrManagementClientBuilder.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/**
+ * A builder for creating a new instance of the RecoveryServicesBackupCrrManagementClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { RecoveryServicesBackupCrrManagementClientImpl.class })
+public final class RecoveryServicesBackupCrrManagementClientBuilder {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the RecoveryServicesBackupCrrManagementClientBuilder.
+ */
+ public RecoveryServicesBackupCrrManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the RecoveryServicesBackupCrrManagementClientBuilder.
+ */
+ public RecoveryServicesBackupCrrManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the RecoveryServicesBackupCrrManagementClientBuilder.
+ */
+ public RecoveryServicesBackupCrrManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the RecoveryServicesBackupCrrManagementClientBuilder.
+ */
+ public RecoveryServicesBackupCrrManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the RecoveryServicesBackupCrrManagementClientBuilder.
+ */
+ public RecoveryServicesBackupCrrManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the RecoveryServicesBackupCrrManagementClientBuilder.
+ */
+ public RecoveryServicesBackupCrrManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of RecoveryServicesBackupCrrManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of RecoveryServicesBackupCrrManagementClientImpl.
+ */
+ public RecoveryServicesBackupCrrManagementClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ RecoveryServicesBackupCrrManagementClientImpl client
+ = new RecoveryServicesBackupCrrManagementClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryServicesBackupCrrManagementClientImpl.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryServicesBackupCrrManagementClientImpl.java
new file mode 100644
index 000000000000..a9ba76c52550
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/RecoveryServicesBackupCrrManagementClientImpl.java
@@ -0,0 +1,468 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+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.recoveryservicesbackupcrossregionrestore.fluent.AadPropertiesOperationsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.BackupCrrJobDetailsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.BackupCrrJobsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.BackupProtectedItemsCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.BackupResourceStorageConfigsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.BackupUsageSummariesCRRsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.CrossRegionRestoresClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.CrrOperationResultsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.CrrOperationStatusClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.RecoveryPointsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.RecoveryPointsCrrsClient;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.RecoveryServicesBackupCrrManagementClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the RecoveryServicesBackupCrrManagementClientImpl type.
+ */
+@ServiceClient(builder = RecoveryServicesBackupCrrManagementClientBuilder.class)
+public final class RecoveryServicesBackupCrrManagementClientImpl implements RecoveryServicesBackupCrrManagementClient {
+ /**
+ * Service host.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Version parameter.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The BackupResourceStorageConfigsClient object to access its operations.
+ */
+ private final BackupResourceStorageConfigsClient backupResourceStorageConfigs;
+
+ /**
+ * Gets the BackupResourceStorageConfigsClient object to access its operations.
+ *
+ * @return the BackupResourceStorageConfigsClient object.
+ */
+ public BackupResourceStorageConfigsClient getBackupResourceStorageConfigs() {
+ return this.backupResourceStorageConfigs;
+ }
+
+ /**
+ * The RecoveryPointsCrrsClient object to access its operations.
+ */
+ private final RecoveryPointsCrrsClient recoveryPointsCrrs;
+
+ /**
+ * Gets the RecoveryPointsCrrsClient object to access its operations.
+ *
+ * @return the RecoveryPointsCrrsClient object.
+ */
+ public RecoveryPointsCrrsClient getRecoveryPointsCrrs() {
+ return this.recoveryPointsCrrs;
+ }
+
+ /**
+ * The RecoveryPointsClient object to access its operations.
+ */
+ private final RecoveryPointsClient recoveryPoints;
+
+ /**
+ * Gets the RecoveryPointsClient object to access its operations.
+ *
+ * @return the RecoveryPointsClient object.
+ */
+ public RecoveryPointsClient getRecoveryPoints() {
+ return this.recoveryPoints;
+ }
+
+ /**
+ * The BackupUsageSummariesCRRsClient object to access its operations.
+ */
+ private final BackupUsageSummariesCRRsClient backupUsageSummariesCRRs;
+
+ /**
+ * Gets the BackupUsageSummariesCRRsClient object to access its operations.
+ *
+ * @return the BackupUsageSummariesCRRsClient object.
+ */
+ public BackupUsageSummariesCRRsClient getBackupUsageSummariesCRRs() {
+ return this.backupUsageSummariesCRRs;
+ }
+
+ /**
+ * The AadPropertiesOperationsClient object to access its operations.
+ */
+ private final AadPropertiesOperationsClient aadPropertiesOperations;
+
+ /**
+ * Gets the AadPropertiesOperationsClient object to access its operations.
+ *
+ * @return the AadPropertiesOperationsClient object.
+ */
+ public AadPropertiesOperationsClient getAadPropertiesOperations() {
+ return this.aadPropertiesOperations;
+ }
+
+ /**
+ * The CrossRegionRestoresClient object to access its operations.
+ */
+ private final CrossRegionRestoresClient crossRegionRestores;
+
+ /**
+ * Gets the CrossRegionRestoresClient object to access its operations.
+ *
+ * @return the CrossRegionRestoresClient object.
+ */
+ public CrossRegionRestoresClient getCrossRegionRestores() {
+ return this.crossRegionRestores;
+ }
+
+ /**
+ * The BackupCrrJobDetailsClient object to access its operations.
+ */
+ private final BackupCrrJobDetailsClient backupCrrJobDetails;
+
+ /**
+ * Gets the BackupCrrJobDetailsClient object to access its operations.
+ *
+ * @return the BackupCrrJobDetailsClient object.
+ */
+ public BackupCrrJobDetailsClient getBackupCrrJobDetails() {
+ return this.backupCrrJobDetails;
+ }
+
+ /**
+ * The BackupCrrJobsClient object to access its operations.
+ */
+ private final BackupCrrJobsClient backupCrrJobs;
+
+ /**
+ * Gets the BackupCrrJobsClient object to access its operations.
+ *
+ * @return the BackupCrrJobsClient object.
+ */
+ public BackupCrrJobsClient getBackupCrrJobs() {
+ return this.backupCrrJobs;
+ }
+
+ /**
+ * The CrrOperationResultsClient object to access its operations.
+ */
+ private final CrrOperationResultsClient crrOperationResults;
+
+ /**
+ * Gets the CrrOperationResultsClient object to access its operations.
+ *
+ * @return the CrrOperationResultsClient object.
+ */
+ public CrrOperationResultsClient getCrrOperationResults() {
+ return this.crrOperationResults;
+ }
+
+ /**
+ * The CrrOperationStatusClient object to access its operations.
+ */
+ private final CrrOperationStatusClient crrOperationStatus;
+
+ /**
+ * Gets the CrrOperationStatusClient object to access its operations.
+ *
+ * @return the CrrOperationStatusClient object.
+ */
+ public CrrOperationStatusClient getCrrOperationStatus() {
+ return this.crrOperationStatus;
+ }
+
+ /**
+ * The BackupProtectedItemsCrrsClient object to access its operations.
+ */
+ private final BackupProtectedItemsCrrsClient backupProtectedItemsCrrs;
+
+ /**
+ * Gets the BackupProtectedItemsCrrsClient object to access its operations.
+ *
+ * @return the BackupProtectedItemsCrrsClient object.
+ */
+ public BackupProtectedItemsCrrsClient getBackupProtectedItemsCrrs() {
+ return this.backupProtectedItemsCrrs;
+ }
+
+ /**
+ * Initializes an instance of RecoveryServicesBackupCrrManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ */
+ RecoveryServicesBackupCrrManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2026-07-15";
+ this.backupResourceStorageConfigs = new BackupResourceStorageConfigsClientImpl(this);
+ this.recoveryPointsCrrs = new RecoveryPointsCrrsClientImpl(this);
+ this.recoveryPoints = new RecoveryPointsClientImpl(this);
+ this.backupUsageSummariesCRRs = new BackupUsageSummariesCRRsClientImpl(this);
+ this.aadPropertiesOperations = new AadPropertiesOperationsClientImpl(this);
+ this.crossRegionRestores = new CrossRegionRestoresClientImpl(this);
+ this.backupCrrJobDetails = new BackupCrrJobDetailsClientImpl(this);
+ this.backupCrrJobs = new BackupCrrJobsClientImpl(this);
+ this.crrOperationResults = new CrrOperationResultsClientImpl(this);
+ this.crrOperationStatus = new CrrOperationStatusClientImpl(this);
+ this.backupProtectedItemsCrrs = new BackupProtectedItemsCrrsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(RecoveryServicesBackupCrrManagementClientImpl.class);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/ResourceManagerUtils.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..3d09d9ab676d
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
+
+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.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
+ }
+
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl<>(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux
+ .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/models/RecoveryPointResourceList.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/models/RecoveryPointResourceList.java
new file mode 100644
index 000000000000..4f9c735104db
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/models/RecoveryPointResourceList.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.recoveryservicesbackupcrossregionrestore.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.recoveryservicesbackupcrossregionrestore.fluent.models.RecoveryPointResourceInner;
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models.ResourceList;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * List of RecoveryPoint resources.
+ */
+@Immutable
+public final class RecoveryPointResourceList extends ResourceList {
+ /*
+ * 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 RecoveryPointResourceList class.
+ */
+ private RecoveryPointResourceList() {
+ }
+
+ /**
+ * 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 RecoveryPointResourceList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RecoveryPointResourceList 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 RecoveryPointResourceList.
+ */
+ public static RecoveryPointResourceList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RecoveryPointResourceList deserializedRecoveryPointResourceList = new RecoveryPointResourceList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nextLink".equals(fieldName)) {
+ deserializedRecoveryPointResourceList.nextLink = reader.getString();
+ } else if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> RecoveryPointResourceInner.fromJson(reader1));
+ deserializedRecoveryPointResourceList.value = value;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRecoveryPointResourceList;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/package-info.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/package-info.java
new file mode 100644
index 000000000000..6d27049cac5c
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the implementations for RecoveryServicesBackupCrr.
+ * Open API 2.0 Specs for Azure Recovery Services Backup CRR (Cross Region Restore) service.
+ */
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.implementation;
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AADProperties.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AADProperties.java
new file mode 100644
index 000000000000..e2f9a583ceeb
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AADProperties.java
@@ -0,0 +1,197 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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;
+
+/**
+ * The AADProperties model.
+ */
+@Fluent
+public final class AADProperties implements JsonSerializable {
+ /*
+ * The servicePrincipalClientId property.
+ */
+ private String servicePrincipalClientId;
+
+ /*
+ * The tenantId property.
+ */
+ private String tenantId;
+
+ /*
+ * The authority property.
+ */
+ private String authority;
+
+ /*
+ * The audience property.
+ */
+ private String audience;
+
+ /*
+ * The servicePrincipalObjectId property.
+ */
+ private String servicePrincipalObjectId;
+
+ /**
+ * Creates an instance of AADProperties class.
+ */
+ public AADProperties() {
+ }
+
+ /**
+ * Get the servicePrincipalClientId property: The servicePrincipalClientId property.
+ *
+ * @return the servicePrincipalClientId value.
+ */
+ public String servicePrincipalClientId() {
+ return this.servicePrincipalClientId;
+ }
+
+ /**
+ * Set the servicePrincipalClientId property: The servicePrincipalClientId property.
+ *
+ * @param servicePrincipalClientId the servicePrincipalClientId value to set.
+ * @return the AADProperties object itself.
+ */
+ public AADProperties withServicePrincipalClientId(String servicePrincipalClientId) {
+ this.servicePrincipalClientId = servicePrincipalClientId;
+ return this;
+ }
+
+ /**
+ * Get the tenantId property: The tenantId property.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set the tenantId property: The tenantId property.
+ *
+ * @param tenantId the tenantId value to set.
+ * @return the AADProperties object itself.
+ */
+ public AADProperties withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Get the authority property: The authority property.
+ *
+ * @return the authority value.
+ */
+ public String authority() {
+ return this.authority;
+ }
+
+ /**
+ * Set the authority property: The authority property.
+ *
+ * @param authority the authority value to set.
+ * @return the AADProperties object itself.
+ */
+ public AADProperties withAuthority(String authority) {
+ this.authority = authority;
+ return this;
+ }
+
+ /**
+ * Get the audience property: The audience property.
+ *
+ * @return the audience value.
+ */
+ public String audience() {
+ return this.audience;
+ }
+
+ /**
+ * Set the audience property: The audience property.
+ *
+ * @param audience the audience value to set.
+ * @return the AADProperties object itself.
+ */
+ public AADProperties withAudience(String audience) {
+ this.audience = audience;
+ return this;
+ }
+
+ /**
+ * Get the servicePrincipalObjectId property: The servicePrincipalObjectId property.
+ *
+ * @return the servicePrincipalObjectId value.
+ */
+ public String servicePrincipalObjectId() {
+ return this.servicePrincipalObjectId;
+ }
+
+ /**
+ * Set the servicePrincipalObjectId property: The servicePrincipalObjectId property.
+ *
+ * @param servicePrincipalObjectId the servicePrincipalObjectId value to set.
+ * @return the AADProperties object itself.
+ */
+ public AADProperties withServicePrincipalObjectId(String servicePrincipalObjectId) {
+ this.servicePrincipalObjectId = servicePrincipalObjectId;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("servicePrincipalClientId", this.servicePrincipalClientId);
+ jsonWriter.writeStringField("tenantId", this.tenantId);
+ jsonWriter.writeStringField("authority", this.authority);
+ jsonWriter.writeStringField("audience", this.audience);
+ jsonWriter.writeStringField("servicePrincipalObjectId", this.servicePrincipalObjectId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AADProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AADProperties 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 AADProperties.
+ */
+ public static AADProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AADProperties deserializedAADProperties = new AADProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("servicePrincipalClientId".equals(fieldName)) {
+ deserializedAADProperties.servicePrincipalClientId = reader.getString();
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedAADProperties.tenantId = reader.getString();
+ } else if ("authority".equals(fieldName)) {
+ deserializedAADProperties.authority = reader.getString();
+ } else if ("audience".equals(fieldName)) {
+ deserializedAADProperties.audience = reader.getString();
+ } else if ("servicePrincipalObjectId".equals(fieldName)) {
+ deserializedAADProperties.servicePrincipalObjectId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAADProperties;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AADPropertiesResource.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AADPropertiesResource.java
new file mode 100644
index 000000000000..7aa2e36f3ffd
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AADPropertiesResource.java
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner;
+import java.util.Map;
+
+/**
+ * An immutable client-side representation of AADPropertiesResource.
+ */
+public interface AADPropertiesResource {
+ /**
+ * 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 location property: The geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * Gets the properties property: AADPropertiesResource properties.
+ *
+ * @return the properties value.
+ */
+ AADProperties properties();
+
+ /**
+ * Gets the eTag property: Optional ETag.
+ *
+ * @return the eTag value.
+ */
+ String eTag();
+
+ /**
+ * Gets the inner
+ * com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.fluent.models.AADPropertiesResourceInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ AADPropertiesResourceInner innerModel();
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AadPropertiesOperations.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AadPropertiesOperations.java
new file mode 100644
index 000000000000..42d925c0abef
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AadPropertiesOperations.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of AadPropertiesOperations.
+ */
+public interface AadPropertiesOperations {
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 the response body along with {@link Response}.
+ */
+ Response getWithResponse(String azureRegion, String filter, Context context);
+
+ /**
+ * Fetches the AAD properties from target region BCM stamp.
+ *
+ * Gets the Azure Active Directory properties from the target-region Backup Management stamp, used to authorize a
+ * cross-region restore operation.
+ *
+ * @param azureRegion Azure region to hit Api.
+ * @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 response.
+ */
+ AADPropertiesResource get(String azureRegion);
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/ArmResource.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/ArmResource.java
new file mode 100644
index 000000000000..f25c5c5e93fd
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/ArmResource.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.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Resource
+ *
+ * Common fields that are returned in the response for all Azure Resource Manager resources.
+ */
+@Immutable
+public class ArmResource implements JsonSerializable {
+ /*
+ * Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{
+ * resourceType}/{resourceName}
+ */
+ private String id;
+
+ /*
+ * The name of the resource
+ */
+ private String name;
+
+ /*
+ * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
+ */
+ private String type;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of ArmResource class.
+ */
+ public ArmResource() {
+ }
+
+ /**
+ * Get the id property: Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: Fully qualified resource ID for the resource. Ex -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ *
+ * @param id the id value to set.
+ * @return the ArmResource object itself.
+ */
+ ArmResource withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the resource.
+ *
+ * @param name the name value to set.
+ * @return the ArmResource object itself.
+ */
+ ArmResource withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ * "Microsoft.Storage/storageAccounts".
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ * "Microsoft.Storage/storageAccounts".
+ *
+ * @param type the type value to set.
+ * @return the ArmResource object itself.
+ */
+ ArmResource withType(String type) {
+ this.type = type;
+ 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;
+ }
+
+ /**
+ * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @param systemData the systemData value to set.
+ * @return the ArmResource object itself.
+ */
+ ArmResource withSystemData(SystemData systemData) {
+ this.systemData = systemData;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ArmResource from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ArmResource 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 ArmResource.
+ */
+ public static ArmResource fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ArmResource deserializedArmResource = new ArmResource();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedArmResource.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedArmResource.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedArmResource.type = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedArmResource.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedArmResource;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileShareRecoveryPoint.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileShareRecoveryPoint.java
new file mode 100644
index 000000000000..24976b6c1ffa
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileShareRecoveryPoint.java
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * Azure File Share workload specific backup copy.
+ */
+@Immutable
+public final class AzureFileShareRecoveryPoint extends RecoveryPoint {
+ /*
+ * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of
+ * types.
+ */
+ private String objectType = "AzureFileShareRecoveryPoint";
+
+ /*
+ * Type of the backup copy. Specifies whether it is a crash consistent backup or app consistent.
+ */
+ private String recoveryPointType;
+
+ /*
+ * Time at which this backup copy was created.
+ */
+ private OffsetDateTime recoveryPointTime;
+
+ /*
+ * Contains Url to the snapshot of fileshare, if applicable
+ */
+ private String fileShareSnapshotUri;
+
+ /*
+ * Contains recovery point size
+ */
+ private Integer recoveryPointSizeInGB;
+
+ /*
+ * Properties of Recovery Point
+ */
+ private RecoveryPointProperties recoveryPointProperties;
+
+ /**
+ * Creates an instance of AzureFileShareRecoveryPoint class.
+ */
+ private AzureFileShareRecoveryPoint() {
+ }
+
+ /**
+ * Get the objectType property: This property will be used as the discriminator for deciding the specific types in
+ * the polymorphic chain of types.
+ *
+ * @return the objectType value.
+ */
+ @Override
+ public String objectType() {
+ return this.objectType;
+ }
+
+ /**
+ * Get the recoveryPointType property: Type of the backup copy. Specifies whether it is a crash consistent backup or
+ * app consistent.
+ *
+ * @return the recoveryPointType value.
+ */
+ public String recoveryPointType() {
+ return this.recoveryPointType;
+ }
+
+ /**
+ * Get the recoveryPointTime property: Time at which this backup copy was created.
+ *
+ * @return the recoveryPointTime value.
+ */
+ public OffsetDateTime recoveryPointTime() {
+ return this.recoveryPointTime;
+ }
+
+ /**
+ * Get the fileShareSnapshotUri property: Contains Url to the snapshot of fileshare, if applicable.
+ *
+ * @return the fileShareSnapshotUri value.
+ */
+ public String fileShareSnapshotUri() {
+ return this.fileShareSnapshotUri;
+ }
+
+ /**
+ * Get the recoveryPointSizeInGB property: Contains recovery point size.
+ *
+ * @return the recoveryPointSizeInGB value.
+ */
+ public Integer recoveryPointSizeInGB() {
+ return this.recoveryPointSizeInGB;
+ }
+
+ /**
+ * Get the recoveryPointProperties property: Properties of Recovery Point.
+ *
+ * @return the recoveryPointProperties value.
+ */
+ public RecoveryPointProperties recoveryPointProperties() {
+ return this.recoveryPointProperties;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("objectType", this.objectType);
+ jsonWriter.writeJsonField("recoveryPointProperties", this.recoveryPointProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureFileShareRecoveryPoint from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureFileShareRecoveryPoint 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 AzureFileShareRecoveryPoint.
+ */
+ public static AzureFileShareRecoveryPoint fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureFileShareRecoveryPoint deserializedAzureFileShareRecoveryPoint = new AzureFileShareRecoveryPoint();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("objectType".equals(fieldName)) {
+ deserializedAzureFileShareRecoveryPoint.objectType = reader.getString();
+ } else if ("recoveryPointType".equals(fieldName)) {
+ deserializedAzureFileShareRecoveryPoint.recoveryPointType = reader.getString();
+ } else if ("recoveryPointTime".equals(fieldName)) {
+ deserializedAzureFileShareRecoveryPoint.recoveryPointTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("fileShareSnapshotUri".equals(fieldName)) {
+ deserializedAzureFileShareRecoveryPoint.fileShareSnapshotUri = reader.getString();
+ } else if ("recoveryPointSizeInGB".equals(fieldName)) {
+ deserializedAzureFileShareRecoveryPoint.recoveryPointSizeInGB
+ = reader.getNullable(JsonReader::getInt);
+ } else if ("recoveryPointProperties".equals(fieldName)) {
+ deserializedAzureFileShareRecoveryPoint.recoveryPointProperties
+ = RecoveryPointProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureFileShareRecoveryPoint;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileShareRestoreRequest.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileShareRestoreRequest.java
new file mode 100644
index 000000000000..b40d8c1dcefd
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileShareRestoreRequest.java
@@ -0,0 +1,252 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * AzureFileShare Restore Request.
+ */
+@Fluent
+public final class AzureFileShareRestoreRequest extends RestoreRequest {
+ /*
+ * This property will be used as the discriminator for deciding the specific types in the polymorphic chain of
+ * types.
+ */
+ private String objectType = "AzureFileShareRestoreRequest";
+
+ /*
+ * Type of this recovery.
+ */
+ private RecoveryType recoveryType;
+
+ /*
+ * Source storage account ARM Id
+ */
+ private String sourceResourceId;
+
+ /*
+ * Options to resolve copy conflicts.
+ */
+ private CopyOptions copyOptions;
+
+ /*
+ * Restore Type (FullShareRestore or ItemLevelRestore)
+ */
+ private RestoreRequestType restoreRequestType;
+
+ /*
+ * List of Source Files/Folders(which need to recover) and TargetFolderPath details
+ */
+ private List restoreFileSpecs;
+
+ /*
+ * Target File Share Details
+ */
+ private TargetAFSRestoreInfo targetDetails;
+
+ /**
+ * Creates an instance of AzureFileShareRestoreRequest class.
+ */
+ public AzureFileShareRestoreRequest() {
+ }
+
+ /**
+ * Get the objectType property: This property will be used as the discriminator for deciding the specific types in
+ * the polymorphic chain of types.
+ *
+ * @return the objectType value.
+ */
+ @Override
+ public String objectType() {
+ return this.objectType;
+ }
+
+ /**
+ * Get the recoveryType property: Type of this recovery.
+ *
+ * @return the recoveryType value.
+ */
+ public RecoveryType recoveryType() {
+ return this.recoveryType;
+ }
+
+ /**
+ * Set the recoveryType property: Type of this recovery.
+ *
+ * @param recoveryType the recoveryType value to set.
+ * @return the AzureFileShareRestoreRequest object itself.
+ */
+ public AzureFileShareRestoreRequest withRecoveryType(RecoveryType recoveryType) {
+ this.recoveryType = recoveryType;
+ return this;
+ }
+
+ /**
+ * Get the sourceResourceId property: Source storage account ARM Id.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.sourceResourceId;
+ }
+
+ /**
+ * Set the sourceResourceId property: Source storage account ARM Id.
+ *
+ * @param sourceResourceId the sourceResourceId value to set.
+ * @return the AzureFileShareRestoreRequest object itself.
+ */
+ public AzureFileShareRestoreRequest withSourceResourceId(String sourceResourceId) {
+ this.sourceResourceId = sourceResourceId;
+ return this;
+ }
+
+ /**
+ * Get the copyOptions property: Options to resolve copy conflicts.
+ *
+ * @return the copyOptions value.
+ */
+ public CopyOptions copyOptions() {
+ return this.copyOptions;
+ }
+
+ /**
+ * Set the copyOptions property: Options to resolve copy conflicts.
+ *
+ * @param copyOptions the copyOptions value to set.
+ * @return the AzureFileShareRestoreRequest object itself.
+ */
+ public AzureFileShareRestoreRequest withCopyOptions(CopyOptions copyOptions) {
+ this.copyOptions = copyOptions;
+ return this;
+ }
+
+ /**
+ * Get the restoreRequestType property: Restore Type (FullShareRestore or ItemLevelRestore).
+ *
+ * @return the restoreRequestType value.
+ */
+ public RestoreRequestType restoreRequestType() {
+ return this.restoreRequestType;
+ }
+
+ /**
+ * Set the restoreRequestType property: Restore Type (FullShareRestore or ItemLevelRestore).
+ *
+ * @param restoreRequestType the restoreRequestType value to set.
+ * @return the AzureFileShareRestoreRequest object itself.
+ */
+ public AzureFileShareRestoreRequest withRestoreRequestType(RestoreRequestType restoreRequestType) {
+ this.restoreRequestType = restoreRequestType;
+ return this;
+ }
+
+ /**
+ * Get the restoreFileSpecs property: List of Source Files/Folders(which need to recover) and TargetFolderPath
+ * details.
+ *
+ * @return the restoreFileSpecs value.
+ */
+ public List restoreFileSpecs() {
+ return this.restoreFileSpecs;
+ }
+
+ /**
+ * Set the restoreFileSpecs property: List of Source Files/Folders(which need to recover) and TargetFolderPath
+ * details.
+ *
+ * @param restoreFileSpecs the restoreFileSpecs value to set.
+ * @return the AzureFileShareRestoreRequest object itself.
+ */
+ public AzureFileShareRestoreRequest withRestoreFileSpecs(List restoreFileSpecs) {
+ this.restoreFileSpecs = restoreFileSpecs;
+ return this;
+ }
+
+ /**
+ * Get the targetDetails property: Target File Share Details.
+ *
+ * @return the targetDetails value.
+ */
+ public TargetAFSRestoreInfo targetDetails() {
+ return this.targetDetails;
+ }
+
+ /**
+ * Set the targetDetails property: Target File Share Details.
+ *
+ * @param targetDetails the targetDetails value to set.
+ * @return the AzureFileShareRestoreRequest object itself.
+ */
+ public AzureFileShareRestoreRequest withTargetDetails(TargetAFSRestoreInfo targetDetails) {
+ this.targetDetails = targetDetails;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("objectType", this.objectType);
+ jsonWriter.writeStringField("recoveryType", this.recoveryType == null ? null : this.recoveryType.toString());
+ jsonWriter.writeStringField("sourceResourceId", this.sourceResourceId);
+ jsonWriter.writeStringField("copyOptions", this.copyOptions == null ? null : this.copyOptions.toString());
+ jsonWriter.writeStringField("restoreRequestType",
+ this.restoreRequestType == null ? null : this.restoreRequestType.toString());
+ jsonWriter.writeArrayField("restoreFileSpecs", this.restoreFileSpecs,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("targetDetails", this.targetDetails);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureFileShareRestoreRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureFileShareRestoreRequest 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 AzureFileShareRestoreRequest.
+ */
+ public static AzureFileShareRestoreRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureFileShareRestoreRequest deserializedAzureFileShareRestoreRequest = new AzureFileShareRestoreRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("objectType".equals(fieldName)) {
+ deserializedAzureFileShareRestoreRequest.objectType = reader.getString();
+ } else if ("recoveryType".equals(fieldName)) {
+ deserializedAzureFileShareRestoreRequest.recoveryType = RecoveryType.fromString(reader.getString());
+ } else if ("sourceResourceId".equals(fieldName)) {
+ deserializedAzureFileShareRestoreRequest.sourceResourceId = reader.getString();
+ } else if ("copyOptions".equals(fieldName)) {
+ deserializedAzureFileShareRestoreRequest.copyOptions = CopyOptions.fromString(reader.getString());
+ } else if ("restoreRequestType".equals(fieldName)) {
+ deserializedAzureFileShareRestoreRequest.restoreRequestType
+ = RestoreRequestType.fromString(reader.getString());
+ } else if ("restoreFileSpecs".equals(fieldName)) {
+ List restoreFileSpecs
+ = reader.readArray(reader1 -> RestoreFileSpecs.fromJson(reader1));
+ deserializedAzureFileShareRestoreRequest.restoreFileSpecs = restoreFileSpecs;
+ } else if ("targetDetails".equals(fieldName)) {
+ deserializedAzureFileShareRestoreRequest.targetDetails = TargetAFSRestoreInfo.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureFileShareRestoreRequest;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileshareProtectedItem.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileshareProtectedItem.java
new file mode 100644
index 000000000000..7e0e3f2fc7ab
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileshareProtectedItem.java
@@ -0,0 +1,278 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Azure File Share workload-specific backup item.
+ */
+@Immutable
+public final class AzureFileshareProtectedItem extends ProtectedItem {
+ /*
+ * backup item type.
+ */
+ private String protectedItemType = "AzureFileShareProtectedItem";
+
+ /*
+ * Friendly name of the fileshare represented by this backup item.
+ */
+ private String friendlyName;
+
+ /*
+ * Backup status of this backup item.
+ */
+ private String protectionStatus;
+
+ /*
+ * Backup state of this backup item.
+ */
+ private ProtectionState protectionState;
+
+ /*
+ * backups running status for this backup item.
+ */
+ private HealthStatus healthStatus;
+
+ /*
+ * Last backup operation status. Possible values: Healthy, Unhealthy.
+ */
+ private String lastBackupStatus;
+
+ /*
+ * Timestamp of the last backup operation on this backup item.
+ */
+ private OffsetDateTime lastBackupTime;
+
+ /*
+ * Health details of different KPIs
+ */
+ private Map kpisHealths;
+
+ /*
+ * Additional information with this backup item.
+ */
+ private AzureFileshareProtectedItemExtendedInfo extendedInfo;
+
+ /**
+ * Creates an instance of AzureFileshareProtectedItem class.
+ */
+ private AzureFileshareProtectedItem() {
+ }
+
+ /**
+ * Get the protectedItemType property: backup item type.
+ *
+ * @return the protectedItemType value.
+ */
+ @Override
+ public String protectedItemType() {
+ return this.protectedItemType;
+ }
+
+ /**
+ * Get the friendlyName property: Friendly name of the fileshare represented by this backup item.
+ *
+ * @return the friendlyName value.
+ */
+ public String friendlyName() {
+ return this.friendlyName;
+ }
+
+ /**
+ * Get the protectionStatus property: Backup status of this backup item.
+ *
+ * @return the protectionStatus value.
+ */
+ public String protectionStatus() {
+ return this.protectionStatus;
+ }
+
+ /**
+ * Get the protectionState property: Backup state of this backup item.
+ *
+ * @return the protectionState value.
+ */
+ public ProtectionState protectionState() {
+ return this.protectionState;
+ }
+
+ /**
+ * Get the healthStatus property: backups running status for this backup item.
+ *
+ * @return the healthStatus value.
+ */
+ public HealthStatus healthStatus() {
+ return this.healthStatus;
+ }
+
+ /**
+ * Get the lastBackupStatus property: Last backup operation status. Possible values: Healthy, Unhealthy.
+ *
+ * @return the lastBackupStatus value.
+ */
+ public String lastBackupStatus() {
+ return this.lastBackupStatus;
+ }
+
+ /**
+ * Get the lastBackupTime property: Timestamp of the last backup operation on this backup item.
+ *
+ * @return the lastBackupTime value.
+ */
+ public OffsetDateTime lastBackupTime() {
+ return this.lastBackupTime;
+ }
+
+ /**
+ * Get the kpisHealths property: Health details of different KPIs.
+ *
+ * @return the kpisHealths value.
+ */
+ public Map kpisHealths() {
+ return this.kpisHealths;
+ }
+
+ /**
+ * Get the extendedInfo property: Additional information with this backup item.
+ *
+ * @return the extendedInfo value.
+ */
+ public AzureFileshareProtectedItemExtendedInfo extendedInfo() {
+ return this.extendedInfo;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("backupManagementType",
+ backupManagementType() == null ? null : backupManagementType().toString());
+ jsonWriter.writeStringField("workloadType", workloadType() == null ? null : workloadType().toString());
+ jsonWriter.writeStringField("containerName", containerName());
+ jsonWriter.writeStringField("sourceResourceId", sourceResourceId());
+ jsonWriter.writeStringField("policyId", policyId());
+ jsonWriter.writeStringField("lastRecoveryPoint",
+ lastRecoveryPoint() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastRecoveryPoint()));
+ jsonWriter.writeStringField("backupSetName", backupSetName());
+ jsonWriter.writeStringField("createMode", createMode() == null ? null : createMode().toString());
+ jsonWriter.writeStringField("deferredDeleteTimeInUTC",
+ deferredDeleteTimeInUTC() == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(deferredDeleteTimeInUTC()));
+ jsonWriter.writeBooleanField("isScheduledForDeferredDelete", isScheduledForDeferredDelete());
+ jsonWriter.writeStringField("deferredDeleteTimeRemaining", deferredDeleteTimeRemaining());
+ jsonWriter.writeBooleanField("isDeferredDeleteScheduleUpcoming", isDeferredDeleteScheduleUpcoming());
+ jsonWriter.writeBooleanField("isRehydrate", isRehydrate());
+ jsonWriter.writeArrayField("resourceGuardOperationRequests", resourceGuardOperationRequests(),
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("protectedItemType", this.protectedItemType);
+ jsonWriter.writeStringField("friendlyName", this.friendlyName);
+ jsonWriter.writeStringField("protectionStatus", this.protectionStatus);
+ jsonWriter.writeStringField("protectionState",
+ this.protectionState == null ? null : this.protectionState.toString());
+ jsonWriter.writeStringField("healthStatus", this.healthStatus == null ? null : this.healthStatus.toString());
+ jsonWriter.writeStringField("lastBackupStatus", this.lastBackupStatus);
+ jsonWriter.writeStringField("lastBackupTime",
+ this.lastBackupTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastBackupTime));
+ jsonWriter.writeMapField("kpisHealths", this.kpisHealths, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("extendedInfo", this.extendedInfo);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureFileshareProtectedItem from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureFileshareProtectedItem 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 AzureFileshareProtectedItem.
+ */
+ public static AzureFileshareProtectedItem fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureFileshareProtectedItem deserializedAzureFileshareProtectedItem = new AzureFileshareProtectedItem();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupManagementType".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem
+ .withBackupManagementType(BackupManagementType.fromString(reader.getString()));
+ } else if ("workloadType".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem
+ .withWorkloadType(DataSourceType.fromString(reader.getString()));
+ } else if ("containerName".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withContainerName(reader.getString());
+ } else if ("sourceResourceId".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withSourceResourceId(reader.getString());
+ } else if ("policyId".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withPolicyId(reader.getString());
+ } else if ("lastRecoveryPoint".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withLastRecoveryPoint(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("backupSetName".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withBackupSetName(reader.getString());
+ } else if ("createMode".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withCreateMode(CreateMode.fromString(reader.getString()));
+ } else if ("deferredDeleteTimeInUTC".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withDeferredDeleteTimeInUTC(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("isScheduledForDeferredDelete".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem
+ .withIsScheduledForDeferredDelete(reader.getNullable(JsonReader::getBoolean));
+ } else if ("deferredDeleteTimeRemaining".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withDeferredDeleteTimeRemaining(reader.getString());
+ } else if ("isDeferredDeleteScheduleUpcoming".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem
+ .withIsDeferredDeleteScheduleUpcoming(reader.getNullable(JsonReader::getBoolean));
+ } else if ("isRehydrate".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.withIsRehydrate(reader.getNullable(JsonReader::getBoolean));
+ } else if ("resourceGuardOperationRequests".equals(fieldName)) {
+ List resourceGuardOperationRequests = reader.readArray(reader1 -> reader1.getString());
+ deserializedAzureFileshareProtectedItem
+ .withResourceGuardOperationRequests(resourceGuardOperationRequests);
+ } else if ("protectedItemType".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.protectedItemType = reader.getString();
+ } else if ("friendlyName".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.friendlyName = reader.getString();
+ } else if ("protectionStatus".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.protectionStatus = reader.getString();
+ } else if ("protectionState".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.protectionState
+ = ProtectionState.fromString(reader.getString());
+ } else if ("healthStatus".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.healthStatus = HealthStatus.fromString(reader.getString());
+ } else if ("lastBackupStatus".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.lastBackupStatus = reader.getString();
+ } else if ("lastBackupTime".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.lastBackupTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("kpisHealths".equals(fieldName)) {
+ Map kpisHealths
+ = reader.readMap(reader1 -> KPIResourceHealthDetails.fromJson(reader1));
+ deserializedAzureFileshareProtectedItem.kpisHealths = kpisHealths;
+ } else if ("extendedInfo".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItem.extendedInfo
+ = AzureFileshareProtectedItemExtendedInfo.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureFileshareProtectedItem;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileshareProtectedItemExtendedInfo.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileshareProtectedItemExtendedInfo.java
new file mode 100644
index 000000000000..8870f76c29b1
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureFileshareProtectedItemExtendedInfo.java
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+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.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * Additional information about Azure File Share backup item.
+ */
+@Immutable
+public final class AzureFileshareProtectedItemExtendedInfo
+ implements JsonSerializable {
+ /*
+ * The oldest backup copy available for this item in the service.
+ */
+ private OffsetDateTime oldestRecoveryPoint;
+
+ /*
+ * Number of available backup copies associated with this backup item.
+ */
+ private Integer recoveryPointCount;
+
+ /*
+ * Indicates consistency of policy object and policy applied to this backup item.
+ */
+ private String policyState;
+
+ /*
+ * Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted,
+ * Deleted}
+ */
+ private String resourceState;
+
+ /*
+ * The resource state sync time for this backup item.
+ */
+ private OffsetDateTime resourceStateSyncTime;
+
+ /**
+ * Creates an instance of AzureFileshareProtectedItemExtendedInfo class.
+ */
+ private AzureFileshareProtectedItemExtendedInfo() {
+ }
+
+ /**
+ * Get the oldestRecoveryPoint property: The oldest backup copy available for this item in the service.
+ *
+ * @return the oldestRecoveryPoint value.
+ */
+ public OffsetDateTime oldestRecoveryPoint() {
+ return this.oldestRecoveryPoint;
+ }
+
+ /**
+ * Get the recoveryPointCount property: Number of available backup copies associated with this backup item.
+ *
+ * @return the recoveryPointCount value.
+ */
+ public Integer recoveryPointCount() {
+ return this.recoveryPointCount;
+ }
+
+ /**
+ * Get the policyState property: Indicates consistency of policy object and policy applied to this backup item.
+ *
+ * @return the policyState value.
+ */
+ public String policyState() {
+ return this.policyState;
+ }
+
+ /**
+ * Get the resourceState property: Indicates the state of this resource. Possible values are from enum ResourceState
+ * {Invalid, Active, SoftDeleted, Deleted}.
+ *
+ * @return the resourceState value.
+ */
+ public String resourceState() {
+ return this.resourceState;
+ }
+
+ /**
+ * Get the resourceStateSyncTime property: The resource state sync time for this backup item.
+ *
+ * @return the resourceStateSyncTime value.
+ */
+ public OffsetDateTime resourceStateSyncTime() {
+ return this.resourceStateSyncTime;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("oldestRecoveryPoint",
+ this.oldestRecoveryPoint == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.oldestRecoveryPoint));
+ jsonWriter.writeNumberField("recoveryPointCount", this.recoveryPointCount);
+ jsonWriter.writeStringField("policyState", this.policyState);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureFileshareProtectedItemExtendedInfo from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureFileshareProtectedItemExtendedInfo 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 AzureFileshareProtectedItemExtendedInfo.
+ */
+ public static AzureFileshareProtectedItemExtendedInfo fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureFileshareProtectedItemExtendedInfo deserializedAzureFileshareProtectedItemExtendedInfo
+ = new AzureFileshareProtectedItemExtendedInfo();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("oldestRecoveryPoint".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItemExtendedInfo.oldestRecoveryPoint = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("recoveryPointCount".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItemExtendedInfo.recoveryPointCount
+ = reader.getNullable(JsonReader::getInt);
+ } else if ("policyState".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItemExtendedInfo.policyState = reader.getString();
+ } else if ("resourceState".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItemExtendedInfo.resourceState = reader.getString();
+ } else if ("resourceStateSyncTime".equals(fieldName)) {
+ deserializedAzureFileshareProtectedItemExtendedInfo.resourceStateSyncTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureFileshareProtectedItemExtendedInfo;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSClassicComputeVMProtectedItem.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSClassicComputeVMProtectedItem.java
new file mode 100644
index 000000000000..ad7eea676115
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSClassicComputeVMProtectedItem.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * IaaS VM workload-specific backup item representing the Classic Compute VM.
+ */
+@Immutable
+public final class AzureIaaSClassicComputeVMProtectedItem extends AzureIaaSVMProtectedItem {
+ /*
+ * backup item type.
+ */
+ private String protectedItemType = "Microsoft.ClassicCompute/virtualMachines";
+
+ /**
+ * Creates an instance of AzureIaaSClassicComputeVMProtectedItem class.
+ */
+ private AzureIaaSClassicComputeVMProtectedItem() {
+ }
+
+ /**
+ * Get the protectedItemType property: backup item type.
+ *
+ * @return the protectedItemType value.
+ */
+ @Override
+ public String protectedItemType() {
+ return this.protectedItemType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("backupManagementType",
+ backupManagementType() == null ? null : backupManagementType().toString());
+ jsonWriter.writeStringField("workloadType", workloadType() == null ? null : workloadType().toString());
+ jsonWriter.writeStringField("containerName", containerName());
+ jsonWriter.writeStringField("sourceResourceId", sourceResourceId());
+ jsonWriter.writeStringField("policyId", policyId());
+ jsonWriter.writeStringField("lastRecoveryPoint",
+ lastRecoveryPoint() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastRecoveryPoint()));
+ jsonWriter.writeStringField("backupSetName", backupSetName());
+ jsonWriter.writeStringField("createMode", createMode() == null ? null : createMode().toString());
+ jsonWriter.writeStringField("deferredDeleteTimeInUTC",
+ deferredDeleteTimeInUTC() == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(deferredDeleteTimeInUTC()));
+ jsonWriter.writeBooleanField("isScheduledForDeferredDelete", isScheduledForDeferredDelete());
+ jsonWriter.writeStringField("deferredDeleteTimeRemaining", deferredDeleteTimeRemaining());
+ jsonWriter.writeBooleanField("isDeferredDeleteScheduleUpcoming", isDeferredDeleteScheduleUpcoming());
+ jsonWriter.writeBooleanField("isRehydrate", isRehydrate());
+ jsonWriter.writeArrayField("resourceGuardOperationRequests", resourceGuardOperationRequests(),
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("friendlyName", friendlyName());
+ jsonWriter.writeStringField("virtualMachineId", virtualMachineId());
+ jsonWriter.writeStringField("protectionStatus", protectionStatus());
+ jsonWriter.writeStringField("protectionState", protectionState() == null ? null : protectionState().toString());
+ jsonWriter.writeStringField("healthStatus", healthStatus() == null ? null : healthStatus().toString());
+ jsonWriter.writeArrayField("healthDetails", healthDetails(), (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeMapField("kpisHealths", kpisHealths(), (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("lastBackupStatus", lastBackupStatus());
+ jsonWriter.writeStringField("lastBackupTime",
+ lastBackupTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastBackupTime()));
+ jsonWriter.writeStringField("protectedItemDataId", protectedItemDataId());
+ jsonWriter.writeJsonField("extendedInfo", extendedInfo());
+ jsonWriter.writeJsonField("extendedProperties", extendedProperties());
+ jsonWriter.writeStringField("protectedItemType", this.protectedItemType);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureIaaSClassicComputeVMProtectedItem from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureIaaSClassicComputeVMProtectedItem 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 AzureIaaSClassicComputeVMProtectedItem.
+ */
+ public static AzureIaaSClassicComputeVMProtectedItem fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureIaaSClassicComputeVMProtectedItem deserializedAzureIaaSClassicComputeVMProtectedItem
+ = new AzureIaaSClassicComputeVMProtectedItem();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupManagementType".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withBackupManagementType(BackupManagementType.fromString(reader.getString()));
+ } else if ("workloadType".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withWorkloadType(DataSourceType.fromString(reader.getString()));
+ } else if ("containerName".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withContainerName(reader.getString());
+ } else if ("sourceResourceId".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withSourceResourceId(reader.getString());
+ } else if ("policyId".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withPolicyId(reader.getString());
+ } else if ("lastRecoveryPoint".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withLastRecoveryPoint(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("backupSetName".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withBackupSetName(reader.getString());
+ } else if ("createMode".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withCreateMode(CreateMode.fromString(reader.getString()));
+ } else if ("deferredDeleteTimeInUTC".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withDeferredDeleteTimeInUTC(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("isScheduledForDeferredDelete".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withIsScheduledForDeferredDelete(reader.getNullable(JsonReader::getBoolean));
+ } else if ("deferredDeleteTimeRemaining".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withDeferredDeleteTimeRemaining(reader.getString());
+ } else if ("isDeferredDeleteScheduleUpcoming".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withIsDeferredDeleteScheduleUpcoming(reader.getNullable(JsonReader::getBoolean));
+ } else if ("isRehydrate".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withIsRehydrate(reader.getNullable(JsonReader::getBoolean));
+ } else if ("resourceGuardOperationRequests".equals(fieldName)) {
+ List resourceGuardOperationRequests = reader.readArray(reader1 -> reader1.getString());
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withResourceGuardOperationRequests(resourceGuardOperationRequests);
+ } else if ("friendlyName".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withFriendlyName(reader.getString());
+ } else if ("virtualMachineId".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withVirtualMachineId(reader.getString());
+ } else if ("protectionStatus".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withProtectionStatus(reader.getString());
+ } else if ("protectionState".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withProtectionState(ProtectionState.fromString(reader.getString()));
+ } else if ("healthStatus".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withHealthStatus(HealthStatus.fromString(reader.getString()));
+ } else if ("healthDetails".equals(fieldName)) {
+ List healthDetails
+ = reader.readArray(reader1 -> AzureIaaSVMHealthDetails.fromJson(reader1));
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withHealthDetails(healthDetails);
+ } else if ("kpisHealths".equals(fieldName)) {
+ Map kpisHealths
+ = reader.readMap(reader1 -> KPIResourceHealthDetails.fromJson(reader1));
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withKpisHealths(kpisHealths);
+ } else if ("lastBackupStatus".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withLastBackupStatus(reader.getString());
+ } else if ("lastBackupTime".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withLastBackupTime(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("protectedItemDataId".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.withProtectedItemDataId(reader.getString());
+ } else if ("extendedInfo".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withExtendedInfo(AzureIaaSVMProtectedItemExtendedInfo.fromJson(reader));
+ } else if ("extendedProperties".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem
+ .withExtendedProperties(ExtendedProperties.fromJson(reader));
+ } else if ("protectedItemType".equals(fieldName)) {
+ deserializedAzureIaaSClassicComputeVMProtectedItem.protectedItemType = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureIaaSClassicComputeVMProtectedItem;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSComputeVMProtectedItem.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSComputeVMProtectedItem.java
new file mode 100644
index 000000000000..f35e78cd7560
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSComputeVMProtectedItem.java
@@ -0,0 +1,183 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * IaaS VM workload-specific backup item representing the Azure Resource Manager VM.
+ */
+@Immutable
+public final class AzureIaaSComputeVMProtectedItem extends AzureIaaSVMProtectedItem {
+ /*
+ * backup item type.
+ */
+ private String protectedItemType = "Microsoft.Compute/virtualMachines";
+
+ /**
+ * Creates an instance of AzureIaaSComputeVMProtectedItem class.
+ */
+ private AzureIaaSComputeVMProtectedItem() {
+ }
+
+ /**
+ * Get the protectedItemType property: backup item type.
+ *
+ * @return the protectedItemType value.
+ */
+ @Override
+ public String protectedItemType() {
+ return this.protectedItemType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("backupManagementType",
+ backupManagementType() == null ? null : backupManagementType().toString());
+ jsonWriter.writeStringField("workloadType", workloadType() == null ? null : workloadType().toString());
+ jsonWriter.writeStringField("containerName", containerName());
+ jsonWriter.writeStringField("sourceResourceId", sourceResourceId());
+ jsonWriter.writeStringField("policyId", policyId());
+ jsonWriter.writeStringField("lastRecoveryPoint",
+ lastRecoveryPoint() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastRecoveryPoint()));
+ jsonWriter.writeStringField("backupSetName", backupSetName());
+ jsonWriter.writeStringField("createMode", createMode() == null ? null : createMode().toString());
+ jsonWriter.writeStringField("deferredDeleteTimeInUTC",
+ deferredDeleteTimeInUTC() == null
+ ? null
+ : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(deferredDeleteTimeInUTC()));
+ jsonWriter.writeBooleanField("isScheduledForDeferredDelete", isScheduledForDeferredDelete());
+ jsonWriter.writeStringField("deferredDeleteTimeRemaining", deferredDeleteTimeRemaining());
+ jsonWriter.writeBooleanField("isDeferredDeleteScheduleUpcoming", isDeferredDeleteScheduleUpcoming());
+ jsonWriter.writeBooleanField("isRehydrate", isRehydrate());
+ jsonWriter.writeArrayField("resourceGuardOperationRequests", resourceGuardOperationRequests(),
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("friendlyName", friendlyName());
+ jsonWriter.writeStringField("virtualMachineId", virtualMachineId());
+ jsonWriter.writeStringField("protectionStatus", protectionStatus());
+ jsonWriter.writeStringField("protectionState", protectionState() == null ? null : protectionState().toString());
+ jsonWriter.writeStringField("healthStatus", healthStatus() == null ? null : healthStatus().toString());
+ jsonWriter.writeArrayField("healthDetails", healthDetails(), (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeMapField("kpisHealths", kpisHealths(), (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("lastBackupStatus", lastBackupStatus());
+ jsonWriter.writeStringField("lastBackupTime",
+ lastBackupTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(lastBackupTime()));
+ jsonWriter.writeStringField("protectedItemDataId", protectedItemDataId());
+ jsonWriter.writeJsonField("extendedInfo", extendedInfo());
+ jsonWriter.writeJsonField("extendedProperties", extendedProperties());
+ jsonWriter.writeStringField("protectedItemType", this.protectedItemType);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureIaaSComputeVMProtectedItem from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureIaaSComputeVMProtectedItem 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 AzureIaaSComputeVMProtectedItem.
+ */
+ public static AzureIaaSComputeVMProtectedItem fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureIaaSComputeVMProtectedItem deserializedAzureIaaSComputeVMProtectedItem
+ = new AzureIaaSComputeVMProtectedItem();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("backupManagementType".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withBackupManagementType(BackupManagementType.fromString(reader.getString()));
+ } else if ("workloadType".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withWorkloadType(DataSourceType.fromString(reader.getString()));
+ } else if ("containerName".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withContainerName(reader.getString());
+ } else if ("sourceResourceId".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withSourceResourceId(reader.getString());
+ } else if ("policyId".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withPolicyId(reader.getString());
+ } else if ("lastRecoveryPoint".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withLastRecoveryPoint(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("backupSetName".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withBackupSetName(reader.getString());
+ } else if ("createMode".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withCreateMode(CreateMode.fromString(reader.getString()));
+ } else if ("deferredDeleteTimeInUTC".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withDeferredDeleteTimeInUTC(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("isScheduledForDeferredDelete".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withIsScheduledForDeferredDelete(reader.getNullable(JsonReader::getBoolean));
+ } else if ("deferredDeleteTimeRemaining".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withDeferredDeleteTimeRemaining(reader.getString());
+ } else if ("isDeferredDeleteScheduleUpcoming".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withIsDeferredDeleteScheduleUpcoming(reader.getNullable(JsonReader::getBoolean));
+ } else if ("isRehydrate".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withIsRehydrate(reader.getNullable(JsonReader::getBoolean));
+ } else if ("resourceGuardOperationRequests".equals(fieldName)) {
+ List resourceGuardOperationRequests = reader.readArray(reader1 -> reader1.getString());
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withResourceGuardOperationRequests(resourceGuardOperationRequests);
+ } else if ("friendlyName".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withFriendlyName(reader.getString());
+ } else if ("virtualMachineId".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withVirtualMachineId(reader.getString());
+ } else if ("protectionStatus".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withProtectionStatus(reader.getString());
+ } else if ("protectionState".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withProtectionState(ProtectionState.fromString(reader.getString()));
+ } else if ("healthStatus".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withHealthStatus(HealthStatus.fromString(reader.getString()));
+ } else if ("healthDetails".equals(fieldName)) {
+ List healthDetails
+ = reader.readArray(reader1 -> AzureIaaSVMHealthDetails.fromJson(reader1));
+ deserializedAzureIaaSComputeVMProtectedItem.withHealthDetails(healthDetails);
+ } else if ("kpisHealths".equals(fieldName)) {
+ Map kpisHealths
+ = reader.readMap(reader1 -> KPIResourceHealthDetails.fromJson(reader1));
+ deserializedAzureIaaSComputeVMProtectedItem.withKpisHealths(kpisHealths);
+ } else if ("lastBackupStatus".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withLastBackupStatus(reader.getString());
+ } else if ("lastBackupTime".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withLastBackupTime(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("protectedItemDataId".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.withProtectedItemDataId(reader.getString());
+ } else if ("extendedInfo".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withExtendedInfo(AzureIaaSVMProtectedItemExtendedInfo.fromJson(reader));
+ } else if ("extendedProperties".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem
+ .withExtendedProperties(ExtendedProperties.fromJson(reader));
+ } else if ("protectedItemType".equals(fieldName)) {
+ deserializedAzureIaaSComputeVMProtectedItem.protectedItemType = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureIaaSComputeVMProtectedItem;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSVMErrorInfo.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSVMErrorInfo.java
new file mode 100644
index 000000000000..2ba92caa9586
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSVMErrorInfo.java
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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;
+
+/**
+ * Azure IaaS VM workload-specific error information.
+ */
+@Immutable
+public final class AzureIaaSVMErrorInfo implements JsonSerializable {
+ /*
+ * Error code.
+ */
+ private Integer errorCode;
+
+ /*
+ * Title: Typically, the entity that the error pertains to.
+ */
+ private String errorTitle;
+
+ /*
+ * Localized error string.
+ */
+ private String errorString;
+
+ /*
+ * List of localized recommendations for above error code.
+ */
+ private List recommendations;
+
+ /**
+ * Creates an instance of AzureIaaSVMErrorInfo class.
+ */
+ private AzureIaaSVMErrorInfo() {
+ }
+
+ /**
+ * Get the errorCode property: Error code.
+ *
+ * @return the errorCode value.
+ */
+ public Integer errorCode() {
+ return this.errorCode;
+ }
+
+ /**
+ * Get the errorTitle property: Title: Typically, the entity that the error pertains to.
+ *
+ * @return the errorTitle value.
+ */
+ public String errorTitle() {
+ return this.errorTitle;
+ }
+
+ /**
+ * Get the errorString property: Localized error string.
+ *
+ * @return the errorString value.
+ */
+ public String errorString() {
+ return this.errorString;
+ }
+
+ /**
+ * Get the recommendations property: List of localized recommendations for above error code.
+ *
+ * @return the recommendations value.
+ */
+ public List recommendations() {
+ return this.recommendations;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AzureIaaSVMErrorInfo from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AzureIaaSVMErrorInfo 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 AzureIaaSVMErrorInfo.
+ */
+ public static AzureIaaSVMErrorInfo fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AzureIaaSVMErrorInfo deserializedAzureIaaSVMErrorInfo = new AzureIaaSVMErrorInfo();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("errorCode".equals(fieldName)) {
+ deserializedAzureIaaSVMErrorInfo.errorCode = reader.getNullable(JsonReader::getInt);
+ } else if ("errorTitle".equals(fieldName)) {
+ deserializedAzureIaaSVMErrorInfo.errorTitle = reader.getString();
+ } else if ("errorString".equals(fieldName)) {
+ deserializedAzureIaaSVMErrorInfo.errorString = reader.getString();
+ } else if ("recommendations".equals(fieldName)) {
+ List recommendations = reader.readArray(reader1 -> reader1.getString());
+ deserializedAzureIaaSVMErrorInfo.recommendations = recommendations;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAzureIaaSVMErrorInfo;
+ });
+ }
+}
diff --git a/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSVMHealthDetails.java b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSVMHealthDetails.java
new file mode 100644
index 000000000000..5f179b7c2e11
--- /dev/null
+++ b/sdk/recoveryservicesbackupcrossregionrestore/azure-resourcemanager-recoveryservicesbackupcrossregionrestore/src/main/java/com/azure/resourcemanager/recoveryservicesbackupcrossregionrestore/models/AzureIaaSVMHealthDetails.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.recoveryservicesbackupcrossregionrestore.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;
+import java.util.List;
+
+/**
+ * Azure IaaS VM workload-specific Health Details.
+ */
+@Immutable
+public final class AzureIaaSVMHealthDetails extends ResourceHealthDetails {
+ /*
+ * Health Recommended Actions
+ */
+ private List