diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 2846b8822f624..df47a7c974822 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -317,6 +317,7 @@ com.azure.resourcemanager:azure-resourcemanager-purview;1.0.0-beta.1;1.0.0-beta.
com.azure.resourcemanager:azure-resourcemanager-mysqlflexibleserver;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-baremetalinfrastructure;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-dataprotection;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index 48a8c8e0b771d..63baeec3c6427 100644
--- a/pom.xml
+++ b/pom.xml
@@ -751,6 +751,7 @@
sdk/datalakeanalytics
sdk/datalakestore
sdk/datamigration
+ sdk/dataprotection
sdk/delegatednetwork
sdk/deploymentmanager
sdk/deviceprovisioningservices
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
new file mode 100644
index 0000000000000..93289193cd6c1
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-09-16)
+
+- Azure Resource Manager DataProtection client library for Java. This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md
new file mode 100644
index 0000000000000..825d2a898f4f1
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/README.md
@@ -0,0 +1,101 @@
+# Azure Resource Manager DataProtection client library for Java
+
+Azure Resource Manager DataProtection client library for Java.
+
+This package contains Microsoft Azure SDK for DataProtection Management SDK. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2021-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-dataprotection;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-dataprotection
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+DataProtectionManager manager = DataProtectionManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
new file mode 100644
index 0000000000000..8a14091ba3fa7
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-dataprotection
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for DataProtection Management
+ This package contains Microsoft Azure SDK for DataProtection Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open API 2.0 Specs for Azure Data Protection service. Package tag package-2021-07.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.20.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.1
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java
new file mode 100644
index 0000000000000..b787d4bcdbfa6
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/DataProtectionManager.java
@@ -0,0 +1,386 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.DataProtectionClient;
+import com.azure.resourcemanager.dataprotection.implementation.BackupInstancesImpl;
+import com.azure.resourcemanager.dataprotection.implementation.BackupPoliciesImpl;
+import com.azure.resourcemanager.dataprotection.implementation.BackupVaultOperationResultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.BackupVaultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.DataProtectionClientBuilder;
+import com.azure.resourcemanager.dataprotection.implementation.DataProtectionOperationsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.DataProtectionsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.ExportJobsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.ExportJobsOperationResultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.JobsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.OperationResultsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.OperationStatusImpl;
+import com.azure.resourcemanager.dataprotection.implementation.RecoveryPointsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.ResourceGuardsImpl;
+import com.azure.resourcemanager.dataprotection.implementation.RestorableTimeRangesImpl;
+import com.azure.resourcemanager.dataprotection.models.BackupInstances;
+import com.azure.resourcemanager.dataprotection.models.BackupPolicies;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResults;
+import com.azure.resourcemanager.dataprotection.models.BackupVaults;
+import com.azure.resourcemanager.dataprotection.models.DataProtectionOperations;
+import com.azure.resourcemanager.dataprotection.models.DataProtections;
+import com.azure.resourcemanager.dataprotection.models.ExportJobs;
+import com.azure.resourcemanager.dataprotection.models.ExportJobsOperationResults;
+import com.azure.resourcemanager.dataprotection.models.Jobs;
+import com.azure.resourcemanager.dataprotection.models.OperationResults;
+import com.azure.resourcemanager.dataprotection.models.OperationStatus;
+import com.azure.resourcemanager.dataprotection.models.RecoveryPoints;
+import com.azure.resourcemanager.dataprotection.models.ResourceGuards;
+import com.azure.resourcemanager.dataprotection.models.RestorableTimeRanges;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to DataProtectionManager. Open API 2.0 Specs for Azure Data Protection service. */
+public final class DataProtectionManager {
+ private BackupVaults backupVaults;
+
+ private OperationResults operationResults;
+
+ private OperationStatus operationStatus;
+
+ private BackupVaultOperationResults backupVaultOperationResults;
+
+ private DataProtections dataProtections;
+
+ private DataProtectionOperations dataProtectionOperations;
+
+ private BackupPolicies backupPolicies;
+
+ private BackupInstances backupInstances;
+
+ private RecoveryPoints recoveryPoints;
+
+ private Jobs jobs;
+
+ private RestorableTimeRanges restorableTimeRanges;
+
+ private ExportJobs exportJobs;
+
+ private ExportJobsOperationResults exportJobsOperationResults;
+
+ private ResourceGuards resourceGuards;
+
+ private final DataProtectionClient clientObject;
+
+ private DataProtectionManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new DataProtectionClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of DataProtection service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the DataProtection service API instance.
+ */
+ public static DataProtectionManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create DataProtectionManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new DataProtectionManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ 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 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, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of DataProtection service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the DataProtection service API instance.
+ */
+ public DataProtectionManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.dataprotection")
+ .append("/")
+ .append("1.0.0-beta.1");
+ 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) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies);
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new DataProtectionManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of BackupVaults. */
+ public BackupVaults backupVaults() {
+ if (this.backupVaults == null) {
+ this.backupVaults = new BackupVaultsImpl(clientObject.getBackupVaults(), this);
+ }
+ return backupVaults;
+ }
+
+ /** @return Resource collection API of OperationResults. */
+ public OperationResults operationResults() {
+ if (this.operationResults == null) {
+ this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this);
+ }
+ return operationResults;
+ }
+
+ /** @return Resource collection API of OperationStatus. */
+ public OperationStatus operationStatus() {
+ if (this.operationStatus == null) {
+ this.operationStatus = new OperationStatusImpl(clientObject.getOperationStatus(), this);
+ }
+ return operationStatus;
+ }
+
+ /** @return Resource collection API of BackupVaultOperationResults. */
+ public BackupVaultOperationResults backupVaultOperationResults() {
+ if (this.backupVaultOperationResults == null) {
+ this.backupVaultOperationResults =
+ new BackupVaultOperationResultsImpl(clientObject.getBackupVaultOperationResults(), this);
+ }
+ return backupVaultOperationResults;
+ }
+
+ /** @return Resource collection API of DataProtections. */
+ public DataProtections dataProtections() {
+ if (this.dataProtections == null) {
+ this.dataProtections = new DataProtectionsImpl(clientObject.getDataProtections(), this);
+ }
+ return dataProtections;
+ }
+
+ /** @return Resource collection API of DataProtectionOperations. */
+ public DataProtectionOperations dataProtectionOperations() {
+ if (this.dataProtectionOperations == null) {
+ this.dataProtectionOperations =
+ new DataProtectionOperationsImpl(clientObject.getDataProtectionOperations(), this);
+ }
+ return dataProtectionOperations;
+ }
+
+ /** @return Resource collection API of BackupPolicies. */
+ public BackupPolicies backupPolicies() {
+ if (this.backupPolicies == null) {
+ this.backupPolicies = new BackupPoliciesImpl(clientObject.getBackupPolicies(), this);
+ }
+ return backupPolicies;
+ }
+
+ /** @return Resource collection API of BackupInstances. */
+ public BackupInstances backupInstances() {
+ if (this.backupInstances == null) {
+ this.backupInstances = new BackupInstancesImpl(clientObject.getBackupInstances(), this);
+ }
+ return backupInstances;
+ }
+
+ /** @return Resource collection API of RecoveryPoints. */
+ public RecoveryPoints recoveryPoints() {
+ if (this.recoveryPoints == null) {
+ this.recoveryPoints = new RecoveryPointsImpl(clientObject.getRecoveryPoints(), this);
+ }
+ return recoveryPoints;
+ }
+
+ /** @return Resource collection API of Jobs. */
+ public Jobs jobs() {
+ if (this.jobs == null) {
+ this.jobs = new JobsImpl(clientObject.getJobs(), this);
+ }
+ return jobs;
+ }
+
+ /** @return Resource collection API of RestorableTimeRanges. */
+ public RestorableTimeRanges restorableTimeRanges() {
+ if (this.restorableTimeRanges == null) {
+ this.restorableTimeRanges = new RestorableTimeRangesImpl(clientObject.getRestorableTimeRanges(), this);
+ }
+ return restorableTimeRanges;
+ }
+
+ /** @return Resource collection API of ExportJobs. */
+ public ExportJobs exportJobs() {
+ if (this.exportJobs == null) {
+ this.exportJobs = new ExportJobsImpl(clientObject.getExportJobs(), this);
+ }
+ return exportJobs;
+ }
+
+ /** @return Resource collection API of ExportJobsOperationResults. */
+ public ExportJobsOperationResults exportJobsOperationResults() {
+ if (this.exportJobsOperationResults == null) {
+ this.exportJobsOperationResults =
+ new ExportJobsOperationResultsImpl(clientObject.getExportJobsOperationResults(), this);
+ }
+ return exportJobsOperationResults;
+ }
+
+ /** @return Resource collection API of ResourceGuards. */
+ public ResourceGuards resourceGuards() {
+ if (this.resourceGuards == null) {
+ this.resourceGuards = new ResourceGuardsImpl(clientObject.getResourceGuards(), this);
+ }
+ return resourceGuards;
+ }
+
+ /**
+ * @return Wrapped service client DataProtectionClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public DataProtectionClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java
new file mode 100644
index 0000000000000..5790506aecd8b
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupInstancesClient.java
@@ -0,0 +1,574 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+
+/** An instance of this class provides access to all the operations defined in BackupInstancesClient. */
+public interface BackupInstancesClient {
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String vaultName, String resourceGroupName);
+
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String vaultName, String resourceGroupName, Context context);
+
+ /**
+ * Gets a backup instance with name in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance with name in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupInstanceResourceInner get(String vaultName, String resourceGroupName, String backupInstanceName);
+
+ /**
+ * Gets a backup instance with name in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance with name in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context);
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate(
+ String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters);
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ BackupInstanceResourceInner parameters,
+ Context context);
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupInstanceResourceInner createOrUpdate(
+ String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters);
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupInstanceResourceInner createOrUpdate(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ BackupInstanceResourceInner parameters,
+ Context context);
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String vaultName, String resourceGroupName, String backupInstanceName);
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context);
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String vaultName, String resourceGroupName, String backupInstanceName);
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String vaultName, String resourceGroupName, String backupInstanceName, Context context);
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters);
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context);
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner adhocBackup(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters);
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner adhocBackup(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context);
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters);
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context);
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner validateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters);
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner validateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context);
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginTriggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters);
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginTriggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context);
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void triggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters);
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void triggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context);
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore(
+ String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters);
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context);
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner triggerRestore(
+ String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters);
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner triggerRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context);
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore(
+ String vaultName, String resourceGroupName, String backupInstanceName, ValidateRestoreRequestObject parameters);
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context);
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner validateForRestore(
+ String vaultName, String resourceGroupName, String backupInstanceName, ValidateRestoreRequestObject parameters);
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner validateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java
new file mode 100644
index 0000000000000..7fa97536f7483
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupPoliciesClient.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner;
+
+/** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */
+public interface BackupPoliciesClient {
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String vaultName, String resourceGroupName);
+
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String vaultName, String resourceGroupName, Context context);
+
+ /**
+ * Gets a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BaseBackupPolicyResourceInner get(String vaultName, String resourceGroupName, String backupPolicyName);
+
+ /**
+ * Gets a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context);
+
+ /**
+ * Creates or Updates a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName Name of the policy.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BaseBackupPolicyResourceInner createOrUpdate(
+ String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters);
+
+ /**
+ * Creates or Updates a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName Name of the policy.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String vaultName,
+ String resourceGroupName,
+ String backupPolicyName,
+ BaseBackupPolicyResourceInner parameters,
+ Context context);
+
+ /**
+ * Deletes a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 delete(String vaultName, String resourceGroupName, String backupPolicyName);
+
+ /**
+ * Deletes a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultOperationResultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultOperationResultsClient.java
new file mode 100644
index 0000000000000..91336b28091d7
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultOperationResultsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse;
+
+/** An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. */
+public interface BackupVaultOperationResultsClient {
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupVaultResourceInner get(String vaultName, String resourceGroupName, String operationId);
+
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupVaultOperationResultsGetResponse getWithResponse(
+ String vaultName, String resourceGroupName, String operationId, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java
new file mode 100644
index 0000000000000..05d8d6d706a09
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
+import com.azure.resourcemanager.dataprotection.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest;
+import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput;
+
+/** An instance of this class provides access to all the operations defined in BackupVaultsClient. */
+public interface BackupVaultsClient {
+ /**
+ * Returns resource collection belonging to a subscription.
+ *
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Returns resource collection belonging to a subscription.
+ *
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Returns resource collection belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Returns resource collection belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Returns a resource belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupVaultResourceInner getByResourceGroup(String resourceGroupName, String vaultName);
+
+ /**
+ * Returns a resource belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Creates or updates a BackupVault resource belonging to a resource group.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate(
+ String vaultName, String resourceGroupName, BackupVaultResourceInner parameters);
+
+ /**
+ * Creates or updates a BackupVault resource belonging to a resource group.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BackupVaultResourceInner> beginCreateOrUpdate(
+ String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context);
+
+ /**
+ * Creates or updates a BackupVault resource belonging to a resource group.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupVaultResourceInner createOrUpdate(
+ String vaultName, String resourceGroupName, BackupVaultResourceInner parameters);
+
+ /**
+ * Creates or updates a BackupVault resource belonging to a resource group.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupVaultResourceInner createOrUpdate(
+ String vaultName, String resourceGroupName, BackupVaultResourceInner parameters, Context context);
+
+ /**
+ * Deletes a BackupVault resource from the resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String vaultName);
+
+ /**
+ * Deletes a BackupVault resource from the resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BackupVaultResourceInner> beginUpdate(
+ String vaultName, String resourceGroupName, PatchResourceRequestInput parameters);
+
+ /**
+ * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, BackupVaultResourceInner> beginUpdate(
+ String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context);
+
+ /**
+ * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupVaultResourceInner update(String vaultName, String resourceGroupName, PatchResourceRequestInput parameters);
+
+ /**
+ * Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ BackupVaultResourceInner update(
+ String vaultName, String resourceGroupName, PatchResourceRequestInput parameters, Context context);
+
+ /**
+ * API to check for resource name availability.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param location The location in which uniqueness will be verified.
+ * @param parameters Check name availability 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 checkNameAvailabilityResult.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckNameAvailabilityResultInner checkNameAvailability(
+ String resourceGroupName, String location, CheckNameAvailabilityRequest parameters);
+
+ /**
+ * API to check for resource name availability.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param location The location in which uniqueness will be verified.
+ * @param parameters Check name availability 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 checkNameAvailabilityResult.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ String resourceGroupName, String location, CheckNameAvailabilityRequest parameters, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java
new file mode 100644
index 0000000000000..c6d7d43aad929
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionClient.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for DataProtectionClient class. */
+public interface DataProtectionClient {
+ /**
+ * Gets The subscription Id.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * 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 BackupVaultsClient object to access its operations.
+ *
+ * @return the BackupVaultsClient object.
+ */
+ BackupVaultsClient getBackupVaults();
+
+ /**
+ * Gets the OperationResultsClient object to access its operations.
+ *
+ * @return the OperationResultsClient object.
+ */
+ OperationResultsClient getOperationResults();
+
+ /**
+ * Gets the OperationStatusClient object to access its operations.
+ *
+ * @return the OperationStatusClient object.
+ */
+ OperationStatusClient getOperationStatus();
+
+ /**
+ * Gets the BackupVaultOperationResultsClient object to access its operations.
+ *
+ * @return the BackupVaultOperationResultsClient object.
+ */
+ BackupVaultOperationResultsClient getBackupVaultOperationResults();
+
+ /**
+ * Gets the DataProtectionsClient object to access its operations.
+ *
+ * @return the DataProtectionsClient object.
+ */
+ DataProtectionsClient getDataProtections();
+
+ /**
+ * Gets the DataProtectionOperationsClient object to access its operations.
+ *
+ * @return the DataProtectionOperationsClient object.
+ */
+ DataProtectionOperationsClient getDataProtectionOperations();
+
+ /**
+ * Gets the BackupPoliciesClient object to access its operations.
+ *
+ * @return the BackupPoliciesClient object.
+ */
+ BackupPoliciesClient getBackupPolicies();
+
+ /**
+ * Gets the BackupInstancesClient object to access its operations.
+ *
+ * @return the BackupInstancesClient object.
+ */
+ BackupInstancesClient getBackupInstances();
+
+ /**
+ * Gets the RecoveryPointsClient object to access its operations.
+ *
+ * @return the RecoveryPointsClient object.
+ */
+ RecoveryPointsClient getRecoveryPoints();
+
+ /**
+ * Gets the JobsClient object to access its operations.
+ *
+ * @return the JobsClient object.
+ */
+ JobsClient getJobs();
+
+ /**
+ * Gets the RestorableTimeRangesClient object to access its operations.
+ *
+ * @return the RestorableTimeRangesClient object.
+ */
+ RestorableTimeRangesClient getRestorableTimeRanges();
+
+ /**
+ * Gets the ExportJobsClient object to access its operations.
+ *
+ * @return the ExportJobsClient object.
+ */
+ ExportJobsClient getExportJobs();
+
+ /**
+ * Gets the ExportJobsOperationResultsClient object to access its operations.
+ *
+ * @return the ExportJobsOperationResultsClient object.
+ */
+ ExportJobsOperationResultsClient getExportJobsOperationResults();
+
+ /**
+ * Gets the ResourceGuardsClient object to access its operations.
+ *
+ * @return the ResourceGuardsClient object.
+ */
+ ResourceGuardsClient getResourceGuards();
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionOperationsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionOperationsClient.java
new file mode 100644
index 0000000000000..63f06497a8bd9
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionOperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner;
+
+/** An instance of this class provides access to all the operations defined in DataProtectionOperationsClient. */
+public interface DataProtectionOperationsClient {
+ /**
+ * Returns the list of available operations.
+ *
+ * @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 clientDiscoveryResponse.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Returns the list of available operations.
+ *
+ * @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 clientDiscoveryResponse.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionsClient.java
new file mode 100644
index 0000000000000..e9c2cca27835e
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/DataProtectionsClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner;
+import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase;
+
+/** An instance of this class provides access to all the operations defined in DataProtectionsClient. */
+public interface DataProtectionsClient {
+ /**
+ * Validates if a feature is supported.
+ *
+ * @param location The location parameter.
+ * @param parameters Feature support request object.
+ * @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 Feature support.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FeatureValidationResponseBaseInner checkFeatureSupport(String location, FeatureValidationRequestBase parameters);
+
+ /**
+ * Validates if a feature is supported.
+ *
+ * @param location The location parameter.
+ * @param parameters Feature support request object.
+ * @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 Feature support.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkFeatureSupportWithResponse(
+ String location, FeatureValidationRequestBase parameters, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsClient.java
new file mode 100644
index 0000000000000..d807fc789928c
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsClient.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+
+/** An instance of this class provides access to all the operations defined in ExportJobsClient. */
+public interface ExportJobsClient {
+ /**
+ * Triggers export of jobs and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginTrigger(String resourceGroupName, String vaultName);
+
+ /**
+ * Triggers export of jobs and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginTrigger(String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Triggers export of jobs and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void trigger(String resourceGroupName, String vaultName);
+
+ /**
+ * Triggers export of jobs and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void trigger(String resourceGroupName, String vaultName, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsOperationResultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsOperationResultsClient.java
new file mode 100644
index 0000000000000..71636c714b0ee
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ExportJobsOperationResultsClient.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.ExportJobsResultInner;
+
+/** An instance of this class provides access to all the operations defined in ExportJobsOperationResultsClient. */
+public interface ExportJobsOperationResultsClient {
+ /**
+ * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also
+ * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized
+ * format.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param operationId OperationID which represents the export job.
+ * @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 operation result of operation triggered by Export Jobs API.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ExportJobsResultInner get(String resourceGroupName, String vaultName, String operationId);
+
+ /**
+ * Gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it also
+ * contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized
+ * format.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param operationId OperationID which represents the export job.
+ * @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 operation result of operation triggered by Export Jobs API.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String vaultName, String operationId, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobsClient.java
new file mode 100644
index 0000000000000..d417b058c2220
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/JobsClient.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+
+/** An instance of this class provides access to all the operations defined in JobsClient. */
+public interface JobsClient {
+ /**
+ * Returns list of jobs belonging to a backup vault.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of AzureBackup Job resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName);
+
+ /**
+ * Returns list of jobs belonging to a backup vault.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of AzureBackup Job resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String vaultName, Context context);
+
+ /**
+ * Gets a job with id in a backup vault.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job with id in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBackupJobResourceInner get(String resourceGroupName, String vaultName, String jobId);
+
+ /**
+ * Gets a job with id in a backup vault.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param jobId The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job with id in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String vaultName, String jobId, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationResultsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationResultsClient.java
new file mode 100644
index 0000000000000..2660819b302d0
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationResultsClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse;
+
+/** An instance of this class provides access to all the operations defined in OperationResultsClient. */
+public interface OperationResultsClient {
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param operationId The operationId parameter.
+ * @param location The location 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 the operation result for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationJobExtendedInfoInner get(String operationId, String location);
+
+ /**
+ * Gets the operation result for a resource.
+ *
+ * @param operationId The operationId parameter.
+ * @param location The location 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 operation result for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationResultsGetResponse getWithResponse(String operationId, String location, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusClient.java
new file mode 100644
index 0000000000000..d5259472bc836
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/OperationStatusClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner;
+
+/** An instance of this class provides access to all the operations defined in OperationStatusClient. */
+public interface OperationStatusClient {
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param location The location parameter.
+ * @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 the operation status for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationResourceInner get(String location, String operationId);
+
+ /**
+ * Gets the operation status for a resource.
+ *
+ * @param location The location parameter.
+ * @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 operation status for a resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String location, String operationId, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsClient.java
new file mode 100644
index 0000000000000..f710f45135a65
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RecoveryPointsClient.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+
+/** An instance of this class provides access to all the operations defined in RecoveryPointsClient. */
+public interface RecoveryPointsClient {
+ /**
+ * Returns a list of Recovery Points for a DataSource in a vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 azureBackupRecoveryPointResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String vaultName, String resourceGroupName, String backupInstanceName);
+
+ /**
+ * Returns a list of Recovery Points for a DataSource in a vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 azureBackupRecoveryPointResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ String filter,
+ String skipToken,
+ Context context);
+
+ /**
+ * Gets a Recovery Point using recoveryPointId for a Datasource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param recoveryPointId The recoveryPointId 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 a Recovery Point using recoveryPointId for a Datasource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBackupRecoveryPointResourceInner get(
+ String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId);
+
+ /**
+ * Gets a Recovery Point using recoveryPointId for a Datasource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param recoveryPointId The recoveryPointId 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 a Recovery Point using recoveryPointId for a Datasource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String vaultName, String resourceGroupName, String backupInstanceName, String recoveryPointId, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ResourceGuardsClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ResourceGuardsClient.java
new file mode 100644
index 0000000000000..cdb7b453d286b
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/ResourceGuardsClient.java
@@ -0,0 +1,564 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner;
+import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner;
+import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput;
+
+/** An instance of this class provides access to all the operations defined in ResourceGuardsClient. */
+public interface ResourceGuardsClient {
+ /**
+ * Returns ResourceGuards collection belonging to a subscription.
+ *
+ * @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 ResourceGuard resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Returns ResourceGuards collection belonging to a subscription.
+ *
+ * @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 ResourceGuard resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Returns ResourceGuards collection belonging to a ResourceGroup.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 ResourceGuard resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Returns ResourceGuards collection belonging to a ResourceGroup.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 ResourceGuard resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Creates or updates a ResourceGuard resource belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ResourceGuardResourceInner put(
+ String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters);
+
+ /**
+ * Creates or updates a ResourceGuard resource belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response putWithResponse(
+ String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters, Context context);
+
+ /**
+ * Returns a ResourceGuard belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @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)
+ ResourceGuardResourceInner getByResourceGroup(String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Returns a ResourceGuard belonging to a resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Deletes a ResourceGuard resource from the resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Deletes a ResourceGuard resource from the resource group.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ResourceGuardResourceInner patch(
+ String resourceGroupName, String resourceGuardsName, PatchResourceRequestInput parameters);
+
+ /**
+ * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The name of ResourceGuard.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response patchWithResponse(
+ String resourceGroupName, String resourceGuardsName, PatchResourceRequestInput parameters, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getDisableSoftDeleteRequestsObjects(
+ String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getDisableSoftDeleteRequestsObjects(
+ String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getDeleteResourceGuardProxyRequestsObjects(
+ String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getDeleteResourceGuardProxyRequestsObjects(
+ String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getBackupSecurityPinRequestsObjects(
+ String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getBackupSecurityPinRequestsObjects(
+ String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getDeleteProtectedItemRequestsObjects(
+ String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getDeleteProtectedItemRequestsObjects(
+ String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getUpdateProtectionPolicyRequestsObjects(
+ String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getUpdateProtectionPolicyRequestsObjects(
+ String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getUpdateProtectedItemRequestsObjects(
+ String resourceGroupName, String resourceGuardsName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getUpdateProtectedItemRequestsObjects(
+ String resourceGroupName, String resourceGuardsName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject(
+ String resourceGroupName, String resourceGuardsName, String requestName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDefaultDisableSoftDeleteRequestsObjectWithResponse(
+ String resourceGroupName, String resourceGuardsName, String requestName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject(
+ String resourceGroupName, String resourceGuardsName, String requestName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse(
+ String resourceGroupName, String resourceGuardsName, String requestName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject(
+ String resourceGroupName, String resourceGuardsName, String requestName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDefaultBackupSecurityPinRequestsObjectWithResponse(
+ String resourceGroupName, String resourceGuardsName, String requestName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject(
+ String resourceGroupName, String resourceGuardsName, String requestName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDefaultDeleteProtectedItemRequestsObjectWithResponse(
+ String resourceGroupName, String resourceGuardsName, String requestName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject(
+ String resourceGroupName, String resourceGuardsName, String requestName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDefaultUpdateProtectionPolicyRequestsObjectWithResponse(
+ String resourceGroupName, String resourceGuardsName, String requestName, Context context);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(
+ String resourceGroupName, String resourceGuardsName, String requestName);
+
+ /**
+ * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
+ * resource.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param resourceGuardsName The resourceGuardsName parameter.
+ * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getDefaultUpdateProtectedItemRequestsObjectWithResponse(
+ String resourceGroupName, String resourceGuardsName, String requestName, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesClient.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesClient.java
new file mode 100644
index 0000000000000..740f4e4798608
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/RestorableTimeRangesClient.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
+
+/** An instance of this class provides access to all the operations defined in RestorableTimeRangesClient. */
+public interface RestorableTimeRangesClient {
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Restore Ranges Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBackupFindRestorableTimeRangesResponseResourceInner find(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupFindRestorableTimeRangesRequest parameters);
+
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list Restore Ranges Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response findWithResponse(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupFindRestorableTimeRangesRequest parameters,
+ Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java
new file mode 100644
index 0000000000000..4b674770ec448
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupFindRestorableTimeRangesResponseResourceInner.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse;
+import com.azure.resourcemanager.dataprotection.models.DppResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** List Restore Ranges Response. */
+@Fluent
+public final class AzureBackupFindRestorableTimeRangesResponseResourceInner extends DppResource {
+ @JsonIgnore
+ private final ClientLogger logger =
+ new ClientLogger(AzureBackupFindRestorableTimeRangesResponseResourceInner.class);
+
+ /*
+ * AzureBackupFindRestorableTimeRangesResponseResource properties
+ */
+ @JsonProperty(value = "properties")
+ private AzureBackupFindRestorableTimeRangesResponse properties;
+
+ /**
+ * Get the properties property: AzureBackupFindRestorableTimeRangesResponseResource properties.
+ *
+ * @return the properties value.
+ */
+ public AzureBackupFindRestorableTimeRangesResponse properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: AzureBackupFindRestorableTimeRangesResponseResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the AzureBackupFindRestorableTimeRangesResponseResourceInner object itself.
+ */
+ public AzureBackupFindRestorableTimeRangesResponseResourceInner withProperties(
+ AzureBackupFindRestorableTimeRangesResponse properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java
new file mode 100644
index 0000000000000..f3fc551c95117
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupJobResourceInner.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJob;
+import com.azure.resourcemanager.dataprotection.models.DppResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** AzureBackup Job Resource Class. */
+@Fluent
+public final class AzureBackupJobResourceInner extends DppResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupJobResourceInner.class);
+
+ /*
+ * AzureBackupJobResource properties
+ */
+ @JsonProperty(value = "properties")
+ private AzureBackupJob properties;
+
+ /**
+ * Get the properties property: AzureBackupJobResource properties.
+ *
+ * @return the properties value.
+ */
+ public AzureBackupJob properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: AzureBackupJobResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the AzureBackupJobResourceInner object itself.
+ */
+ public AzureBackupJobResourceInner withProperties(AzureBackupJob properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java
new file mode 100644
index 0000000000000..199b96c518489
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/AzureBackupRecoveryPointResourceInner.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint;
+import com.azure.resourcemanager.dataprotection.models.DppResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** AzureBackupRecoveryPointResource Azure backup recoveryPoint resource. */
+@Fluent
+public final class AzureBackupRecoveryPointResourceInner extends DppResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBackupRecoveryPointResourceInner.class);
+
+ /*
+ * AzureBackupRecoveryPoint AzureBackupRecoveryPointResource properties
+ */
+ @JsonProperty(value = "properties")
+ private AzureBackupRecoveryPoint properties;
+
+ /**
+ * Get the properties property: AzureBackupRecoveryPoint AzureBackupRecoveryPointResource properties.
+ *
+ * @return the properties value.
+ */
+ public AzureBackupRecoveryPoint properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: AzureBackupRecoveryPoint AzureBackupRecoveryPointResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the AzureBackupRecoveryPointResourceInner object itself.
+ */
+ public AzureBackupRecoveryPointResourceInner withProperties(AzureBackupRecoveryPoint properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java
new file mode 100644
index 0000000000000..7e01834d05bee
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupInstanceResourceInner.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.BackupInstance;
+import com.azure.resourcemanager.dataprotection.models.DppResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** BackupInstanceResource BackupInstance Resource. */
+@Fluent
+public final class BackupInstanceResourceInner extends DppResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstanceResourceInner.class);
+
+ /*
+ * BackupInstanceResource properties
+ */
+ @JsonProperty(value = "properties")
+ private BackupInstance properties;
+
+ /**
+ * Get the properties property: BackupInstanceResource properties.
+ *
+ * @return the properties value.
+ */
+ public BackupInstance properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: BackupInstanceResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the BackupInstanceResourceInner object itself.
+ */
+ public BackupInstanceResourceInner withProperties(BackupInstance properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupVaultResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupVaultResourceInner.java
new file mode 100644
index 0000000000000..05b9ee22e8575
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BackupVaultResourceInner.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.BackupVault;
+import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
+import com.azure.resourcemanager.dataprotection.models.DppTrackedResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** BackupVault Resource Backup Vault Resource. */
+@Fluent
+public final class BackupVaultResourceInner extends DppTrackedResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVaultResourceInner.class);
+
+ /*
+ * BackupVault BackupVaultResource properties
+ */
+ @JsonProperty(value = "properties", required = true)
+ private BackupVault properties;
+
+ /**
+ * Get the properties property: BackupVault BackupVaultResource properties.
+ *
+ * @return the properties value.
+ */
+ public BackupVault properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: BackupVault BackupVaultResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the BackupVaultResourceInner object itself.
+ */
+ public BackupVaultResourceInner withProperties(BackupVault properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public BackupVaultResourceInner withEtag(String etag) {
+ super.withEtag(etag);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public BackupVaultResourceInner withIdentity(DppIdentityDetails identity) {
+ super.withIdentity(identity);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public BackupVaultResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public BackupVaultResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (properties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model BackupVaultResourceInner"));
+ } else {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java
new file mode 100644
index 0000000000000..f714b63e63632
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/BaseBackupPolicyResourceInner.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy;
+import com.azure.resourcemanager.dataprotection.models.DppResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** BaseBackupPolicyResource BaseBackupPolicy resource. */
+@Fluent
+public final class BaseBackupPolicyResourceInner extends DppResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BaseBackupPolicyResourceInner.class);
+
+ /*
+ * BaseBackupPolicy BaseBackupPolicyResource properties
+ */
+ @JsonProperty(value = "properties")
+ private BaseBackupPolicy properties;
+
+ /**
+ * Get the properties property: BaseBackupPolicy BaseBackupPolicyResource properties.
+ *
+ * @return the properties value.
+ */
+ public BaseBackupPolicy properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: BaseBackupPolicy BaseBackupPolicyResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the BaseBackupPolicyResourceInner object itself.
+ */
+ public BaseBackupPolicyResourceInner withProperties(BaseBackupPolicy properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java
new file mode 100644
index 0000000000000..4f702656ff023
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/CheckNameAvailabilityResultInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** CheckNameAvailabilityResult CheckNameAvailability Result. */
+@Fluent
+public final class CheckNameAvailabilityResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResultInner.class);
+
+ /*
+ * Gets or sets the message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /*
+ * Gets or sets a value indicating whether [name available].
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /*
+ * Gets or sets the reason.
+ */
+ @JsonProperty(value = "reason")
+ private String reason;
+
+ /**
+ * Get the message property: Gets or sets the message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Gets or sets the message.
+ *
+ * @param message the message value to set.
+ * @return the CheckNameAvailabilityResultInner object itself.
+ */
+ public CheckNameAvailabilityResultInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the nameAvailable property: Gets or sets a value indicating whether [name available].
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set the nameAvailable property: Gets or sets a value indicating whether [name available].
+ *
+ * @param nameAvailable the nameAvailable value to set.
+ * @return the CheckNameAvailabilityResultInner object itself.
+ */
+ public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get the reason property: Gets or sets the reason.
+ *
+ * @return the reason value.
+ */
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason property: Gets or sets the reason.
+ *
+ * @param reason the reason value to set.
+ * @return the CheckNameAvailabilityResultInner object itself.
+ */
+ public CheckNameAvailabilityResultInner withReason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java
new file mode 100644
index 0000000000000..4a7f24e3601b0
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ClientDiscoveryValueForSingleApiInner.java
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay;
+import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** ClientDiscoveryValueForSingleApi Available operation details. */
+@Fluent
+public final class ClientDiscoveryValueForSingleApiInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientDiscoveryValueForSingleApiInner.class);
+
+ /*
+ * ClientDiscoveryDisplay Contains the localized display information for
+ * this particular operation
+ */
+ @JsonProperty(value = "display")
+ private ClientDiscoveryDisplay display;
+
+ /*
+ * Name of the Operation.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Indicates whether the operation is a data action
+ */
+ @JsonProperty(value = "isDataAction")
+ private Boolean isDataAction;
+
+ /*
+ * The intended executor of the operation;governs the display of the
+ * operation in the RBAC UX and the audit logs UX
+ */
+ @JsonProperty(value = "origin")
+ private String origin;
+
+ /*
+ * ClientDiscoveryForProperties Properties for the given operation.
+ */
+ @JsonProperty(value = "properties")
+ private ClientDiscoveryForProperties properties;
+
+ /**
+ * Get the display property: ClientDiscoveryDisplay Contains the localized display information for this particular
+ * operation.
+ *
+ * @return the display value.
+ */
+ public ClientDiscoveryDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: ClientDiscoveryDisplay Contains the localized display information for this particular
+ * operation.
+ *
+ * @param display the display value to set.
+ * @return the ClientDiscoveryValueForSingleApiInner object itself.
+ */
+ public ClientDiscoveryValueForSingleApiInner withDisplay(ClientDiscoveryDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the name property: Name of the Operation.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Name of the Operation.
+ *
+ * @param name the name value to set.
+ * @return the ClientDiscoveryValueForSingleApiInner object itself.
+ */
+ public ClientDiscoveryValueForSingleApiInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the ClientDiscoveryValueForSingleApiInner object itself.
+ */
+ public ClientDiscoveryValueForSingleApiInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation;governs the display of the operation in the RBAC
+ * UX and the audit logs UX.
+ *
+ * @return the origin value.
+ */
+ public String origin() {
+ return this.origin;
+ }
+
+ /**
+ * Set the origin property: The intended executor of the operation;governs the display of the operation in the RBAC
+ * UX and the audit logs UX.
+ *
+ * @param origin the origin value to set.
+ * @return the ClientDiscoveryValueForSingleApiInner object itself.
+ */
+ public ClientDiscoveryValueForSingleApiInner withOrigin(String origin) {
+ this.origin = origin;
+ return this;
+ }
+
+ /**
+ * Get the properties property: ClientDiscoveryForProperties Properties for the given operation.
+ *
+ * @return the properties value.
+ */
+ public ClientDiscoveryForProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: ClientDiscoveryForProperties Properties for the given operation.
+ *
+ * @param properties the properties value to set.
+ * @return the ClientDiscoveryValueForSingleApiInner object itself.
+ */
+ public ClientDiscoveryValueForSingleApiInner withProperties(ClientDiscoveryForProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java
new file mode 100644
index 0000000000000..60bfac685e8bc
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/DppBaseResourceInner.java
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Base resource under Microsoft.DataProtection provider namespace. */
+@Immutable
+public final class DppBaseResourceInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DppBaseResourceInner.class);
+
+ /*
+ * Resource Id represents the complete path to the resource.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * Resource name associated with the resource.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Resource type represents the complete path of the form
+ * Namespace/ResourceType/ResourceType/...
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /**
+ * Get the id property: Resource Id represents the complete path to the resource.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: Resource name associated with the resource.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: Resource type represents the complete path of the form
+ * Namespace/ResourceType/ResourceType/...
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java
new file mode 100644
index 0000000000000..fcd4ef9d68a7d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ExportJobsResultInner.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** ExportJobsResult The result for export jobs containing blob details. */
+@Immutable
+public final class ExportJobsResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportJobsResultInner.class);
+
+ /*
+ * URL of the blob into which the serialized string of list of jobs is
+ * exported.
+ */
+ @JsonProperty(value = "blobUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String blobUrl;
+
+ /*
+ * SAS key to access the blob.
+ */
+ @JsonProperty(value = "blobSasKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String blobSasKey;
+
+ /*
+ * URL of the blob into which the ExcelFile is uploaded.
+ */
+ @JsonProperty(value = "excelFileBlobUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String excelFileBlobUrl;
+
+ /*
+ * SAS key to access the ExcelFile blob.
+ */
+ @JsonProperty(value = "excelFileBlobSasKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String excelFileBlobSasKey;
+
+ /**
+ * Get the blobUrl property: URL of the blob into which the serialized string of list of jobs is exported.
+ *
+ * @return the blobUrl value.
+ */
+ public String blobUrl() {
+ return this.blobUrl;
+ }
+
+ /**
+ * Get the blobSasKey property: SAS key to access the blob.
+ *
+ * @return the blobSasKey value.
+ */
+ public String blobSasKey() {
+ return this.blobSasKey;
+ }
+
+ /**
+ * Get the excelFileBlobUrl property: URL of the blob into which the ExcelFile is uploaded.
+ *
+ * @return the excelFileBlobUrl value.
+ */
+ public String excelFileBlobUrl() {
+ return this.excelFileBlobUrl;
+ }
+
+ /**
+ * Get the excelFileBlobSasKey property: SAS key to access the ExcelFile blob.
+ *
+ * @return the excelFileBlobSasKey value.
+ */
+ public String excelFileBlobSasKey() {
+ return this.excelFileBlobSasKey;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java
new file mode 100644
index 0000000000000..0e9a3db10739d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/FeatureValidationResponseBaseInner.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponse;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** Base class for Backup Feature support. */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "objectType",
+ defaultImpl = FeatureValidationResponseBaseInner.class)
+@JsonTypeName("FeatureValidationResponseBase")
+@JsonSubTypes({@JsonSubTypes.Type(name = "FeatureValidationResponse", value = FeatureValidationResponse.class)})
+@Immutable
+public class FeatureValidationResponseBaseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(FeatureValidationResponseBaseInner.class);
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java
new file mode 100644
index 0000000000000..df6a5423476cb
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationJobExtendedInfoInner.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** OperationJobExtendedInfo Operation Job Extended Info. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
+@JsonTypeName("OperationJobExtendedInfo")
+@Fluent
+public final class OperationJobExtendedInfoInner extends OperationExtendedInfo {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationJobExtendedInfoInner.class);
+
+ /*
+ * Arm Id of the job created for this operation.
+ */
+ @JsonProperty(value = "jobId")
+ private String jobId;
+
+ /**
+ * Get the jobId property: Arm Id of the job created for this operation.
+ *
+ * @return the jobId value.
+ */
+ public String jobId() {
+ return this.jobId;
+ }
+
+ /**
+ * Set the jobId property: Arm Id of the job created for this operation.
+ *
+ * @param jobId the jobId value to set.
+ * @return the OperationJobExtendedInfoInner object itself.
+ */
+ public OperationJobExtendedInfoInner withJobId(String jobId) {
+ this.jobId = jobId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java
new file mode 100644
index 0000000000000..b7b4a59eae795
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/OperationResourceInner.java
@@ -0,0 +1,223 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** OperationResource Operation Resource. */
+@Fluent
+public final class OperationResourceInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResourceInner.class);
+
+ /*
+ * End time of the operation
+ */
+ @JsonProperty(value = "endTime")
+ private OffsetDateTime endTime;
+
+ /*
+ * Required if status == failed or status == canceled. This is the OData v4
+ * error format, used by the RPC and will go into the v2.2 Azure REST API
+ * guidelines.
+ * The full set of optional properties (e.g. inner errors / details) can be
+ * found in the "Error Response" section.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /*
+ * It should match what is used to GET the operation result
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * It must match the last segment of the "id" field, and will typically be
+ * a GUID / system generated value
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * OperationExtendedInfo End time of the operation
+ */
+ @JsonProperty(value = "properties")
+ private OperationExtendedInfo properties;
+
+ /*
+ * Start time of the operation
+ */
+ @JsonProperty(value = "startTime")
+ private OffsetDateTime startTime;
+
+ /*
+ * The status property.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /**
+ * Get the endTime property: End time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public OffsetDateTime endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: End time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withEndTime(OffsetDateTime endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the error property: Required if status == failed or status == canceled. This is the OData v4 error format,
+ * used by the RPC and will go into the v2.2 Azure REST API guidelines. The full set of optional properties (e.g.
+ * inner errors / details) can be found in the "Error Response" section.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: Required if status == failed or status == canceled. This is the OData v4 error format,
+ * used by the RPC and will go into the v2.2 Azure REST API guidelines. The full set of optional properties (e.g.
+ * inner errors / details) can be found in the "Error Response" section.
+ *
+ * @param error the error value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Get the id property: It should match what is used to GET the operation result.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: It should match what is used to GET the operation result.
+ *
+ * @param id the id value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: It must match the last segment of the "id" field, and will typically be a GUID / system
+ * generated value.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: It must match the last segment of the "id" field, and will typically be a GUID / system
+ * generated value.
+ *
+ * @param name the name value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the properties property: OperationExtendedInfo End time of the operation.
+ *
+ * @return the properties value.
+ */
+ public OperationExtendedInfo properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: OperationExtendedInfo End time of the operation.
+ *
+ * @param properties the properties value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withProperties(OperationExtendedInfo properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: Start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: Start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withStartTime(OffsetDateTime startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status property.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The status property.
+ *
+ * @param status the status value to set.
+ * @return the OperationResourceInner object itself.
+ */
+ public OperationResourceInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java
new file mode 100644
index 0000000000000..a5c68fc13b2e4
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/ResourceGuardResourceInner.java
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
+import com.azure.resourcemanager.dataprotection.models.DppTrackedResource;
+import com.azure.resourcemanager.dataprotection.models.ResourceGuard;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The ResourceGuardResource model. */
+@Fluent
+public final class ResourceGuardResourceInner extends DppTrackedResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceGuardResourceInner.class);
+
+ /*
+ * ResourceGuardResource properties
+ */
+ @JsonProperty(value = "properties")
+ private ResourceGuard properties;
+
+ /**
+ * Get the properties property: ResourceGuardResource properties.
+ *
+ * @return the properties value.
+ */
+ public ResourceGuard properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: ResourceGuardResource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the ResourceGuardResourceInner object itself.
+ */
+ public ResourceGuardResourceInner withProperties(ResourceGuard properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ResourceGuardResourceInner withEtag(String etag) {
+ super.withEtag(etag);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ResourceGuardResourceInner withIdentity(DppIdentityDetails identity) {
+ super.withIdentity(identity);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ResourceGuardResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ResourceGuardResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/package-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/models/package-info.java
new file mode 100644
index 0000000000000..a6a6163c48750
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/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) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for DataProtectionClient. Open API 2.0 Specs for Azure Data Protection
+ * service.
+ */
+package com.azure.resourcemanager.dataprotection.fluent.models;
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/package-info.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/package-info.java
new file mode 100644
index 0000000000000..8494f21366f83
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/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) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for DataProtectionClient. Open API 2.0 Specs for Azure Data Protection
+ * service.
+ */
+package com.azure.resourcemanager.dataprotection.fluent;
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupFindRestorableTimeRangesResponseResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupFindRestorableTimeRangesResponseResourceImpl.java
new file mode 100644
index 0000000000000..81e6a18226676
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupFindRestorableTimeRangesResponseResourceImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponseResource;
+
+public final class AzureBackupFindRestorableTimeRangesResponseResourceImpl
+ implements AzureBackupFindRestorableTimeRangesResponseResource {
+ private AzureBackupFindRestorableTimeRangesResponseResourceInner innerObject;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ AzureBackupFindRestorableTimeRangesResponseResourceImpl(
+ AzureBackupFindRestorableTimeRangesResponseResourceInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public AzureBackupFindRestorableTimeRangesResponse properties() {
+ return this.innerModel().properties();
+ }
+
+ public AzureBackupFindRestorableTimeRangesResponseResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupJobResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupJobResourceImpl.java
new file mode 100644
index 0000000000000..6ea2cf32c8c11
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupJobResourceImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJob;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource;
+
+public final class AzureBackupJobResourceImpl implements AzureBackupJobResource {
+ private AzureBackupJobResourceInner innerObject;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ AzureBackupJobResourceImpl(
+ AzureBackupJobResourceInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public AzureBackupJob properties() {
+ return this.innerModel().properties();
+ }
+
+ public AzureBackupJobResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupRecoveryPointResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupRecoveryPointResourceImpl.java
new file mode 100644
index 0000000000000..c6ec252b37dff
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/AzureBackupRecoveryPointResourceImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource;
+
+public final class AzureBackupRecoveryPointResourceImpl implements AzureBackupRecoveryPointResource {
+ private AzureBackupRecoveryPointResourceInner innerObject;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ AzureBackupRecoveryPointResourceImpl(
+ AzureBackupRecoveryPointResourceInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public AzureBackupRecoveryPoint properties() {
+ return this.innerModel().properties();
+ }
+
+ public AzureBackupRecoveryPointResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java
new file mode 100644
index 0000000000000..949cf0caed1bf
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstanceResourceImpl.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.BackupInstance;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource;
+import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
+import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+
+public final class BackupInstanceResourceImpl
+ implements BackupInstanceResource, BackupInstanceResource.Definition, BackupInstanceResource.Update {
+ private BackupInstanceResourceInner innerObject;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public BackupInstance properties() {
+ return this.innerModel().properties();
+ }
+
+ public BackupInstanceResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+
+ private String vaultName;
+
+ private String resourceGroupName;
+
+ private String backupInstanceName;
+
+ public BackupInstanceResourceImpl withExistingBackupVault(String vaultName, String resourceGroupName) {
+ this.vaultName = vaultName;
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public BackupInstanceResource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupInstances()
+ .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public BackupInstanceResource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupInstances()
+ .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), context);
+ return this;
+ }
+
+ BackupInstanceResourceImpl(
+ String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = new BackupInstanceResourceInner();
+ this.serviceManager = serviceManager;
+ this.backupInstanceName = name;
+ }
+
+ public BackupInstanceResourceImpl update() {
+ return this;
+ }
+
+ public BackupInstanceResource apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupInstances()
+ .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public BackupInstanceResource apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupInstances()
+ .createOrUpdate(vaultName, resourceGroupName, backupInstanceName, this.innerModel(), context);
+ return this;
+ }
+
+ BackupInstanceResourceImpl(
+ BackupInstanceResourceInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults");
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.backupInstanceName = Utils.getValueFromIdByName(innerObject.id(), "backupInstances");
+ }
+
+ public BackupInstanceResource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupInstances()
+ .getWithResponse(vaultName, resourceGroupName, backupInstanceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public BackupInstanceResource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupInstances()
+ .getWithResponse(vaultName, resourceGroupName, backupInstanceName, context)
+ .getValue();
+ return this;
+ }
+
+ public OperationJobExtendedInfo adhocBackup(TriggerBackupRequest parameters) {
+ return serviceManager
+ .backupInstances()
+ .adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters);
+ }
+
+ public OperationJobExtendedInfo adhocBackup(TriggerBackupRequest parameters, Context context) {
+ return serviceManager
+ .backupInstances()
+ .adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ }
+
+ public void triggerRehydrate(AzureBackupRehydrationRequest parameters) {
+ serviceManager.backupInstances().triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters);
+ }
+
+ public void triggerRehydrate(AzureBackupRehydrationRequest parameters, Context context) {
+ serviceManager
+ .backupInstances()
+ .triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters, context);
+ }
+
+ public OperationJobExtendedInfo triggerRestore(AzureBackupRestoreRequest parameters) {
+ return serviceManager
+ .backupInstances()
+ .triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters);
+ }
+
+ public OperationJobExtendedInfo triggerRestore(AzureBackupRestoreRequest parameters, Context context) {
+ return serviceManager
+ .backupInstances()
+ .triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ }
+
+ public OperationJobExtendedInfo validateForRestore(ValidateRestoreRequestObject parameters) {
+ return serviceManager
+ .backupInstances()
+ .validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters);
+ }
+
+ public OperationJobExtendedInfo validateForRestore(ValidateRestoreRequestObject parameters, Context context) {
+ return serviceManager
+ .backupInstances()
+ .validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ }
+
+ public BackupInstanceResourceImpl withProperties(BackupInstance properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java
new file mode 100644
index 0000000000000..cd8b759aba49e
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesClientImpl.java
@@ -0,0 +1,2762 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceResourceList;
+import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BackupInstancesClient. */
+public final class BackupInstancesClientImpl implements BackupInstancesClient {
+ private final ClientLogger logger = new ClientLogger(BackupInstancesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BackupInstancesService service;
+
+ /** The service client containing this operation class. */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of BackupInstancesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupInstancesClientImpl(DataProtectionClientImpl client) {
+ this.service =
+ RestProxy.create(BackupInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientBackupInstances to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ private interface BackupInstancesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupInstanceName") String backupInstanceName,
+ @BodyParam("application/json") BackupInstanceResourceInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupInstanceName") String backupInstanceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> adhocBackup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupInstanceName") String backupInstanceName,
+ @BodyParam("application/json") TriggerBackupRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/validateForBackup")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> validateForBackup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ValidateForBackupRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> triggerRehydrate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("backupInstanceName") String backupInstanceName,
+ @BodyParam("application/json") AzureBackupRehydrationRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> triggerRestore(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupInstanceName") String backupInstanceName,
+ @BodyParam("application/json") AzureBackupRestoreRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> validateForRestore(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupInstanceName") String backupInstanceName,
+ @BodyParam("application/json") ValidateRestoreRequestObject parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String vaultName, String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String vaultName, String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String vaultName, String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(vaultName, resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String vaultName, String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(vaultName, resourceGroupName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String vaultName, String resourceGroupName) {
+ return new PagedIterable<>(listAsync(vaultName, resourceGroupName));
+ }
+
+ /**
+ * Gets a backup instances belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instances belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String vaultName, String resourceGroupName, Context context) {
+ return new PagedIterable<>(listAsync(vaultName, resourceGroupName, context));
+ }
+
+ /**
+ * Gets a backup instance with name in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance with name in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a backup instance with name in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance with name in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a backup instance with name in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance with name in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName) {
+ return getWithResponseAsync(vaultName, resourceGroupName, backupInstanceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a backup instance with name in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance with name in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupInstanceResourceInner get(String vaultName, String resourceGroupName, String backupInstanceName) {
+ return getAsync(vaultName, resourceGroupName, backupInstanceName).block();
+ }
+
+ /**
+ * Gets a backup instance with name in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a backup instance with name in a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ return getWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, context).block();
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ BackupInstanceResourceInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, BackupInstanceResourceInner> beginCreateOrUpdateAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ BackupInstanceResourceInner.class,
+ BackupInstanceResourceInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, BackupInstanceResourceInner> beginCreateOrUpdateAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ BackupInstanceResourceInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ BackupInstanceResourceInner.class,
+ BackupInstanceResourceInner.class,
+ context);
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate(
+ String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) {
+ return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, BackupInstanceResourceInner> beginCreateOrUpdate(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ BackupInstanceResourceInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) {
+ return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ BackupInstanceResourceInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupInstanceResourceInner createOrUpdate(
+ String vaultName, String resourceGroupName, String backupInstanceName, BackupInstanceResourceInner parameters) {
+ return createOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block();
+ }
+
+ /**
+ * Create or update a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupInstanceResourceInner createOrUpdate(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ BackupInstanceResourceInner parameters,
+ Context context) {
+ return createOrUpdateAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block();
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName) {
+ Mono>> mono =
+ deleteWithResponseAsync(vaultName, resourceGroupName, backupInstanceName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String vaultName, String resourceGroupName, String backupInstanceName) {
+ return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName).getSyncPoller();
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String vaultName, String resourceGroupName, String backupInstanceName) {
+ return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ return beginDeleteAsync(vaultName, resourceGroupName, backupInstanceName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String vaultName, String resourceGroupName, String backupInstanceName) {
+ deleteAsync(vaultName, resourceGroupName, backupInstanceName).block();
+ }
+
+ /**
+ * Delete a backup instance in a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ deleteAsync(vaultName, resourceGroupName, backupInstanceName, context).block();
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> adhocBackupWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .adhocBackup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> adhocBackupWithResponseAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .adhocBackup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner> beginAdhocBackupAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) {
+ Mono>> mono =
+ adhocBackupWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner> beginAdhocBackupAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ adhocBackupWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ context);
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) {
+ return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginAdhocBackup(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context) {
+ return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono adhocBackupAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) {
+ return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono adhocBackupAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context) {
+ return beginAdhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner adhocBackup(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) {
+ return adhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block();
+ }
+
+ /**
+ * Trigger adhoc backup.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner adhocBackup(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context) {
+ return adhocBackupAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block();
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> validateForBackupWithResponseAsync(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .validateForBackup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> validateForBackupWithResponseAsync(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .validateForBackup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner>
+ beginValidateForBackupAsync(String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) {
+ Mono>> mono =
+ validateForBackupWithResponseAsync(vaultName, resourceGroupName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner>
+ beginValidateForBackupAsync(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ validateForBackupWithResponseAsync(vaultName, resourceGroupName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ context);
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) {
+ return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginValidateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) {
+ return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono validateForBackupAsync(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) {
+ return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono validateForBackupAsync(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) {
+ return beginValidateForBackupAsync(vaultName, resourceGroupName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner validateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) {
+ return validateForBackupAsync(vaultName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Validate whether adhoc backup will be successful or not.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner validateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) {
+ return validateForBackupAsync(vaultName, resourceGroupName, parameters, context).block();
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerRehydrateWithResponseAsync(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .triggerRehydrate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ vaultName,
+ backupInstanceName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerRehydrateWithResponseAsync(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .triggerRehydrate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ vaultName,
+ backupInstanceName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginTriggerRehydrateAsync(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters) {
+ Mono>> mono =
+ triggerRehydrateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginTriggerRehydrateAsync(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ triggerRehydrateWithResponseAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginTriggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters) {
+ return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters).getSyncPoller();
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginTriggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context) {
+ return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerRehydrateAsync(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters) {
+ return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerRehydrateAsync(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context) {
+ return beginTriggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void triggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters) {
+ triggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters).block();
+ }
+
+ /**
+ * rehydrate recovery point for restore for a BackupInstance.
+ *
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param vaultName The name of the backup vault.
+ * @param backupInstanceName The backupInstanceName parameter.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void triggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context) {
+ triggerRehydrateAsync(resourceGroupName, vaultName, backupInstanceName, parameters, context).block();
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerRestoreWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .triggerRestore(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerRestoreWithResponseAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .triggerRestore(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner>
+ beginTriggerRestoreAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters) {
+ Mono>> mono =
+ triggerRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner>
+ beginTriggerRestoreAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ triggerRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ context);
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore(
+ String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) {
+ return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginTriggerRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context) {
+ return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerRestoreAsync(
+ String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) {
+ return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerRestoreAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context) {
+ return beginTriggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner triggerRestore(
+ String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) {
+ return triggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block();
+ }
+
+ /**
+ * Triggers restore for a BackupInstance.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner triggerRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context) {
+ return triggerRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block();
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> validateForRestoreWithResponseAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .validateForRestore(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> validateForRestoreWithResponseAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupInstanceName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .validateForRestore(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupInstanceName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner>
+ beginValidateForRestoreAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters) {
+ Mono>> mono =
+ validateForRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationJobExtendedInfoInner>
+ beginValidateForRestoreAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ validateForRestoreWithResponseAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationJobExtendedInfoInner.class,
+ OperationJobExtendedInfoInner.class,
+ context);
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters) {
+ return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationJobExtendedInfoInner> beginValidateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context) {
+ return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono validateForRestoreAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters) {
+ return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono validateForRestoreAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context) {
+ return beginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner validateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters) {
+ return validateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters).block();
+ }
+
+ /**
+ * Validates if Restore can be triggered for a DataSource.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupInstanceName The name of the backup instance.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operationJobExtendedInfo.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationJobExtendedInfoInner validateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context) {
+ return validateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, parameters, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java
new file mode 100644
index 0000000000000..d4380187ee44f
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java
@@ -0,0 +1,323 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource;
+import com.azure.resourcemanager.dataprotection.models.BackupInstances;
+import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
+import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class BackupInstancesImpl implements BackupInstances {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupInstancesImpl.class);
+
+ private final BackupInstancesClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupInstancesImpl(
+ BackupInstancesClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String vaultName, String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().list(vaultName, resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String vaultName, String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(vaultName, resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ public BackupInstanceResource get(String vaultName, String resourceGroupName, String backupInstanceName) {
+ BackupInstanceResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName, backupInstanceName);
+ if (inner != null) {
+ return new BackupInstanceResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(vaultName, resourceGroupName, backupInstanceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BackupInstanceResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String vaultName, String resourceGroupName, String backupInstanceName) {
+ this.serviceClient().delete(vaultName, resourceGroupName, backupInstanceName);
+ }
+
+ public void delete(String vaultName, String resourceGroupName, String backupInstanceName, Context context) {
+ this.serviceClient().delete(vaultName, resourceGroupName, backupInstanceName, context);
+ }
+
+ public OperationJobExtendedInfo adhocBackup(
+ String vaultName, String resourceGroupName, String backupInstanceName, TriggerBackupRequest parameters) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo adhocBackup(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ TriggerBackupRequest parameters,
+ Context context) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().adhocBackup(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo validateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().validateForBackup(vaultName, resourceGroupName, parameters);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo validateForBackup(
+ String vaultName, String resourceGroupName, ValidateForBackupRequest parameters, Context context) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().validateForBackup(vaultName, resourceGroupName, parameters, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void triggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters) {
+ this.serviceClient().triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters);
+ }
+
+ public void triggerRehydrate(
+ String resourceGroupName,
+ String vaultName,
+ String backupInstanceName,
+ AzureBackupRehydrationRequest parameters,
+ Context context) {
+ this.serviceClient().triggerRehydrate(resourceGroupName, vaultName, backupInstanceName, parameters, context);
+ }
+
+ public OperationJobExtendedInfo triggerRestore(
+ String vaultName, String resourceGroupName, String backupInstanceName, AzureBackupRestoreRequest parameters) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo triggerRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ AzureBackupRestoreRequest parameters,
+ Context context) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().triggerRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo validateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo validateForRestore(
+ String vaultName,
+ String resourceGroupName,
+ String backupInstanceName,
+ ValidateRestoreRequestObject parameters,
+ Context context) {
+ OperationJobExtendedInfoInner inner =
+ this
+ .serviceClient()
+ .validateForRestore(vaultName, resourceGroupName, backupInstanceName, parameters, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public BackupInstanceResource getById(String id) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ if (backupInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id)));
+ }
+ return this.getWithResponse(vaultName, resourceGroupName, backupInstanceName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ if (backupInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id)));
+ }
+ return this.getWithResponse(vaultName, resourceGroupName, backupInstanceName, context);
+ }
+
+ public void deleteById(String id) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ if (backupInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id)));
+ }
+ this.delete(vaultName, resourceGroupName, backupInstanceName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupInstanceName = Utils.getValueFromIdByName(id, "backupInstances");
+ if (backupInstanceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupInstances'.", id)));
+ }
+ this.delete(vaultName, resourceGroupName, backupInstanceName, context);
+ }
+
+ private BackupInstancesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+
+ public BackupInstanceResourceImpl define(String name) {
+ return new BackupInstanceResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java
new file mode 100644
index 0000000000000..745ec656b5f53
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesClientImpl.java
@@ -0,0 +1,903 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResourceList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BackupPoliciesClient. */
+public final class BackupPoliciesClientImpl implements BackupPoliciesClient {
+ private final ClientLogger logger = new ClientLogger(BackupPoliciesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BackupPoliciesService service;
+
+ /** The service client containing this operation class. */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of BackupPoliciesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupPoliciesClientImpl(DataProtectionClientImpl client) {
+ this.service =
+ RestProxy.create(BackupPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientBackupPolicies to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ private interface BackupPoliciesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupPolicies")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupPolicyName") String backupPolicyName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupPolicyName") String backupPolicyName,
+ @BodyParam("application/json") BaseBackupPolicyResourceInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("backupPolicyName") String backupPolicyName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String vaultName, String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String vaultName, String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String vaultName, String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(vaultName, resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String vaultName, String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(vaultName, resourceGroupName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String vaultName, String resourceGroupName) {
+ return new PagedIterable<>(listAsync(vaultName, resourceGroupName));
+ }
+
+ /**
+ * Returns list of backup policies belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String vaultName, String resourceGroupName, Context context) {
+ return new PagedIterable<>(listAsync(vaultName, resourceGroupName, context));
+ }
+
+ /**
+ * Gets a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 backup policy belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupPolicyName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupPolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupPolicyName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupPolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupPolicyName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 backup policy belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String vaultName, String resourceGroupName, String backupPolicyName) {
+ return getWithResponseAsync(vaultName, resourceGroupName, backupPolicyName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 backup policy belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BaseBackupPolicyResourceInner get(String vaultName, String resourceGroupName, String backupPolicyName) {
+ return getAsync(vaultName, resourceGroupName, backupPolicyName).block();
+ }
+
+ /**
+ * Gets a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 a backup policy belonging to a backup vault.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context) {
+ return getWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, context).block();
+ }
+
+ /**
+ * Creates or Updates a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName Name of the policy.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupPolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupPolicyName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or Updates a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName Name of the policy.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String vaultName,
+ String resourceGroupName,
+ String backupPolicyName,
+ BaseBackupPolicyResourceInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupPolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupPolicyName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or Updates a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName Name of the policy.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) {
+ return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Creates or Updates a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName Name of the policy.
+ * @param parameters Request body for operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BaseBackupPolicyResourceInner createOrUpdate(
+ String vaultName, String resourceGroupName, String backupPolicyName, BaseBackupPolicyResourceInner parameters) {
+ return createOrUpdateAsync(vaultName, resourceGroupName, backupPolicyName, parameters).block();
+ }
+
+ /**
+ * Creates or Updates a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName Name of the policy.
+ * @param parameters Request body for operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String vaultName,
+ String resourceGroupName,
+ String backupPolicyName,
+ BaseBackupPolicyResourceInner parameters,
+ Context context) {
+ return createOrUpdateWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, parameters, context)
+ .block();
+ }
+
+ /**
+ * Deletes a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupPolicyName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupPolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupPolicyName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (backupPolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ backupPolicyName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String vaultName, String resourceGroupName, String backupPolicyName) {
+ return deleteWithResponseAsync(vaultName, resourceGroupName, backupPolicyName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 delete(String vaultName, String resourceGroupName, String backupPolicyName) {
+ deleteAsync(vaultName, resourceGroupName, backupPolicyName).block();
+ }
+
+ /**
+ * Deletes a backup policy belonging to a backup vault.
+ *
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @param backupPolicyName The backupPolicyName 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context) {
+ return deleteWithResponseAsync(vaultName, resourceGroupName, backupPolicyName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return baseBackupPolicyResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java
new file mode 100644
index 0000000000000..be3061c0f1359
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupPoliciesImpl.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupPolicies;
+import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class BackupPoliciesImpl implements BackupPolicies {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupPoliciesImpl.class);
+
+ private final BackupPoliciesClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupPoliciesImpl(
+ BackupPoliciesClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String vaultName, String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().list(vaultName, resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String vaultName, String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(vaultName, resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new BaseBackupPolicyResourceImpl(inner1, this.manager()));
+ }
+
+ public BaseBackupPolicyResource get(String vaultName, String resourceGroupName, String backupPolicyName) {
+ BaseBackupPolicyResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName, backupPolicyName);
+ if (inner != null) {
+ return new BaseBackupPolicyResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(vaultName, resourceGroupName, backupPolicyName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BaseBackupPolicyResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String vaultName, String resourceGroupName, String backupPolicyName) {
+ this.serviceClient().delete(vaultName, resourceGroupName, backupPolicyName);
+ }
+
+ public Response deleteWithResponse(
+ String vaultName, String resourceGroupName, String backupPolicyName, Context context) {
+ return this.serviceClient().deleteWithResponse(vaultName, resourceGroupName, backupPolicyName, context);
+ }
+
+ public BaseBackupPolicyResource getById(String id) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ if (backupPolicyName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id)));
+ }
+ return this.getWithResponse(vaultName, resourceGroupName, backupPolicyName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ if (backupPolicyName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id)));
+ }
+ return this.getWithResponse(vaultName, resourceGroupName, backupPolicyName, context);
+ }
+
+ public void deleteById(String id) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ if (backupPolicyName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id)));
+ }
+ this.deleteWithResponse(vaultName, resourceGroupName, backupPolicyName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String vaultName = Utils.getValueFromIdByName(id, "backupVaults");
+ if (vaultName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'backupVaults'.", id)));
+ }
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String backupPolicyName = Utils.getValueFromIdByName(id, "backupPolicies");
+ if (backupPolicyName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'backupPolicies'.", id)));
+ }
+ return this.deleteWithResponse(vaultName, resourceGroupName, backupPolicyName, context);
+ }
+
+ private BackupPoliciesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+
+ public BaseBackupPolicyResourceImpl define(String name) {
+ return new BaseBackupPolicyResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java
new file mode 100644
index 0000000000000..9cb08e1eb523e
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsClientImpl.java
@@ -0,0 +1,227 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BackupVaultOperationResultsClient. */
+public final class BackupVaultOperationResultsClientImpl implements BackupVaultOperationResultsClient {
+ private final ClientLogger logger = new ClientLogger(BackupVaultOperationResultsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BackupVaultOperationResultsService service;
+
+ /** The service client containing this operation class. */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of BackupVaultOperationResultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupVaultOperationResultsClientImpl(DataProtectionClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ BackupVaultOperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientBackupVaultOperationResults to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ private interface BackupVaultOperationResultsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}/operationResults/{operationId}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("operationId") String operationId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getWithResponseAsync(
+ String vaultName, String resourceGroupName, String operationId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ operationId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getWithResponseAsync(
+ String vaultName, String resourceGroupName, String operationId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (operationId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ vaultName,
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ operationId,
+ accept,
+ context);
+ }
+
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String vaultName, String resourceGroupName, String operationId) {
+ return getWithResponseAsync(vaultName, resourceGroupName, operationId)
+ .flatMap(
+ (BackupVaultOperationResultsGetResponse res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupVaultResourceInner get(String vaultName, String resourceGroupName, String operationId) {
+ return getAsync(vaultName, resourceGroupName, operationId).block();
+ }
+
+ /**
+ * @param vaultName The name of the backup vault.
+ * @param resourceGroupName The name of the resource group where the backup vault is present.
+ * @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 backupVault Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public BackupVaultOperationResultsGetResponse getWithResponse(
+ String vaultName, String resourceGroupName, String operationId, Context context) {
+ return getWithResponseAsync(vaultName, resourceGroupName, operationId, context).block();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsImpl.java
new file mode 100644
index 0000000000000..2046845383f6d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultOperationResultsImpl.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResults;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultOperationResultsGetResponse;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class BackupVaultOperationResultsImpl implements BackupVaultOperationResults {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupVaultOperationResultsImpl.class);
+
+ private final BackupVaultOperationResultsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupVaultOperationResultsImpl(
+ BackupVaultOperationResultsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public BackupVaultResource get(String vaultName, String resourceGroupName, String operationId) {
+ BackupVaultResourceInner inner = this.serviceClient().get(vaultName, resourceGroupName, operationId);
+ if (inner != null) {
+ return new BackupVaultResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String vaultName, String resourceGroupName, String operationId, Context context) {
+ BackupVaultOperationResultsGetResponse inner =
+ this.serviceClient().getWithResponse(vaultName, resourceGroupName, operationId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new BackupVaultResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private BackupVaultOperationResultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultResourceImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultResourceImpl.java
new file mode 100644
index 0000000000000..866824bb7241f
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultResourceImpl.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupVault;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
+import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
+import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput;
+import java.util.Collections;
+import java.util.Map;
+
+public final class BackupVaultResourceImpl
+ implements BackupVaultResource, BackupVaultResource.Definition, BackupVaultResource.Update {
+ private BackupVaultResourceInner innerObject;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public 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 String etag() {
+ return this.innerModel().etag();
+ }
+
+ public DppIdentityDetails identity() {
+ return this.innerModel().identity();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public BackupVault properties() {
+ return this.innerModel().properties();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public BackupVaultResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.dataprotection.DataProtectionManager manager() {
+ return this.serviceManager;
+ }
+
+ private String vaultName;
+
+ private String resourceGroupName;
+
+ private PatchResourceRequestInput updateParameters;
+
+ public BackupVaultResourceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public BackupVaultResource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupVaults()
+ .createOrUpdate(vaultName, resourceGroupName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public BackupVaultResource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupVaults()
+ .createOrUpdate(vaultName, resourceGroupName, this.innerModel(), context);
+ return this;
+ }
+
+ BackupVaultResourceImpl(
+ String name, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = new BackupVaultResourceInner();
+ this.serviceManager = serviceManager;
+ this.vaultName = name;
+ }
+
+ public BackupVaultResourceImpl update() {
+ this.updateParameters = new PatchResourceRequestInput();
+ return this;
+ }
+
+ public BackupVaultResource apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupVaults()
+ .update(vaultName, resourceGroupName, updateParameters, Context.NONE);
+ return this;
+ }
+
+ public BackupVaultResource apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupVaults()
+ .update(vaultName, resourceGroupName, updateParameters, context);
+ return this;
+ }
+
+ BackupVaultResourceImpl(
+ BackupVaultResourceInner innerObject,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.vaultName = Utils.getValueFromIdByName(innerObject.id(), "backupVaults");
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ }
+
+ public BackupVaultResource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupVaults()
+ .getByResourceGroupWithResponse(resourceGroupName, vaultName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public BackupVaultResource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getBackupVaults()
+ .getByResourceGroupWithResponse(resourceGroupName, vaultName, context)
+ .getValue();
+ return this;
+ }
+
+ public BackupVaultResourceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public BackupVaultResourceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public BackupVaultResourceImpl withProperties(BackupVault properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public BackupVaultResourceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public BackupVaultResourceImpl withEtag(String etag) {
+ this.innerModel().withEtag(etag);
+ return this;
+ }
+
+ public BackupVaultResourceImpl withIdentity(DppIdentityDetails identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateParameters.withIdentity(identity);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java
new file mode 100644
index 0000000000000..ad1be50ea35cf
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupVaultsClientImpl.java
@@ -0,0 +1,1641 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.dataprotection.fluent.BackupVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
+import com.azure.resourcemanager.dataprotection.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.dataprotection.models.BackupVaultResourceList;
+import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest;
+import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in BackupVaultsClient. */
+public final class BackupVaultsClientImpl implements BackupVaultsClient {
+ private final ClientLogger logger = new ClientLogger(BackupVaultsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final BackupVaultsService service;
+
+ /** The service client containing this operation class. */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of BackupVaultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ BackupVaultsClientImpl(DataProtectionClientImpl client) {
+ this.service =
+ RestProxy.create(BackupVaultsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientBackupVaults to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ private interface BackupVaultsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") BackupVaultResourceInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/backupVaults/{vaultName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") PatchResourceRequestInput parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection"
+ + "/locations/{location}/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkNameAvailability(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("location") String location,
+ @BodyParam("application/json") CheckNameAvailabilityRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getInSubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getInResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns resource collection belonging to a subscription.
+ *
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns resource collection belonging to a subscription.
+ *
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Returns resource collection belonging to a subscription.
+ *
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> getInSubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Returns resource collection belonging to a subscription.
+ *
+ * @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 backupVaultResourceList.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux