list(String resourceId, Context context) {
+ return new PagedIterable<>(listAsync(resourceId, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return backupInstanceResourceList along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java
new file mode 100644
index 000000000000..cafd38d8058a
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesExtensionRoutingsImpl.java
@@ -0,0 +1,46 @@
+// 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.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.BackupInstanceResourceInner;
+import com.azure.resourcemanager.dataprotection.models.BackupInstanceResource;
+import com.azure.resourcemanager.dataprotection.models.BackupInstancesExtensionRoutings;
+
+public final class BackupInstancesExtensionRoutingsImpl implements BackupInstancesExtensionRoutings {
+ private static final ClientLogger LOGGER = new ClientLogger(BackupInstancesExtensionRoutingsImpl.class);
+
+ private final BackupInstancesExtensionRoutingsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public BackupInstancesExtensionRoutingsImpl(
+ BackupInstancesExtensionRoutingsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceId) {
+ PagedIterable inner = this.serviceClient().list(resourceId);
+ return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceId, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceId, context);
+ return Utils.mapPage(inner, inner1 -> new BackupInstanceResourceImpl(inner1, this.manager()));
+ }
+
+ private BackupInstancesExtensionRoutingsClient 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/BackupInstancesImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/BackupInstancesImpl.java
index e57967c90d92..98b4ec0a3d20 100644
--- 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
@@ -16,9 +16,11 @@
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.CrossRegionRestoreRequestObject;
import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest;
import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
+import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject;
import com.azure.resourcemanager.dataprotection.models.ValidateForBackupRequest;
import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
@@ -158,6 +160,53 @@ public BackupInstanceResource getBackupInstanceOperationResult(
}
}
+ public OperationJobExtendedInfo triggerCrossRegionRestore(
+ String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().triggerCrossRegionRestore(resourceGroupName, location, parameters);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo triggerCrossRegionRestore(
+ String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters, Context context) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().triggerCrossRegionRestore(resourceGroupName, location, parameters, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo validateCrossRegionRestore(
+ String resourceGroupName, String location, ValidateCrossRegionRestoreRequestObject parameters) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().validateCrossRegionRestore(resourceGroupName, location, parameters);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationJobExtendedInfo validateCrossRegionRestore(
+ String resourceGroupName,
+ String location,
+ ValidateCrossRegionRestoreRequestObject parameters,
+ Context context) {
+ OperationJobExtendedInfoInner inner =
+ this.serviceClient().validateCrossRegionRestore(resourceGroupName, location, parameters, context);
+ if (inner != null) {
+ return new OperationJobExtendedInfoImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public void triggerRehydrate(
String resourceGroupName,
String vaultName,
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsClientImpl.java
new file mode 100644
index 000000000000..e0f31b949c54
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsClientImpl.java
@@ -0,0 +1,233 @@
+// 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.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dataprotection.fluent.CrossRegionRestoreJobsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in CrossRegionRestoreJobsClient. */
+public final class CrossRegionRestoreJobsClientImpl implements CrossRegionRestoreJobsClient {
+ /** The proxy service used to perform REST calls. */
+ private final CrossRegionRestoreJobsService service;
+
+ /** The service client containing this operation class. */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of CrossRegionRestoreJobsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CrossRegionRestoreJobsClientImpl(DataProtectionClientImpl client) {
+ this.service =
+ RestProxy
+ .create(CrossRegionRestoreJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientCrossRegionRestoreJobs to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ public interface CrossRegionRestoreJobsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchCrossRegionRestoreJob")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("location") String location,
+ @BodyParam("application/json") CrossRegionRestoreJobRequest parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackup Job Resource Class along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ location,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackup Job Resource Class along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ location,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackup Job Resource Class on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters) {
+ return getWithResponseAsync(resourceGroupName, location, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackup Job Resource Class along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters, Context context) {
+ return getWithResponseAsync(resourceGroupName, location, parameters, context).block();
+ }
+
+ /**
+ * The get operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackup Job Resource Class.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureBackupJobResourceInner get(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters) {
+ return getWithResponse(resourceGroupName, location, parameters, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsImpl.java
new file mode 100644
index 000000000000..45cc688fcd56
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsImpl.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.CrossRegionRestoreJobsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobs;
+
+public final class CrossRegionRestoreJobsImpl implements CrossRegionRestoreJobs {
+ private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreJobsImpl.class);
+
+ private final CrossRegionRestoreJobsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public CrossRegionRestoreJobsImpl(
+ CrossRegionRestoreJobsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, location, parameters, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AzureBackupJobResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AzureBackupJobResource get(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters) {
+ AzureBackupJobResourceInner inner = this.serviceClient().get(resourceGroupName, location, parameters);
+ if (inner != null) {
+ return new AzureBackupJobResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private CrossRegionRestoreJobsClient 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/CrossRegionRestoreJobsOperationsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsOperationsClientImpl.java
new file mode 100644
index 000000000000..e46d79054cb8
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsOperationsClientImpl.java
@@ -0,0 +1,370 @@
+// 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.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.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dataprotection.fluent.CrossRegionRestoreJobsOperationsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResourceList;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CrossRegionRestoreJobsOperationsClient.
+ */
+public final class CrossRegionRestoreJobsOperationsClientImpl implements CrossRegionRestoreJobsOperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final CrossRegionRestoreJobsOperationsService service;
+
+ /** The service client containing this operation class. */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of CrossRegionRestoreJobsOperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CrossRegionRestoreJobsOperationsClientImpl(DataProtectionClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ CrossRegionRestoreJobsOperationsService.class,
+ client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientCrossRegionRestoreJobsOperations to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ public interface CrossRegionRestoreJobsOperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchCrossRegionRestoreJobs")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("location") String location,
+ @BodyParam("application/json") CrossRegionRestoreJobsRequest 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);
+ }
+
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ location,
+ parameters,
+ 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()));
+ }
+
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest 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 (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ location,
+ parameters,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, location, parameters),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, location, parameters, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters) {
+ return new PagedIterable<>(listAsync(resourceGroupName, location, parameters));
+ }
+
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, location, parameters, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of AzureBackup Job resources along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsOperationsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsOperationsImpl.java
new file mode 100644
index 000000000000..c3c1b2bd91c7
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/CrossRegionRestoreJobsOperationsImpl.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.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.CrossRegionRestoreJobsOperationsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsOperations;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest;
+
+public final class CrossRegionRestoreJobsOperationsImpl implements CrossRegionRestoreJobsOperations {
+ private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreJobsOperationsImpl.class);
+
+ private final CrossRegionRestoreJobsOperationsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public CrossRegionRestoreJobsOperationsImpl(
+ CrossRegionRestoreJobsOperationsClient innerClient,
+ com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, location, parameters);
+ return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, location, parameters, context);
+ return Utils.mapPage(inner, inner1 -> new AzureBackupJobResourceImpl(inner1, this.manager()));
+ }
+
+ private CrossRegionRestoreJobsOperationsClient 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/DataProtectionClientBuilder.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java
index 4fcf7d3886f2..56a02e0bba65 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientBuilder.java
@@ -137,7 +137,7 @@ public DataProtectionClientImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java
index 6269ee984cee..d49780deabae 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/DataProtectionClientImpl.java
@@ -23,9 +23,12 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesClient;
+import com.azure.resourcemanager.dataprotection.fluent.BackupInstancesExtensionRoutingsClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupPoliciesClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupVaultOperationResultsClient;
import com.azure.resourcemanager.dataprotection.fluent.BackupVaultsClient;
+import com.azure.resourcemanager.dataprotection.fluent.CrossRegionRestoreJobsClient;
+import com.azure.resourcemanager.dataprotection.fluent.CrossRegionRestoreJobsOperationsClient;
import com.azure.resourcemanager.dataprotection.fluent.DataProtectionClient;
import com.azure.resourcemanager.dataprotection.fluent.DataProtectionOperationsClient;
import com.azure.resourcemanager.dataprotection.fluent.DataProtectionsClient;
@@ -41,6 +44,7 @@
import com.azure.resourcemanager.dataprotection.fluent.RecoveryPointsClient;
import com.azure.resourcemanager.dataprotection.fluent.ResourceGuardsClient;
import com.azure.resourcemanager.dataprotection.fluent.RestorableTimeRangesClient;
+import com.azure.resourcemanager.dataprotection.fluent.SecondaryRPsClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -257,6 +261,54 @@ public RecoveryPointsClient getRecoveryPoints() {
return this.recoveryPoints;
}
+ /** The SecondaryRPsClient object to access its operations. */
+ private final SecondaryRPsClient secondaryRPs;
+
+ /**
+ * Gets the SecondaryRPsClient object to access its operations.
+ *
+ * @return the SecondaryRPsClient object.
+ */
+ public SecondaryRPsClient getSecondaryRPs() {
+ return this.secondaryRPs;
+ }
+
+ /** The CrossRegionRestoreJobsClient object to access its operations. */
+ private final CrossRegionRestoreJobsClient crossRegionRestoreJobs;
+
+ /**
+ * Gets the CrossRegionRestoreJobsClient object to access its operations.
+ *
+ * @return the CrossRegionRestoreJobsClient object.
+ */
+ public CrossRegionRestoreJobsClient getCrossRegionRestoreJobs() {
+ return this.crossRegionRestoreJobs;
+ }
+
+ /** The CrossRegionRestoreJobsOperationsClient object to access its operations. */
+ private final CrossRegionRestoreJobsOperationsClient crossRegionRestoreJobsOperations;
+
+ /**
+ * Gets the CrossRegionRestoreJobsOperationsClient object to access its operations.
+ *
+ * @return the CrossRegionRestoreJobsOperationsClient object.
+ */
+ public CrossRegionRestoreJobsOperationsClient getCrossRegionRestoreJobsOperations() {
+ return this.crossRegionRestoreJobsOperations;
+ }
+
+ /** The BackupInstancesExtensionRoutingsClient object to access its operations. */
+ private final BackupInstancesExtensionRoutingsClient backupInstancesExtensionRoutings;
+
+ /**
+ * Gets the BackupInstancesExtensionRoutingsClient object to access its operations.
+ *
+ * @return the BackupInstancesExtensionRoutingsClient object.
+ */
+ public BackupInstancesExtensionRoutingsClient getBackupInstancesExtensionRoutings() {
+ return this.backupInstancesExtensionRoutings;
+ }
+
/** The JobsClient object to access its operations. */
private final JobsClient jobs;
@@ -363,7 +415,7 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-05-01";
+ this.apiVersion = "2023-06-01-preview";
this.backupVaults = new BackupVaultsClientImpl(this);
this.operationResults = new OperationResultsClientImpl(this);
this.operationStatus = new OperationStatusClientImpl(this);
@@ -375,6 +427,10 @@ public DppResourceGuardProxiesClient getDppResourceGuardProxies() {
this.backupPolicies = new BackupPoliciesClientImpl(this);
this.backupInstances = new BackupInstancesClientImpl(this);
this.recoveryPoints = new RecoveryPointsClientImpl(this);
+ this.secondaryRPs = new SecondaryRPsClientImpl(this);
+ this.crossRegionRestoreJobs = new CrossRegionRestoreJobsClientImpl(this);
+ this.crossRegionRestoreJobsOperations = new CrossRegionRestoreJobsOperationsClientImpl(this);
+ this.backupInstancesExtensionRoutings = new BackupInstancesExtensionRoutingsClientImpl(this);
this.jobs = new JobsClientImpl(this);
this.restorableTimeRanges = new RestorableTimeRangesClientImpl(this);
this.exportJobs = new ExportJobsClientImpl(this);
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java
index d51c7a5da666..cf6a802b0a4d 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsClientImpl.java
@@ -11,6 +11,7 @@
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
@@ -23,11 +24,17 @@
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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.dataprotection.fluent.JobsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobProgressUrlInner;
import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResourceList;
+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 JobsClient. */
@@ -84,6 +91,36 @@ Mono> get(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}/triggerCancel")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> triggerCancel(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("jobId") String jobId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}/generateProgressUrl")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> generateProgressUrl(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("vaultName") String vaultName,
+ @PathParam("jobId") String jobId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -431,6 +468,414 @@ public AzureBackupJobResourceInner get(String resourceGroupName, String vaultNam
return getWithResponse(resourceGroupName, vaultName, jobId, Context.NONE).getValue();
}
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerCancelWithResponseAsync(
+ String resourceGroupName, String vaultName, String jobId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (jobId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .triggerCancel(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ jobId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> triggerCancelWithResponseAsync(
+ String resourceGroupName, String vaultName, String jobId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (jobId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .triggerCancel(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ jobId,
+ accept,
+ context);
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginTriggerCancelAsync(
+ String resourceGroupName, String vaultName, String jobId) {
+ Mono>> mono = triggerCancelWithResponseAsync(resourceGroupName, vaultName, jobId);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginTriggerCancelAsync(
+ String resourceGroupName, String vaultName, String jobId, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ triggerCancelWithResponseAsync(resourceGroupName, vaultName, jobId, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginTriggerCancel(
+ String resourceGroupName, String vaultName, String jobId) {
+ return this.beginTriggerCancelAsync(resourceGroupName, vaultName, jobId).getSyncPoller();
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginTriggerCancel(
+ String resourceGroupName, String vaultName, String jobId, Context context) {
+ return this.beginTriggerCancelAsync(resourceGroupName, vaultName, jobId, context).getSyncPoller();
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerCancelAsync(String resourceGroupName, String vaultName, String jobId) {
+ return beginTriggerCancelAsync(resourceGroupName, vaultName, jobId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono triggerCancelAsync(String resourceGroupName, String vaultName, String jobId, Context context) {
+ return beginTriggerCancelAsync(resourceGroupName, vaultName, jobId, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 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 triggerCancel(String resourceGroupName, String vaultName, String jobId) {
+ triggerCancelAsync(resourceGroupName, vaultName, jobId).block();
+ }
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 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 triggerCancel(String resourceGroupName, String vaultName, String jobId, Context context) {
+ triggerCancelAsync(resourceGroupName, vaultName, jobId, context).block();
+ }
+
+ /**
+ * Generates read SAS URL for a blob from which current job progress can be read.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return job Progress URL class along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> generateProgressUrlWithResponseAsync(
+ String resourceGroupName, String vaultName, String jobId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (jobId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .generateProgressUrl(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ jobId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Generates read SAS URL for a blob from which current job progress can be read.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return job Progress URL class along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> generateProgressUrlWithResponseAsync(
+ String resourceGroupName, String vaultName, String jobId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (vaultName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter vaultName is required and cannot be null."));
+ }
+ if (jobId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .generateProgressUrl(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ vaultName,
+ jobId,
+ accept,
+ context);
+ }
+
+ /**
+ * Generates read SAS URL for a blob from which current job progress can be read.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return job Progress URL class on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono generateProgressUrlAsync(
+ String resourceGroupName, String vaultName, String jobId) {
+ return generateProgressUrlWithResponseAsync(resourceGroupName, vaultName, jobId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Generates read SAS URL for a blob from which current job progress can be read.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return job Progress URL class along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response generateProgressUrlWithResponse(
+ String resourceGroupName, String vaultName, String jobId, Context context) {
+ return generateProgressUrlWithResponseAsync(resourceGroupName, vaultName, jobId, context).block();
+ }
+
+ /**
+ * Generates read SAS URL for a blob from which current job progress can be read.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return job Progress URL class.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureBackupJobProgressUrlInner generateProgressUrl(
+ String resourceGroupName, String vaultName, String jobId) {
+ return generateProgressUrlWithResponse(resourceGroupName, vaultName, jobId, Context.NONE).getValue();
+ }
+
/**
* Get the next page of items.
*
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java
index a6a3b8c5988f..7913c17db776 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/JobsImpl.java
@@ -10,7 +10,9 @@
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.dataprotection.fluent.JobsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobProgressUrlInner;
import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupJobProgressUrl;
import com.azure.resourcemanager.dataprotection.models.AzureBackupJobResource;
import com.azure.resourcemanager.dataprotection.models.Jobs;
@@ -62,6 +64,39 @@ public AzureBackupJobResource get(String resourceGroupName, String vaultName, St
}
}
+ public void triggerCancel(String resourceGroupName, String vaultName, String jobId) {
+ this.serviceClient().triggerCancel(resourceGroupName, vaultName, jobId);
+ }
+
+ public void triggerCancel(String resourceGroupName, String vaultName, String jobId, Context context) {
+ this.serviceClient().triggerCancel(resourceGroupName, vaultName, jobId, context);
+ }
+
+ public Response generateProgressUrlWithResponse(
+ String resourceGroupName, String vaultName, String jobId, Context context) {
+ Response inner =
+ this.serviceClient().generateProgressUrlWithResponse(resourceGroupName, vaultName, jobId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AzureBackupJobProgressUrlImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AzureBackupJobProgressUrl generateProgressUrl(String resourceGroupName, String vaultName, String jobId) {
+ AzureBackupJobProgressUrlInner inner =
+ this.serviceClient().generateProgressUrl(resourceGroupName, vaultName, jobId);
+ if (inner != null) {
+ return new AzureBackupJobProgressUrlImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
private JobsClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/SecondaryRPsClientImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/SecondaryRPsClientImpl.java
new file mode 100644
index 000000000000..09667fcfae67
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/SecondaryRPsClientImpl.java
@@ -0,0 +1,434 @@
+// 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.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.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.dataprotection.fluent.SecondaryRPsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList;
+import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in SecondaryRPsClient. */
+public final class SecondaryRPsClientImpl implements SecondaryRPsClient {
+ /** The proxy service used to perform REST calls. */
+ private final SecondaryRPsService service;
+
+ /** The service client containing this operation class. */
+ private final DataProtectionClientImpl client;
+
+ /**
+ * Initializes an instance of SecondaryRPsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SecondaryRPsClientImpl(DataProtectionClientImpl client) {
+ this.service =
+ RestProxy.create(SecondaryRPsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataProtectionClientSecondaryRPs to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataProtectionClient")
+ public interface SecondaryRPsService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/fetchSecondaryRecoveryPoints")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> fetch(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("location") String location,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$skipToken") String skipToken,
+ @BodyParam("application/json") FetchSecondaryRPsRequestParameters parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> fetchNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for operation.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchSinglePageAsync(
+ String resourceGroupName,
+ String location,
+ FetchSecondaryRPsRequestParameters parameters,
+ String filter,
+ String skipToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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
+ .fetch(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ location,
+ filter,
+ skipToken,
+ parameters,
+ 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 a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for operation.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchSinglePageAsync(
+ String resourceGroupName,
+ String location,
+ FetchSecondaryRPsRequestParameters parameters,
+ String filter,
+ String skipToken,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (location == null) {
+ return Mono.error(new IllegalArgumentException("Parameter location 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
+ .fetch(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ location,
+ filter,
+ skipToken,
+ parameters,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for operation.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux fetchAsync(
+ String resourceGroupName,
+ String location,
+ FetchSecondaryRPsRequestParameters parameters,
+ String filter,
+ String skipToken) {
+ return new PagedFlux<>(
+ () -> fetchSinglePageAsync(resourceGroupName, location, parameters, filter, skipToken),
+ nextLink -> fetchNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux fetchAsync(
+ String resourceGroupName, String location, FetchSecondaryRPsRequestParameters parameters) {
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedFlux<>(
+ () -> fetchSinglePageAsync(resourceGroupName, location, parameters, filter, skipToken),
+ nextLink -> fetchNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for operation.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux fetchAsync(
+ String resourceGroupName,
+ String location,
+ FetchSecondaryRPsRequestParameters parameters,
+ String filter,
+ String skipToken,
+ Context context) {
+ return new PagedFlux<>(
+ () -> fetchSinglePageAsync(resourceGroupName, location, parameters, filter, skipToken, context),
+ nextLink -> fetchNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable fetch(
+ String resourceGroupName, String location, FetchSecondaryRPsRequestParameters parameters) {
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedIterable<>(fetchAsync(resourceGroupName, location, parameters, filter, skipToken));
+ }
+
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for operation.
+ * @param filter OData filter options.
+ * @param skipToken skipToken Filter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable fetch(
+ String resourceGroupName,
+ String location,
+ FetchSecondaryRPsRequestParameters parameters,
+ String filter,
+ String skipToken,
+ Context context) {
+ return new PagedIterable<>(fetchAsync(resourceGroupName, location, parameters, filter, skipToken, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchNextSinglePageAsync(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.fetchNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBackupRecoveryPointResourceList along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> fetchNextSinglePageAsync(
+ 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
+ .fetchNext(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/SecondaryRPsImpl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/SecondaryRPsImpl.java
new file mode 100644
index 000000000000..1e82e492345e
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/SecondaryRPsImpl.java
@@ -0,0 +1,55 @@
+// 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.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.dataprotection.fluent.SecondaryRPsClient;
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResource;
+import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters;
+import com.azure.resourcemanager.dataprotection.models.SecondaryRPs;
+
+public final class SecondaryRPsImpl implements SecondaryRPs {
+ private static final ClientLogger LOGGER = new ClientLogger(SecondaryRPsImpl.class);
+
+ private final SecondaryRPsClient innerClient;
+
+ private final com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager;
+
+ public SecondaryRPsImpl(
+ SecondaryRPsClient innerClient, com.azure.resourcemanager.dataprotection.DataProtectionManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable fetch(
+ String resourceGroupName, String location, FetchSecondaryRPsRequestParameters parameters) {
+ PagedIterable inner =
+ this.serviceClient().fetch(resourceGroupName, location, parameters);
+ return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable fetch(
+ String resourceGroupName,
+ String location,
+ FetchSecondaryRPsRequestParameters parameters,
+ String filter,
+ String skipToken,
+ Context context) {
+ PagedIterable inner =
+ this.serviceClient().fetch(resourceGroupName, location, parameters, filter, skipToken, context);
+ return Utils.mapPage(inner, inner1 -> new AzureBackupRecoveryPointResourceImpl(inner1, this.manager()));
+ }
+
+ private SecondaryRPsClient 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/models/AzureBackupJob.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java
index 77335b7ee1b8..58b93a565a1c 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJob.java
@@ -140,6 +140,12 @@ public final class AzureBackupJob {
@JsonProperty(value = "restoreType", access = JsonProperty.Access.WRITE_ONLY)
private String restoreType;
+ /*
+ * The type of the source data store.
+ */
+ @JsonProperty(value = "sourceDataStoreType", access = JsonProperty.Access.WRITE_ONLY)
+ private String sourceDataStoreType;
+
/*
* Resource Group Name of the Datasource
*/
@@ -527,6 +533,15 @@ public String restoreType() {
return this.restoreType;
}
+ /**
+ * Get the sourceDataStoreType property: The type of the source data store.
+ *
+ * @return the sourceDataStoreType value.
+ */
+ public String sourceDataStoreType() {
+ return this.sourceDataStoreType;
+ }
+
/**
* Get the sourceResourceGroup property: Resource Group Name of the Datasource.
*
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobProgressUrl.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobProgressUrl.java
new file mode 100644
index 000000000000..6b4e7a1f4712
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/AzureBackupJobProgressUrl.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobProgressUrlInner;
+
+/** An immutable client-side representation of AzureBackupJobProgressUrl. */
+public interface AzureBackupJobProgressUrl {
+ /**
+ * Gets the progressUrl property: Read SAS URI for a blob from which current job progress can be read.
+ *
+ * @return the progressUrl value.
+ */
+ String progressUrl();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupJobProgressUrlInner object.
+ *
+ * @return the inner object.
+ */
+ AzureBackupJobProgressUrlInner innerModel();
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java
index c9b1634d541f..cd74da8e962c 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstances.java
@@ -183,6 +183,64 @@ Response getBackupInstanceOperationResultWithResponse(
BackupInstanceResource getBackupInstanceOperationResult(
String resourceGroupName, String vaultName, String backupInstanceName, String operationId);
+ /**
+ * The triggerCrossRegionRestore operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for trigger CRR 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.
+ */
+ OperationJobExtendedInfo triggerCrossRegionRestore(
+ String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters);
+
+ /**
+ * The triggerCrossRegionRestore operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for trigger CRR 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.
+ */
+ OperationJobExtendedInfo triggerCrossRegionRestore(
+ String resourceGroupName, String location, CrossRegionRestoreRequestObject parameters, Context context);
+
+ /**
+ * The validateCrossRegionRestore operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 operationJobExtendedInfo.
+ */
+ OperationJobExtendedInfo validateCrossRegionRestore(
+ String resourceGroupName, String location, ValidateCrossRegionRestoreRequestObject parameters);
+
+ /**
+ * The validateCrossRegionRestore operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 operationJobExtendedInfo.
+ */
+ OperationJobExtendedInfo validateCrossRegionRestore(
+ String resourceGroupName, String location, ValidateCrossRegionRestoreRequestObject parameters, Context context);
+
/**
* rehydrate recovery point for restore for a BackupInstance.
*
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesExtensionRoutings.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesExtensionRoutings.java
new file mode 100644
index 000000000000..b87c66eb5608
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BackupInstancesExtensionRoutings.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.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/** Resource collection API of BackupInstancesExtensionRoutings. */
+public interface BackupInstancesExtensionRoutings {
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @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 list of backup instances associated with a tracked resource as paginated response with {@link
+ * PagedIterable}.
+ */
+ PagedIterable list(String resourceId);
+
+ /**
+ * Gets a list of backup instances associated with a tracked resource.
+ *
+ * @param resourceId ARM path of the resource to be protected using Microsoft.DataProtection.
+ * @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 list of backup instances associated with a tracked resource as paginated response with {@link
+ * PagedIterable}.
+ */
+ PagedIterable list(String resourceId, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java
index 3da98ad80da0..9bf562a29e97 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/BaseResourceProperties.java
@@ -5,14 +5,20 @@
package com.azure.resourcemanager.dataprotection.models;
import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
/** Properties which are specific to datasource/datasourceSets. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "objectType",
+ defaultImpl = BaseResourceProperties.class)
@JsonTypeName("BaseResourceProperties")
+@JsonSubTypes({@JsonSubTypes.Type(name = "DefaultResourceProperties", value = DefaultResourceProperties.class)})
@Immutable
-public final class BaseResourceProperties {
+public class BaseResourceProperties {
/** Creates an instance of BaseResourceProperties class. */
public BaseResourceProperties() {
}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreDetails.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreDetails.java
new file mode 100644
index 000000000000..31e770b8ba56
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreDetails.java
@@ -0,0 +1,91 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Cross Region Restore details. */
+@Fluent
+public final class CrossRegionRestoreDetails {
+ /*
+ * The sourceRegion property.
+ */
+ @JsonProperty(value = "sourceRegion", required = true)
+ private String sourceRegion;
+
+ /*
+ * The sourceBackupInstanceId property.
+ */
+ @JsonProperty(value = "sourceBackupInstanceId", required = true)
+ private String sourceBackupInstanceId;
+
+ /** Creates an instance of CrossRegionRestoreDetails class. */
+ public CrossRegionRestoreDetails() {
+ }
+
+ /**
+ * Get the sourceRegion property: The sourceRegion property.
+ *
+ * @return the sourceRegion value.
+ */
+ public String sourceRegion() {
+ return this.sourceRegion;
+ }
+
+ /**
+ * Set the sourceRegion property: The sourceRegion property.
+ *
+ * @param sourceRegion the sourceRegion value to set.
+ * @return the CrossRegionRestoreDetails object itself.
+ */
+ public CrossRegionRestoreDetails withSourceRegion(String sourceRegion) {
+ this.sourceRegion = sourceRegion;
+ return this;
+ }
+
+ /**
+ * Get the sourceBackupInstanceId property: The sourceBackupInstanceId property.
+ *
+ * @return the sourceBackupInstanceId value.
+ */
+ public String sourceBackupInstanceId() {
+ return this.sourceBackupInstanceId;
+ }
+
+ /**
+ * Set the sourceBackupInstanceId property: The sourceBackupInstanceId property.
+ *
+ * @param sourceBackupInstanceId the sourceBackupInstanceId value to set.
+ * @return the CrossRegionRestoreDetails object itself.
+ */
+ public CrossRegionRestoreDetails withSourceBackupInstanceId(String sourceBackupInstanceId) {
+ this.sourceBackupInstanceId = sourceBackupInstanceId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sourceRegion() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourceRegion in model CrossRegionRestoreDetails"));
+ }
+ if (sourceBackupInstanceId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourceBackupInstanceId in model CrossRegionRestoreDetails"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreDetails.class);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobRequest.java
new file mode 100644
index 000000000000..2df08997e5e8
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobRequest.java
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CrossRegionRestoreJobRequest model. */
+@Fluent
+public final class CrossRegionRestoreJobRequest {
+ /*
+ * The sourceRegion property.
+ */
+ @JsonProperty(value = "sourceRegion", required = true)
+ private String sourceRegion;
+
+ /*
+ * The sourceBackupVaultId property.
+ */
+ @JsonProperty(value = "sourceBackupVaultId", required = true)
+ private String sourceBackupVaultId;
+
+ /*
+ * The jobId property.
+ */
+ @JsonProperty(value = "jobId", required = true)
+ private String jobId;
+
+ /** Creates an instance of CrossRegionRestoreJobRequest class. */
+ public CrossRegionRestoreJobRequest() {
+ }
+
+ /**
+ * Get the sourceRegion property: The sourceRegion property.
+ *
+ * @return the sourceRegion value.
+ */
+ public String sourceRegion() {
+ return this.sourceRegion;
+ }
+
+ /**
+ * Set the sourceRegion property: The sourceRegion property.
+ *
+ * @param sourceRegion the sourceRegion value to set.
+ * @return the CrossRegionRestoreJobRequest object itself.
+ */
+ public CrossRegionRestoreJobRequest withSourceRegion(String sourceRegion) {
+ this.sourceRegion = sourceRegion;
+ return this;
+ }
+
+ /**
+ * Get the sourceBackupVaultId property: The sourceBackupVaultId property.
+ *
+ * @return the sourceBackupVaultId value.
+ */
+ public String sourceBackupVaultId() {
+ return this.sourceBackupVaultId;
+ }
+
+ /**
+ * Set the sourceBackupVaultId property: The sourceBackupVaultId property.
+ *
+ * @param sourceBackupVaultId the sourceBackupVaultId value to set.
+ * @return the CrossRegionRestoreJobRequest object itself.
+ */
+ public CrossRegionRestoreJobRequest withSourceBackupVaultId(String sourceBackupVaultId) {
+ this.sourceBackupVaultId = sourceBackupVaultId;
+ return this;
+ }
+
+ /**
+ * Get the jobId property: The jobId property.
+ *
+ * @return the jobId value.
+ */
+ public String jobId() {
+ return this.jobId;
+ }
+
+ /**
+ * Set the jobId property: The jobId property.
+ *
+ * @param jobId the jobId value to set.
+ * @return the CrossRegionRestoreJobRequest object itself.
+ */
+ public CrossRegionRestoreJobRequest withJobId(String jobId) {
+ this.jobId = jobId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sourceRegion() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourceRegion in model CrossRegionRestoreJobRequest"));
+ }
+ if (sourceBackupVaultId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourceBackupVaultId in model CrossRegionRestoreJobRequest"));
+ }
+ if (jobId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property jobId in model CrossRegionRestoreJobRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreJobRequest.class);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobs.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobs.java
new file mode 100644
index 000000000000..417eef1a4cae
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobs.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of CrossRegionRestoreJobs. */
+public interface CrossRegionRestoreJobs {
+ /**
+ * The get operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackup Job Resource Class along with {@link Response}.
+ */
+ Response getWithResponse(
+ String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters, Context context);
+
+ /**
+ * The get operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackup Job Resource Class.
+ */
+ AzureBackupJobResource get(String resourceGroupName, String location, CrossRegionRestoreJobRequest parameters);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsOperations.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsOperations.java
new file mode 100644
index 000000000000..0abb689195da
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsOperations.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.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/** Resource collection API of CrossRegionRestoreJobsOperations. */
+public interface CrossRegionRestoreJobsOperations {
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters);
+
+ /**
+ * The list operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 list of AzureBackup Job resources as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(
+ String resourceGroupName, String location, CrossRegionRestoreJobsRequest parameters, Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsRequest.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsRequest.java
new file mode 100644
index 000000000000..a3d9042e43f7
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreJobsRequest.java
@@ -0,0 +1,91 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CrossRegionRestoreJobsRequest model. */
+@Fluent
+public final class CrossRegionRestoreJobsRequest {
+ /*
+ * The sourceRegion property.
+ */
+ @JsonProperty(value = "sourceRegion", required = true)
+ private String sourceRegion;
+
+ /*
+ * The sourceBackupVaultId property.
+ */
+ @JsonProperty(value = "sourceBackupVaultId", required = true)
+ private String sourceBackupVaultId;
+
+ /** Creates an instance of CrossRegionRestoreJobsRequest class. */
+ public CrossRegionRestoreJobsRequest() {
+ }
+
+ /**
+ * Get the sourceRegion property: The sourceRegion property.
+ *
+ * @return the sourceRegion value.
+ */
+ public String sourceRegion() {
+ return this.sourceRegion;
+ }
+
+ /**
+ * Set the sourceRegion property: The sourceRegion property.
+ *
+ * @param sourceRegion the sourceRegion value to set.
+ * @return the CrossRegionRestoreJobsRequest object itself.
+ */
+ public CrossRegionRestoreJobsRequest withSourceRegion(String sourceRegion) {
+ this.sourceRegion = sourceRegion;
+ return this;
+ }
+
+ /**
+ * Get the sourceBackupVaultId property: The sourceBackupVaultId property.
+ *
+ * @return the sourceBackupVaultId value.
+ */
+ public String sourceBackupVaultId() {
+ return this.sourceBackupVaultId;
+ }
+
+ /**
+ * Set the sourceBackupVaultId property: The sourceBackupVaultId property.
+ *
+ * @param sourceBackupVaultId the sourceBackupVaultId value to set.
+ * @return the CrossRegionRestoreJobsRequest object itself.
+ */
+ public CrossRegionRestoreJobsRequest withSourceBackupVaultId(String sourceBackupVaultId) {
+ this.sourceBackupVaultId = sourceBackupVaultId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sourceRegion() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourceRegion in model CrossRegionRestoreJobsRequest"));
+ }
+ if (sourceBackupVaultId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourceBackupVaultId in model CrossRegionRestoreJobsRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreJobsRequest.class);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreRequestObject.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreRequestObject.java
new file mode 100644
index 000000000000..814427d44f43
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/CrossRegionRestoreRequestObject.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Cross Region Restore Request Object. */
+@Fluent
+public final class CrossRegionRestoreRequestObject {
+ /*
+ * AzureBackupRestoreRequest
+ *
+ * Gets or sets the restore request object.
+ */
+ @JsonProperty(value = "restoreRequestObject", required = true)
+ private AzureBackupRestoreRequest restoreRequestObject;
+
+ /*
+ * Cross region restore details.
+ */
+ @JsonProperty(value = "crossRegionRestoreDetails", required = true)
+ private CrossRegionRestoreDetails crossRegionRestoreDetails;
+
+ /** Creates an instance of CrossRegionRestoreRequestObject class. */
+ public CrossRegionRestoreRequestObject() {
+ }
+
+ /**
+ * Get the restoreRequestObject property: AzureBackupRestoreRequest
+ *
+ * Gets or sets the restore request object.
+ *
+ * @return the restoreRequestObject value.
+ */
+ public AzureBackupRestoreRequest restoreRequestObject() {
+ return this.restoreRequestObject;
+ }
+
+ /**
+ * Set the restoreRequestObject property: AzureBackupRestoreRequest
+ *
+ *
Gets or sets the restore request object.
+ *
+ * @param restoreRequestObject the restoreRequestObject value to set.
+ * @return the CrossRegionRestoreRequestObject object itself.
+ */
+ public CrossRegionRestoreRequestObject withRestoreRequestObject(AzureBackupRestoreRequest restoreRequestObject) {
+ this.restoreRequestObject = restoreRequestObject;
+ return this;
+ }
+
+ /**
+ * Get the crossRegionRestoreDetails property: Cross region restore details.
+ *
+ * @return the crossRegionRestoreDetails value.
+ */
+ public CrossRegionRestoreDetails crossRegionRestoreDetails() {
+ return this.crossRegionRestoreDetails;
+ }
+
+ /**
+ * Set the crossRegionRestoreDetails property: Cross region restore details.
+ *
+ * @param crossRegionRestoreDetails the crossRegionRestoreDetails value to set.
+ * @return the CrossRegionRestoreRequestObject object itself.
+ */
+ public CrossRegionRestoreRequestObject withCrossRegionRestoreDetails(
+ CrossRegionRestoreDetails crossRegionRestoreDetails) {
+ this.crossRegionRestoreDetails = crossRegionRestoreDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (restoreRequestObject() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property restoreRequestObject in model CrossRegionRestoreRequestObject"));
+ } else {
+ restoreRequestObject().validate();
+ }
+ if (crossRegionRestoreDetails() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property crossRegionRestoreDetails in model"
+ + " CrossRegionRestoreRequestObject"));
+ } else {
+ crossRegionRestoreDetails().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CrossRegionRestoreRequestObject.class);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DefaultResourceProperties.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DefaultResourceProperties.java
new file mode 100644
index 000000000000..a02ec7cd88d7
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/DefaultResourceProperties.java
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/** Default source properties. */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "objectType")
+@JsonTypeName("DefaultResourceProperties")
+@Immutable
+public final class DefaultResourceProperties extends BaseResourceProperties {
+ /** Creates an instance of DefaultResourceProperties class. */
+ public DefaultResourceProperties() {
+ }
+
+ /**
+ * 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/models/FetchSecondaryRPsRequestParameters.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRPsRequestParameters.java
new file mode 100644
index 000000000000..708d29082146
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/FetchSecondaryRPsRequestParameters.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Information about BI whose secondary RecoveryPoints are requested Source region and BI ARM path. */
+@Fluent
+public final class FetchSecondaryRPsRequestParameters {
+ /*
+ * Source region in which BackupInstance is located
+ */
+ @JsonProperty(value = "sourceRegion")
+ private String sourceRegion;
+
+ /*
+ * ARM Path of BackupInstance
+ */
+ @JsonProperty(value = "sourceBackupInstanceId")
+ private String sourceBackupInstanceId;
+
+ /** Creates an instance of FetchSecondaryRPsRequestParameters class. */
+ public FetchSecondaryRPsRequestParameters() {
+ }
+
+ /**
+ * Get the sourceRegion property: Source region in which BackupInstance is located.
+ *
+ * @return the sourceRegion value.
+ */
+ public String sourceRegion() {
+ return this.sourceRegion;
+ }
+
+ /**
+ * Set the sourceRegion property: Source region in which BackupInstance is located.
+ *
+ * @param sourceRegion the sourceRegion value to set.
+ * @return the FetchSecondaryRPsRequestParameters object itself.
+ */
+ public FetchSecondaryRPsRequestParameters withSourceRegion(String sourceRegion) {
+ this.sourceRegion = sourceRegion;
+ return this;
+ }
+
+ /**
+ * Get the sourceBackupInstanceId property: ARM Path of BackupInstance.
+ *
+ * @return the sourceBackupInstanceId value.
+ */
+ public String sourceBackupInstanceId() {
+ return this.sourceBackupInstanceId;
+ }
+
+ /**
+ * Set the sourceBackupInstanceId property: ARM Path of BackupInstance.
+ *
+ * @param sourceBackupInstanceId the sourceBackupInstanceId value to set.
+ * @return the FetchSecondaryRPsRequestParameters object itself.
+ */
+ public FetchSecondaryRPsRequestParameters withSourceBackupInstanceId(String sourceBackupInstanceId) {
+ this.sourceBackupInstanceId = sourceBackupInstanceId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java
index e9b4659723c0..2e2c6f47629c 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/JobExtendedInfo.java
@@ -56,6 +56,12 @@ public final class JobExtendedInfo {
@JsonProperty(value = "targetRecoverPoint", access = JsonProperty.Access.WRITE_ONLY)
private RestoreJobRecoveryPointDetails targetRecoverPoint;
+ /*
+ * A List, detailing the warnings related to the job
+ */
+ @JsonProperty(value = "warningDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private List warningDetails;
+
/** Creates an instance of JobExtendedInfo class. */
public JobExtendedInfo() {
}
@@ -134,6 +140,15 @@ public RestoreJobRecoveryPointDetails targetRecoverPoint() {
return this.targetRecoverPoint;
}
+ /**
+ * Get the warningDetails property: A List, detailing the warnings related to the job.
+ *
+ * @return the warningDetails value.
+ */
+ public List warningDetails() {
+ return this.warningDetails;
+ }
+
/**
* Validates the instance.
*
@@ -149,5 +164,8 @@ public void validate() {
if (targetRecoverPoint() != null) {
targetRecoverPoint().validate();
}
+ if (warningDetails() != null) {
+ warningDetails().forEach(e -> e.validate());
+ }
}
}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java
index 0e5de723efe8..3c16d4072834 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/Jobs.java
@@ -62,4 +62,57 @@ Response getWithResponse(
* @return a job with id in a backup vault.
*/
AzureBackupJobResource get(String resourceGroupName, String vaultName, String jobId);
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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.
+ */
+ void triggerCancel(String resourceGroupName, String vaultName, String jobId);
+
+ /**
+ * Triggers cancellation of Job and returns an OperationID to track.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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.
+ */
+ void triggerCancel(String resourceGroupName, String vaultName, String jobId, Context context);
+
+ /**
+ * Generates read SAS URL for a blob from which current job progress can be read.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 job Progress URL class along with {@link Response}.
+ */
+ Response generateProgressUrlWithResponse(
+ String resourceGroupName, String vaultName, String jobId, Context context);
+
+ /**
+ * Generates read SAS URL for a blob from which current job progress can be read.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 job Progress URL class.
+ */
+ AzureBackupJobProgressUrl generateProgressUrl(String resourceGroupName, String vaultName, String jobId);
}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java
index 691a4ca2a693..bb1185725abc 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/KubernetesClusterRestoreCriteria.java
@@ -84,6 +84,18 @@ public final class KubernetesClusterRestoreCriteria extends ItemLevelRestoreCrit
@JsonProperty(value = "restoreHookReferences")
private List restoreHookReferences;
+ /*
+ * Gets or sets the staging RG Id for creating staging disks and snapshots during restore.
+ */
+ @JsonProperty(value = "stagingResourceGroupId")
+ private String stagingResourceGroupId;
+
+ /*
+ * Gets or sets the staging Storage Account Id for creating backup object store data during restore.
+ */
+ @JsonProperty(value = "stagingStorageAccountId")
+ private String stagingStorageAccountId;
+
/** Creates an instance of KubernetesClusterRestoreCriteria class. */
public KubernetesClusterRestoreCriteria() {
}
@@ -310,6 +322,50 @@ public KubernetesClusterRestoreCriteria withRestoreHookReferences(
return this;
}
+ /**
+ * Get the stagingResourceGroupId property: Gets or sets the staging RG Id for creating staging disks and snapshots
+ * during restore.
+ *
+ * @return the stagingResourceGroupId value.
+ */
+ public String stagingResourceGroupId() {
+ return this.stagingResourceGroupId;
+ }
+
+ /**
+ * Set the stagingResourceGroupId property: Gets or sets the staging RG Id for creating staging disks and snapshots
+ * during restore.
+ *
+ * @param stagingResourceGroupId the stagingResourceGroupId value to set.
+ * @return the KubernetesClusterRestoreCriteria object itself.
+ */
+ public KubernetesClusterRestoreCriteria withStagingResourceGroupId(String stagingResourceGroupId) {
+ this.stagingResourceGroupId = stagingResourceGroupId;
+ return this;
+ }
+
+ /**
+ * Get the stagingStorageAccountId property: Gets or sets the staging Storage Account Id for creating backup object
+ * store data during restore.
+ *
+ * @return the stagingStorageAccountId value.
+ */
+ public String stagingStorageAccountId() {
+ return this.stagingStorageAccountId;
+ }
+
+ /**
+ * Set the stagingStorageAccountId property: Gets or sets the staging Storage Account Id for creating backup object
+ * store data during restore.
+ *
+ * @param stagingStorageAccountId the stagingStorageAccountId value to set.
+ * @return the KubernetesClusterRestoreCriteria object itself.
+ */
+ public KubernetesClusterRestoreCriteria withStagingStorageAccountId(String stagingStorageAccountId) {
+ this.stagingStorageAccountId = stagingStorageAccountId;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourcePropertiesObjectType.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourcePropertiesObjectType.java
new file mode 100644
index 000000000000..47cda7d2c1d3
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ResourcePropertiesObjectType.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Type of the specific object - used for deserializing. */
+public final class ResourcePropertiesObjectType extends ExpandableStringEnum {
+ /** Static value DefaultResourceProperties for ResourcePropertiesObjectType. */
+ public static final ResourcePropertiesObjectType DEFAULT_RESOURCE_PROPERTIES =
+ fromString("DefaultResourceProperties");
+
+ /**
+ * Creates a new instance of ResourcePropertiesObjectType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ResourcePropertiesObjectType() {
+ }
+
+ /**
+ * Creates or finds a ResourcePropertiesObjectType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ResourcePropertiesObjectType.
+ */
+ @JsonCreator
+ public static ResourcePropertiesObjectType fromString(String name) {
+ return fromString(name, ResourcePropertiesObjectType.class);
+ }
+
+ /**
+ * Gets known ResourcePropertiesObjectType values.
+ *
+ * @return known ResourcePropertiesObjectType values.
+ */
+ public static Collection values() {
+ return values(ResourcePropertiesObjectType.class);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecondaryRPs.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecondaryRPs.java
new file mode 100644
index 000000000000..2ab8e322131b
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/SecondaryRPs.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/** Resource collection API of SecondaryRPs. */
+public interface SecondaryRPs {
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location 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 azureBackupRecoveryPointResourceList as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable fetch(
+ String resourceGroupName, String location, FetchSecondaryRPsRequestParameters parameters);
+
+ /**
+ * Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region
+ * Restore.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The location parameter.
+ * @param parameters Request body for operation.
+ * @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 as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable fetch(
+ String resourceGroupName,
+ String location,
+ FetchSecondaryRPsRequestParameters parameters,
+ String filter,
+ String skipToken,
+ Context context);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingWarningDetail.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingWarningDetail.java
new file mode 100644
index 000000000000..9a49c3e8c782
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/UserFacingWarningDetail.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.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Warning object used by layers that have access to localized content, and propagate that to user. */
+@Fluent
+public final class UserFacingWarningDetail {
+ /*
+ * Name of resource for which warning is raised.
+ */
+ @JsonProperty(value = "resourceName")
+ private String resourceName;
+
+ /*
+ * Error details for the warning.
+ */
+ @JsonProperty(value = "warning", required = true)
+ private UserFacingError warning;
+
+ /** Creates an instance of UserFacingWarningDetail class. */
+ public UserFacingWarningDetail() {
+ }
+
+ /**
+ * Get the resourceName property: Name of resource for which warning is raised.
+ *
+ * @return the resourceName value.
+ */
+ public String resourceName() {
+ return this.resourceName;
+ }
+
+ /**
+ * Set the resourceName property: Name of resource for which warning is raised.
+ *
+ * @param resourceName the resourceName value to set.
+ * @return the UserFacingWarningDetail object itself.
+ */
+ public UserFacingWarningDetail withResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ /**
+ * Get the warning property: Error details for the warning.
+ *
+ * @return the warning value.
+ */
+ public UserFacingError warning() {
+ return this.warning;
+ }
+
+ /**
+ * Set the warning property: Error details for the warning.
+ *
+ * @param warning the warning value to set.
+ * @return the UserFacingWarningDetail object itself.
+ */
+ public UserFacingWarningDetail withWarning(UserFacingError warning) {
+ this.warning = warning;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (warning() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property warning in model UserFacingWarningDetail"));
+ } else {
+ warning().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(UserFacingWarningDetail.class);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateCrossRegionRestoreRequestObject.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateCrossRegionRestoreRequestObject.java
new file mode 100644
index 000000000000..113eb91d2c4a
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/models/ValidateCrossRegionRestoreRequestObject.java
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Cross Region Restore Request Object. */
+@Fluent
+public final class ValidateCrossRegionRestoreRequestObject {
+ /*
+ * AzureBackupRestoreRequest
+ *
+ * Gets or sets the restore request object.
+ */
+ @JsonProperty(value = "restoreRequestObject", required = true)
+ private AzureBackupRestoreRequest restoreRequestObject;
+
+ /*
+ * Cross region restore details.
+ */
+ @JsonProperty(value = "crossRegionRestoreDetails", required = true)
+ private CrossRegionRestoreDetails crossRegionRestoreDetails;
+
+ /** Creates an instance of ValidateCrossRegionRestoreRequestObject class. */
+ public ValidateCrossRegionRestoreRequestObject() {
+ }
+
+ /**
+ * Get the restoreRequestObject property: AzureBackupRestoreRequest
+ *
+ * Gets or sets the restore request object.
+ *
+ * @return the restoreRequestObject value.
+ */
+ public AzureBackupRestoreRequest restoreRequestObject() {
+ return this.restoreRequestObject;
+ }
+
+ /**
+ * Set the restoreRequestObject property: AzureBackupRestoreRequest
+ *
+ *
Gets or sets the restore request object.
+ *
+ * @param restoreRequestObject the restoreRequestObject value to set.
+ * @return the ValidateCrossRegionRestoreRequestObject object itself.
+ */
+ public ValidateCrossRegionRestoreRequestObject withRestoreRequestObject(
+ AzureBackupRestoreRequest restoreRequestObject) {
+ this.restoreRequestObject = restoreRequestObject;
+ return this;
+ }
+
+ /**
+ * Get the crossRegionRestoreDetails property: Cross region restore details.
+ *
+ * @return the crossRegionRestoreDetails value.
+ */
+ public CrossRegionRestoreDetails crossRegionRestoreDetails() {
+ return this.crossRegionRestoreDetails;
+ }
+
+ /**
+ * Set the crossRegionRestoreDetails property: Cross region restore details.
+ *
+ * @param crossRegionRestoreDetails the crossRegionRestoreDetails value to set.
+ * @return the ValidateCrossRegionRestoreRequestObject object itself.
+ */
+ public ValidateCrossRegionRestoreRequestObject withCrossRegionRestoreDetails(
+ CrossRegionRestoreDetails crossRegionRestoreDetails) {
+ this.crossRegionRestoreDetails = crossRegionRestoreDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (restoreRequestObject() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property restoreRequestObject in model"
+ + " ValidateCrossRegionRestoreRequestObject"));
+ } else {
+ restoreRequestObject().validate();
+ }
+ if (crossRegionRestoreDetails() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property crossRegionRestoreDetails in model"
+ + " ValidateCrossRegionRestoreRequestObject"));
+ } else {
+ crossRegionRestoreDetails().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ValidateCrossRegionRestoreRequestObject.class);
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java
index 208ca31a5420..84121cf1a488 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupSamples.java
@@ -11,7 +11,7 @@
/** Samples for BackupInstances AdhocBackup. */
public final class BackupInstancesAdhocBackupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerBackup.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/TriggerBackup.json
*/
/**
* Sample code: Trigger Adhoc Backup.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java
index 1edcd381958f..122e5702b22f 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesCreateOrUpdateSamples.java
@@ -22,7 +22,7 @@
/** Samples for BackupInstances CreateOrUpdate. */
public final class BackupInstancesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/PutBackupInstance.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/PutBackupInstance.json
*/
/**
* Sample code: Create BackupInstance.
@@ -82,6 +82,7 @@ public static void createBackupInstance(com.azure.resourcemanager.dataprotection
.create();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java
index 7eb642f78792..6ef6398dd250 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances Delete. */
public final class BackupInstancesDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/DeleteBackupInstance.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/DeleteBackupInstance.json
*/
/**
* Sample code: Delete BackupInstance.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesExtensionRoutingListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesExtensionRoutingListSamples.java
new file mode 100644
index 000000000000..fc716966348d
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesExtensionRoutingListSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+/** Samples for BackupInstancesExtensionRouting List. */
+public final class BackupInstancesExtensionRoutingListSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/ListBackupInstancesExtensionRouting.json
+ */
+ /**
+ * Sample code: List BackupInstances associated with an azure resource.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void listBackupInstancesAssociatedWithAnAzureResource(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .backupInstancesExtensionRoutings()
+ .list(
+ "subscriptions/36d32b25-3dc7-41b0-bde1-397500644591/resourceGroups/testRG/providers/Microsoft.Compute/disks/testDisk",
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java
index 0dd48d28d5d6..435d0a33a79f 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetBackupInstanceOperationResultSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances GetBackupInstanceOperationResult. */
public final class BackupInstancesGetBackupInstanceOperationResultSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/GetBackupInstanceOperationResult.json
*/
/**
* Sample code: Get BackupInstanceOperationResult.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java
index 7fb8a8b3d4d1..112408a6d45a 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances Get. */
public final class BackupInstancesGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetBackupInstance.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/GetBackupInstance.json
*/
/**
* Sample code: Get BackupInstance.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java
index 32d7daf747ec..49fc00801f02 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances List. */
public final class BackupInstancesListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListBackupInstances.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/ListBackupInstances.json
*/
/**
* Sample code: List BackupInstances in a Vault.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java
index abf56619c96a..89e20aa1b0db 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances ResumeBackups. */
public final class BackupInstancesResumeBackupsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeBackups.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/ResumeBackups.json
*/
/**
* Sample code: ResumeBackups.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java
index 01090850fc76..559c2660f444 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances ResumeProtection. */
public final class BackupInstancesResumeProtectionSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ResumeProtection.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/ResumeProtection.json
*/
/**
* Sample code: ResumeProtection.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java
index b86b859dea2f..583a1c7641ba 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances StopProtection. */
public final class BackupInstancesStopProtectionSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/StopProtection.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/StopProtection.json
*/
/**
* Sample code: StopProtection.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java
index 4732c58049a1..d8686a229124 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupInstances SuspendBackups. */
public final class BackupInstancesSuspendBackupsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SuspendBackups.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/SuspendBackups.json
*/
/**
* Sample code: SuspendBackups.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java
index 8c4bcaa07231..d679e7f6fbbe 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceSamples.java
@@ -10,7 +10,7 @@
/** Samples for BackupInstances SyncBackupInstance. */
public final class BackupInstancesSyncBackupInstanceSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/SyncBackupInstance.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/SyncBackupInstance.json
*/
/**
* Sample code: Sync BackupInstance.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerCrossRegionRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerCrossRegionRestoreSamples.java
new file mode 100644
index 000000000000..e01f0dbed9fa
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerCrossRegionRestoreSamples.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreDetails;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreRequestObject;
+import com.azure.resourcemanager.dataprotection.models.Datasource;
+import com.azure.resourcemanager.dataprotection.models.DatasourceSet;
+import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
+import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfo;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreResource;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreType;
+import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
+
+/** Samples for BackupInstances TriggerCrossRegionRestore. */
+public final class BackupInstancesTriggerCrossRegionRestoreSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/CrossRegionRestore/TriggerCrossRegionRestore.json
+ */
+ /**
+ * Sample code: Trigger Cross Region Restore.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void triggerCrossRegionRestore(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .backupInstances()
+ .triggerCrossRegionRestore(
+ "000pikumar",
+ "EastAsia",
+ new CrossRegionRestoreRequestObject()
+ .withRestoreRequestObject(
+ new AzureBackupRecoveryPointBasedRestoreRequest()
+ .withRestoreTargetInfo(
+ new RestoreTargetInfo()
+ .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
+ .withRestoreLocation("southeastasia")
+ .withDatasourceInfo(
+ new Datasource()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("Datasource")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb")
+ .withResourceLocation("")
+ .withResourceName("targetdb")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withResourceUri(""))
+ .withDatasourceSetInfo(
+ new DatasourceSet()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("DatasourceSet")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest")
+ .withResourceLocation("")
+ .withResourceName("viveksipgtest")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers")
+ .withResourceUri(""))
+ .withDatasourceAuthCredentials(
+ new SecretStoreBasedAuthCredentials()
+ .withSecretStoreResource(
+ new SecretStoreResource()
+ .withUri("https://samplevault.vault.azure.net/secrets/credentials")
+ .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))))
+ .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE)
+ .withSourceResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb")
+ .withRecoveryPointId("hardcodedRP"))
+ .withCrossRegionRestoreDetails(
+ new CrossRegionRestoreDetails()
+ .withSourceRegion("east asia")
+ .withSourceBackupInstanceId(
+ "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/BackupInstances/harshitbi1")),
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java
index 14489854a763..7aaa1378d00b 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRehydrateSamples.java
@@ -10,7 +10,7 @@
/** Samples for BackupInstances TriggerRehydrate. */
public final class BackupInstancesTriggerRehydrateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRehydrate.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/TriggerRehydrate.json
*/
/**
* Sample code: Trigger Rehydrate.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java
index 958aafe207f7..719b86920c0a 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreSamples.java
@@ -22,7 +22,7 @@
/** Samples for BackupInstances TriggerRestore. */
public final class BackupInstancesTriggerRestoreSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/TriggerRestoreAsFiles.json
*/
/**
* Sample code: Trigger Restore As Files.
@@ -54,7 +54,7 @@ public static void triggerRestoreAsFiles(com.azure.resourcemanager.dataprotectio
}
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/TriggerRestoreWithRehydration.json
*/
/**
* Sample code: Trigger Restore With Rehydration.
@@ -104,7 +104,7 @@ public static void triggerRestoreWithRehydration(
}
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/TriggerRestore.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/TriggerRestore.json
*/
/**
* Sample code: Trigger Restore.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateCrossRegionRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateCrossRegionRestoreSamples.java
new file mode 100644
index 000000000000..15b3b487ae74
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateCrossRegionRestoreSamples.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest;
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreDetails;
+import com.azure.resourcemanager.dataprotection.models.Datasource;
+import com.azure.resourcemanager.dataprotection.models.DatasourceSet;
+import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
+import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfo;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreBasedAuthCredentials;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreResource;
+import com.azure.resourcemanager.dataprotection.models.SecretStoreType;
+import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
+import com.azure.resourcemanager.dataprotection.models.ValidateCrossRegionRestoreRequestObject;
+
+/** Samples for BackupInstances ValidateCrossRegionRestore. */
+public final class BackupInstancesValidateCrossRegionRestoreSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/CrossRegionRestore/ValidateCrossRegionRestore.json
+ */
+ /**
+ * Sample code: Validate Cross Region Restore.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void validateCrossRegionRestore(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .backupInstances()
+ .validateCrossRegionRestore(
+ "000pikumar",
+ "EastAsia",
+ new ValidateCrossRegionRestoreRequestObject()
+ .withRestoreRequestObject(
+ new AzureBackupRecoveryPointBasedRestoreRequest()
+ .withRestoreTargetInfo(
+ new RestoreTargetInfo()
+ .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
+ .withRestoreLocation("southeastasia")
+ .withDatasourceInfo(
+ new Datasource()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("Datasource")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/targetdb")
+ .withResourceLocation("")
+ .withResourceName("targetdb")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withResourceUri(""))
+ .withDatasourceSetInfo(
+ new DatasourceSet()
+ .withDatasourceType("Microsoft.DBforPostgreSQL/servers/databases")
+ .withObjectType("DatasourceSet")
+ .withResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest")
+ .withResourceLocation("")
+ .withResourceName("viveksipgtest")
+ .withResourceType("Microsoft.DBforPostgreSQL/servers")
+ .withResourceUri(""))
+ .withDatasourceAuthCredentials(
+ new SecretStoreBasedAuthCredentials()
+ .withSecretStoreResource(
+ new SecretStoreResource()
+ .withUri("https://samplevault.vault.azure.net/secrets/credentials")
+ .withSecretStoreType(SecretStoreType.AZURE_KEY_VAULT))))
+ .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE)
+ .withSourceResourceId(
+ "/subscriptions/f75d8d8b-6735-4697-82e1-1a7a3ff0d5d4/resourceGroups/viveksipgtest/providers/Microsoft.DBforPostgreSQL/servers/viveksipgtest/databases/testdb")
+ .withRecoveryPointId("hardcodedRP"))
+ .withCrossRegionRestoreDetails(
+ new CrossRegionRestoreDetails()
+ .withSourceRegion("east asia")
+ .withSourceBackupInstanceId(
+ "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PratikPrivatePreviewVault1/BackupInstances/harshitbi1")),
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java
index f57b299a0804..5a58202c3f6c 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForBackupSamples.java
@@ -16,7 +16,7 @@
/** Samples for BackupInstances ValidateForBackup. */
public final class BackupInstancesValidateForBackupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateForBackup.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/ValidateForBackup.json
*/
/**
* Sample code: Validate For Backup.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java
index a89e8dfde033..8a5ea1bb6112 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreSamples.java
@@ -18,7 +18,7 @@
/** Samples for BackupInstances ValidateForRestore. */
public final class BackupInstancesValidateForRestoreSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ValidateRestore.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/ValidateRestore.json
*/
/**
* Sample code: Validate Restore.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java
index 22f12b55df1b..a5726340dea2 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateSamples.java
@@ -24,7 +24,7 @@
/** Samples for BackupPolicies CreateOrUpdate. */
public final class BackupPoliciesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/PolicyCRUD/CreateOrUpdateBackupPolicy.json
*/
/**
* Sample code: CreateOrUpdate BackupPolicy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java
index d75e7a70ba53..489116f1b996 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupPolicies Delete. */
public final class BackupPoliciesDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/DeleteBackupPolicy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/PolicyCRUD/DeleteBackupPolicy.json
*/
/**
* Sample code: Delete BackupPolicy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java
index 7c5d1004e44f..f63642fb20cb 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupPolicies Get. */
public final class BackupPoliciesGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/GetBackupPolicy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/PolicyCRUD/GetBackupPolicy.json
*/
/**
* Sample code: Get BackupPolicy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java
index 29a9f7fb8dc1..22d900b05e64 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupPolicies List. */
public final class BackupPoliciesListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/PolicyCRUD/ListBackupPolicy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/PolicyCRUD/ListBackupPolicy.json
*/
/**
* Sample code: List BackupPolicy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java
index a6ddabc610c9..108146d5630e 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupVaultOperationResults Get. */
public final class BackupVaultOperationResultsGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetOperationResultPatch.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/GetOperationResultPatch.json
*/
/**
* Sample code: GetOperationResult Patch.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java
index cfa63552b2f1..1021776c7d52 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilitySamples.java
@@ -9,7 +9,7 @@
/** Samples for BackupVaults CheckNameAvailability. */
public final class BackupVaultsCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/CheckBackupVaultsNameAvailability.json
*/
/**
* Sample code: Check BackupVaults name availability.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java
index 3977ad8c51a1..5ffea0370d86 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateSamples.java
@@ -25,7 +25,7 @@
/** Samples for BackupVaults CreateOrUpdate. */
public final class BackupVaultsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVault.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/PutBackupVault.json
*/
/**
* Sample code: Create BackupVault.
@@ -66,7 +66,7 @@ public static void createBackupVault(com.azure.resourcemanager.dataprotection.Da
}
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PutBackupVaultWithMSI.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/PutBackupVaultWithMSI.json
*/
/**
* Sample code: Create BackupVault With MSI.
@@ -107,6 +107,7 @@ public static void createBackupVaultWithMSI(
.create();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java
index 0ae4c14ca1a2..7ca3204ddcc5 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupVaults Delete. */
public final class BackupVaultsDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/DeleteBackupVault.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/DeleteBackupVault.json
*/
/**
* Sample code: Delete BackupVault.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java
index 123dbedf3192..88f8303b3cf2 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupVaults GetByResourceGroup. */
public final class BackupVaultsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVault.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/GetBackupVault.json
*/
/**
* Sample code: Get BackupVault.
@@ -21,7 +21,7 @@ public static void getBackupVault(com.azure.resourcemanager.dataprotection.DataP
}
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultWithMSI.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/GetBackupVaultWithMSI.json
*/
/**
* Sample code: Get BackupVault With MSI.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java
index 8c2d566f1a1a..655dfe4e5be3 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupVaults ListByResourceGroup. */
public final class BackupVaultsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/GetBackupVaultsInResourceGroup.json
*/
/**
* Sample code: Get BackupVaults in ResourceGroup.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java
index 9f3b83b1156d..8744ae93997b 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for BackupVaults List. */
public final class BackupVaultsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/GetBackupVaultsInSubscription.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/GetBackupVaultsInSubscription.json
*/
/**
* Sample code: Get BackupVaults in Subscription.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java
index 7b0b00a4ac60..dde774416b7e 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsUpdateSamples.java
@@ -15,7 +15,7 @@
/** Samples for BackupVaults Update. */
public final class BackupVaultsUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/VaultCRUD/PatchBackupVault.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/VaultCRUD/PatchBackupVault.json
*/
/**
* Sample code: Patch BackupVault.
@@ -41,6 +41,7 @@ public static void patchBackupVault(com.azure.resourcemanager.dataprotection.Dat
.apply();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreJobGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreJobGetSamples.java
new file mode 100644
index 000000000000..cc33e0bd6508
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreJobGetSamples.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobRequest;
+
+/** Samples for CrossRegionRestoreJob Get. */
+public final class CrossRegionRestoreJobGetSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/CrossRegionRestore/FetchCrossRegionRestoreJob.json
+ */
+ /**
+ * Sample code: Get Cross Region Restore Job.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void getCrossRegionRestoreJob(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .crossRegionRestoreJobs()
+ .getWithResponse(
+ "BugBash1",
+ "west us",
+ new CrossRegionRestoreJobRequest()
+ .withSourceRegion("east us")
+ .withSourceBackupVaultId(
+ "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/BugBash1/providers/Microsoft.DataProtection/backupVaults/BugBashVaultForCCYv11")
+ .withJobId("3c60cb49-63e8-4b21-b9bd-26277b3fdfae"),
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreJobsOperationListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreJobsOperationListSamples.java
new file mode 100644
index 000000000000..9429356c0623
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreJobsOperationListSamples.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreJobsRequest;
+
+/** Samples for CrossRegionRestoreJobsOperation List. */
+public final class CrossRegionRestoreJobsOperationListSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/CrossRegionRestore/FetchCrossRegionRestoreJobs.json
+ */
+ /**
+ * Sample code: List Cross Region Restore Jobs.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void listCrossRegionRestoreJobs(
+ com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .crossRegionRestoreJobsOperations()
+ .list(
+ "BugBash1",
+ "east us",
+ new CrossRegionRestoreJobsRequest()
+ .withSourceRegion("east us")
+ .withSourceBackupVaultId(
+ "/subscriptions/62b829ee-7936-40c9-a1c9-47a93f9f3965/resourceGroups/BugBash1/providers/Microsoft.DataProtection/backupVaults/BugBashVaultForCCYv11"),
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java
index 2c129ffb8653..bb25b63f1327 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionCheckFeatureSupportSamples.java
@@ -10,7 +10,7 @@
/** Samples for DataProtection CheckFeatureSupport. */
public final class DataProtectionCheckFeatureSupportSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/CheckfeatureSupport.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/CheckfeatureSupport.json
*/
/**
* Sample code: Check Azure Vm Backup Feature Support.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java
index f6cd03c51a61..95604151b6b9 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for DataProtectionOperations List. */
public final class DataProtectionOperationsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/Operations/List.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/Operations/List.json
*/
/**
* Sample code: Returns the list of supported REST operations.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java
index 07fac63e4ea4..04ce523344ec 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for DeletedBackupInstances Get. */
public final class DeletedBackupInstancesGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/DeletedBackupInstanceOperations/GetDeletedBackupInstance.json
*/
/**
* Sample code: Get DeletedBackupInstance.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java
index 575dde67d21c..d99fef12b42a 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for DeletedBackupInstances List. */
public final class DeletedBackupInstancesListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/DeletedBackupInstanceOperations/ListDeletedBackupInstances.json
*/
/**
* Sample code: List DeletedBackupInstances in a Vault.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java
index dfed1a2d7c4c..2374f13427da 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for DeletedBackupInstances Undelete. */
public final class DeletedBackupInstancesUndeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/DeletedBackupInstanceOperations/UndeleteDeletedBackupInstance.json
*/
/**
* Sample code: Undelete Deleted BackupInstance.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java
index 5c553ff7e3aa..c7f8b67952c5 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyCreateOrUpdateSamples.java
@@ -9,7 +9,7 @@
/** Samples for DppResourceGuardProxy CreateOrUpdate. */
public final class DppResourceGuardProxyCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardProxyCRUD/PutResourceGuardProxy.json
*/
/**
* Sample code: Create ResourceGuardProxy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java
index f9f5d06172de..2902c594f710 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for DppResourceGuardProxy Delete. */
public final class DppResourceGuardProxyDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardProxyCRUD/DeleteResourceGuardProxy.json
*/
/**
* Sample code: Delete ResourceGuardProxy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java
index f7d85c583de2..4fc732523d33 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for DppResourceGuardProxy Get. */
public final class DppResourceGuardProxyGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardProxyCRUD/GetResourceGuardProxy.json
*/
/**
* Sample code: Get ResourceGuardProxy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java
index 3367b13a747c..87a497d47feb 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyListSamples.java
@@ -7,7 +7,7 @@
/** Samples for DppResourceGuardProxy List. */
public final class DppResourceGuardProxyListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardProxyCRUD/ListResourceGuardProxy.json
*/
/**
* Sample code: Get ResourceGuardProxies.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java
index d8ae569c5a1c..b638f9dd9ec1 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxyUnlockDeleteSamples.java
@@ -10,7 +10,7 @@
/** Samples for DppResourceGuardProxy UnlockDelete. */
public final class DppResourceGuardProxyUnlockDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardProxyCRUD/UnlockDeleteResourceGuardProxy.json
*/
/**
* Sample code: UnlockDelete ResourceGuardProxy.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java
index 8250c5f7e91f..66c93adff2ed 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsOperationResultGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for ExportJobsOperationResult Get. */
public final class ExportJobsOperationResultGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetExportJobsOperationResult.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/JobCRUD/GetExportJobsOperationResult.json
*/
/**
* Sample code: Get Export Jobs Operation Result.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java
index 0454ae339ad8..f70a2acf5f6f 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ExportJobsTriggerSamples.java
@@ -7,7 +7,7 @@
/** Samples for ExportJobs Trigger. */
public final class ExportJobsTriggerSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/TriggerExportJobs.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/JobCRUD/TriggerExportJobs.json
*/
/**
* Sample code: Trigger Export Jobs.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGenerateProgressUrlSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGenerateProgressUrlSamples.java
new file mode 100644
index 000000000000..db4e80342569
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGenerateProgressUrlSamples.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+/** Samples for Jobs GenerateProgressUrl. */
+public final class JobsGenerateProgressUrlSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/JobCRUD/GenerateProgressURL.json
+ */
+ /**
+ * Sample code: Generate Progress URL.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void generateProgressURL(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .jobs()
+ .generateProgressUrlWithResponse(
+ "SwaggerTestRg",
+ "NetSDKTestVault",
+ "3c60cb49-63e8-4b21-b9bd-26277b3fdfae",
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java
index 0981afc333f3..f2e5b14c6b4e 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Jobs Get. */
public final class JobsGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/GetJob.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/JobCRUD/GetJob.json
*/
/**
* Sample code: Get Job.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java
index 019c1e0dfc64..c10547dbbe60 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Jobs List. */
public final class JobsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/JobCRUD/ListJobs.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/JobCRUD/ListJobs.json
*/
/**
* Sample code: Get Jobs.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsTriggerCancelSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsTriggerCancelSamples.java
new file mode 100644
index 000000000000..ced10e8a9083
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/JobsTriggerCancelSamples.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+/** Samples for Jobs TriggerCancel. */
+public final class JobsTriggerCancelSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/JobCRUD/TriggerCancel.json
+ */
+ /**
+ * Sample code: Trigger Cancel.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void triggerCancel(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .jobs()
+ .triggerCancel(
+ "SwaggerTestRg",
+ "NetSDKTestVault",
+ "3c60cb49-63e8-4b21-b9bd-26277b3fdfae",
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java
index d2906edecf9c..f9d683329261 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationResultGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for OperationResult Get. */
public final class OperationResultGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationResult.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/GetOperationResult.json
*/
/**
* Sample code: Get OperationResult.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java
index a281b93ad064..deddd813ca7f 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for OperationStatusBackupVaultContext Get. */
public final class OperationStatusBackupVaultContextGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusVaultContext.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/GetOperationStatusVaultContext.json
*/
/**
* Sample code: Get OperationStatus.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java
index 920bf64b2847..2e9f4c6a9e3d 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for OperationStatus Get. */
public final class OperationStatusGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatus.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/GetOperationStatus.json
*/
/**
* Sample code: Get OperationStatus.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java
index 03924ca173c4..071b75be7bd4 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for OperationStatusResourceGroupContext GetByResourceGroup. */
public final class OperationStatusResourceGroupContextGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/GetOperationStatusRGContext.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/GetOperationStatusRGContext.json
*/
/**
* Sample code: Get OperationStatus.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java
index d24c26251eb4..d24550d3815a 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for RecoveryPoints Get. */
public final class RecoveryPointsGetSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/GetRecoveryPoint.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/GetRecoveryPoint.json
*/
/**
* Sample code: Get Recovery Point.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java
index 924e5ba321f9..f7fcaa949bce 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RecoveryPointsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for RecoveryPoints List. */
public final class RecoveryPointsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/ListRecoveryPoints.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/ListRecoveryPoints.json
*/
/**
* Sample code: List Recovery Points in a Vault.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java
index f38dec425fdf..1c670ccbd884 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards Delete. */
public final class ResourceGuardsDeleteSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/DeleteResourceGuard.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/DeleteResourceGuard.json
*/
/**
* Sample code: Delete ResourceGuard.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java
index 79e6d86acdc5..13de704837c6 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetBackupSecurityPinRequestsObjects. */
public final class ResourceGuardsGetBackupSecurityPinRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/ListBackupSecurityPINRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java
index fce86eae21d9..d5f92db675da 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetByResourceGroup. */
public final class ResourceGuardsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuard.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetResourceGuard.json
*/
/**
* Sample code: Get ResourceGuard.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java
index a1990e787936..a7262541868a 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDefaultBackupSecurityPinRequestsObject. */
public final class ResourceGuardsGetDefaultBackupSecurityPinRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetDefaultBackupSecurityPINRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java
index 5fbef308d8b1..e57348c14b31 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDefaultDeleteProtectedItemRequestsObject. */
public final class ResourceGuardsGetDefaultDeleteProtectedItemRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetDefaultDeleteProtectedItemRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java
index f11989c0ab28..85db77e92f50 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDefaultDeleteResourceGuardProxyRequestsObject. */
public final class ResourceGuardsGetDefaultDeleteResourceGuardProxyRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetDefaultDeleteResourceGuardProxyRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java
index 7f4ae28344cc..870a56e51f06 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDefaultDisableSoftDeleteRequestsObject. */
public final class ResourceGuardsGetDefaultDisableSoftDeleteRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetDefaultDisableSoftDeleteRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java
index e55c42b1171f..61e20e51f47b 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDefaultUpdateProtectedItemRequestsObject. */
public final class ResourceGuardsGetDefaultUpdateProtectedItemRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetDefaultUpdateProtectedItemRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java
index abef4432daea..f853ad564e1f 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDefaultUpdateProtectionPolicyRequestsObject. */
public final class ResourceGuardsGetDefaultUpdateProtectionPolicyRequestsObjectSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetDefaultUpdateProtectionPolicyRequests.json
*/
/**
* Sample code: Get DefaultOperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java
index 71d1146abc4e..d15d26383c76 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDeleteProtectedItemRequestsObjects. */
public final class ResourceGuardsGetDeleteProtectedItemRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/ListDeleteProtectedItemRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java
index c478aa6a60fd..5e7387812543 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDeleteResourceGuardProxyRequestsObjects. */
public final class ResourceGuardsGetDeleteResourceGuardProxyRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/ListDeleteResourceGuardProxyRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java
index 650ce89bc7e2..5c08fdfa4e1d 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetDisableSoftDeleteRequestsObjects. */
public final class ResourceGuardsGetDisableSoftDeleteRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/ListDisableSoftDeleteRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java
index 64d591180669..fb35260ec79e 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetUpdateProtectedItemRequestsObjects. */
public final class ResourceGuardsGetUpdateProtectedItemRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/ListUpdateProtectedItemRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java
index f6ae66da5e08..4cbab8fcb578 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards GetUpdateProtectionPolicyRequestsObjects. */
public final class ResourceGuardsGetUpdateProtectionPolicyRequestsObjectsSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/ListUpdateProtectionPolicyRequests.json
*/
/**
* Sample code: List OperationsRequestObject.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java
index 27e3454390c0..e96b57be10b7 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards ListByResourceGroup. */
public final class ResourceGuardsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetResourceGuardsInResourceGroup.json
*/
/**
* Sample code: Get ResourceGuards in ResourceGroup.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java
index 7caa7f83569d..7a373b4a9c57 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for ResourceGuards List. */
public final class ResourceGuardsListSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/GetResourceGuardsInSubscription.json
*/
/**
* Sample code: Get ResourceGuards in Subscription.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java
index fb5165c388e8..5978bdea4a4e 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPatchSamples.java
@@ -11,7 +11,7 @@
/** Samples for ResourceGuards Patch. */
public final class ResourceGuardsPatchSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PatchResourceGuard.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/PatchResourceGuard.json
*/
/**
* Sample code: Patch ResourceGuard.
@@ -28,6 +28,7 @@ public static void patchResourceGuard(com.azure.resourcemanager.dataprotection.D
resource.update().withTags(mapOf("newKey", "fakeTokenPlaceholder")).apply();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java
index bb9e1147c416..422af54622a6 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/ResourceGuardsPutSamples.java
@@ -10,7 +10,7 @@
/** Samples for ResourceGuards Put. */
public final class ResourceGuardsPutSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/ResourceGuardCRUD/PutResourceGuard.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/ResourceGuardCRUD/PutResourceGuard.json
*/
/**
* Sample code: Create ResourceGuard.
@@ -27,6 +27,7 @@ public static void createResourceGuard(com.azure.resourcemanager.dataprotection.
.create();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java
index e70ef5fc945c..db89cf356aad 100644
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/RestorableTimeRangesFindSamples.java
@@ -10,7 +10,7 @@
/** Samples for RestorableTimeRanges Find. */
public final class RestorableTimeRangesFindSamples {
/*
- * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/examples/BackupInstanceOperations/FindRestorableTimeRanges.json
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/BackupInstanceOperations/FindRestorableTimeRanges.json
*/
/**
* Sample code: Find Restorable Time Ranges.
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/SecondaryRPsFetchSamples.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/SecondaryRPsFetchSamples.java
new file mode 100644
index 000000000000..9e48ecc9a8b0
--- /dev/null
+++ b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/samples/java/com/azure/resourcemanager/dataprotection/generated/SecondaryRPsFetchSamples.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.dataprotection.generated;
+
+import com.azure.resourcemanager.dataprotection.models.FetchSecondaryRPsRequestParameters;
+
+/** Samples for SecondaryRPs Fetch. */
+public final class SecondaryRPsFetchSamples {
+ /*
+ * x-ms-original-file: specification/dataprotection/resource-manager/Microsoft.DataProtection/preview/2023-06-01-preview/examples/CrossRegionRestore/FetchSecondaryRPs.json
+ */
+ /**
+ * Sample code: Fetch SecondaryRPs.
+ *
+ * @param manager Entry point to DataProtectionManager.
+ */
+ public static void fetchSecondaryRPs(com.azure.resourcemanager.dataprotection.DataProtectionManager manager) {
+ manager
+ .secondaryRPs()
+ .fetch(
+ "000pikumar",
+ "WestUS",
+ new FetchSecondaryRPsRequestParameters()
+ .withSourceRegion("EastUS")
+ .withSourceBackupInstanceId(
+ "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/HelloTest/providers/Microsoft.DataProtection/backupVaults/HelloTestVault/backupInstances/653213d-c5b3-44f6-a0d9-db3c4f9d8e34"),
+ null,
+ null,
+ com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AbsoluteDeleteOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AbsoluteDeleteOptionTests.java
deleted file mode 100644
index be68a573dd78..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AbsoluteDeleteOptionTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AbsoluteDeleteOption;
-import org.junit.jupiter.api.Assertions;
-
-public final class AbsoluteDeleteOptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AbsoluteDeleteOption model =
- BinaryData
- .fromString("{\"objectType\":\"AbsoluteDeleteOption\",\"duration\":\"dvriiiojnal\"}")
- .toObject(AbsoluteDeleteOption.class);
- Assertions.assertEquals("dvriiiojnal", model.duration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AbsoluteDeleteOption model = new AbsoluteDeleteOption().withDuration("dvriiiojnal");
- model = BinaryData.fromObject(model).toObject(AbsoluteDeleteOption.class);
- Assertions.assertEquals("dvriiiojnal", model.duration());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdHocBackupRuleOptionsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdHocBackupRuleOptionsTests.java
deleted file mode 100644
index e620a8a796dd..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdHocBackupRuleOptionsTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AdHocBackupRuleOptions;
-import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdHocBackupRuleOptionsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdHocBackupRuleOptions model =
- BinaryData
- .fromString("{\"ruleName\":\"hl\",\"triggerOption\":{\"retentionTagOverride\":\"jbhckfrlhr\"}}")
- .toObject(AdHocBackupRuleOptions.class);
- Assertions.assertEquals("hl", model.ruleName());
- Assertions.assertEquals("jbhckfrlhr", model.triggerOption().retentionTagOverride());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdHocBackupRuleOptions model =
- new AdHocBackupRuleOptions()
- .withRuleName("hl")
- .withTriggerOption(new AdhocBackupTriggerOption().withRetentionTagOverride("jbhckfrlhr"));
- model = BinaryData.fromObject(model).toObject(AdHocBackupRuleOptions.class);
- Assertions.assertEquals("hl", model.ruleName());
- Assertions.assertEquals("jbhckfrlhr", model.triggerOption().retentionTagOverride());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBackupTriggerOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBackupTriggerOptionTests.java
deleted file mode 100644
index 0204805320b9..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBackupTriggerOptionTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdhocBackupTriggerOptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdhocBackupTriggerOption model =
- BinaryData.fromString("{\"retentionTagOverride\":\"bkyvp\"}").toObject(AdhocBackupTriggerOption.class);
- Assertions.assertEquals("bkyvp", model.retentionTagOverride());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdhocBackupTriggerOption model = new AdhocBackupTriggerOption().withRetentionTagOverride("bkyvp");
- model = BinaryData.fromObject(model).toObject(AdhocBackupTriggerOption.class);
- Assertions.assertEquals("bkyvp", model.retentionTagOverride());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTaggingCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTaggingCriteriaTests.java
deleted file mode 100644
index 525255dd5208..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTaggingCriteriaTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AdhocBasedTaggingCriteria;
-import com.azure.resourcemanager.dataprotection.models.RetentionTag;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdhocBasedTaggingCriteriaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdhocBasedTaggingCriteria model =
- BinaryData
- .fromString("{\"tagInfo\":{\"eTag\":\"hahhxvrhmzkwpj\",\"id\":\"wspughftqsxhqx\",\"tagName\":\"j\"}}")
- .toObject(AdhocBasedTaggingCriteria.class);
- Assertions.assertEquals("j", model.tagInfo().tagName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdhocBasedTaggingCriteria model =
- new AdhocBasedTaggingCriteria().withTagInfo(new RetentionTag().withTagName("j"));
- model = BinaryData.fromObject(model).toObject(AdhocBasedTaggingCriteria.class);
- Assertions.assertEquals("j", model.tagInfo().tagName());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTriggerContextTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTriggerContextTests.java
deleted file mode 100644
index 01a82ad23895..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AdhocBasedTriggerContextTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AdhocBasedTaggingCriteria;
-import com.azure.resourcemanager.dataprotection.models.AdhocBasedTriggerContext;
-import com.azure.resourcemanager.dataprotection.models.RetentionTag;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdhocBasedTriggerContextTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdhocBasedTriggerContext model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AdhocBasedTriggerContext\",\"taggingCriteria\":{\"tagInfo\":{\"eTag\":\"o\",\"id\":\"qzudphq\",\"tagName\":\"mvdk\"}}}")
- .toObject(AdhocBasedTriggerContext.class);
- Assertions.assertEquals("mvdk", model.taggingCriteria().tagInfo().tagName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdhocBasedTriggerContext model =
- new AdhocBasedTriggerContext()
- .withTaggingCriteria(
- new AdhocBasedTaggingCriteria().withTagInfo(new RetentionTag().withTagName("mvdk")));
- model = BinaryData.fromObject(model).toObject(AdhocBasedTriggerContext.class);
- Assertions.assertEquals("mvdk", model.taggingCriteria().tagInfo().tagName());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AuthCredentialsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AuthCredentialsTests.java
deleted file mode 100644
index d802e8935ec6..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AuthCredentialsTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AuthCredentials;
-
-public final class AuthCredentialsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AuthCredentials model =
- BinaryData.fromString("{\"objectType\":\"AuthCredentials\"}").toObject(AuthCredentials.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AuthCredentials model = new AuthCredentials();
- model = BinaryData.fromObject(model).toObject(AuthCredentials.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupDiscreteRecoveryPointTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupDiscreteRecoveryPointTests.java
deleted file mode 100644
index b822ee91111d..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupDiscreteRecoveryPointTests.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupDiscreteRecoveryPoint;
-import com.azure.resourcemanager.dataprotection.models.RecoveryPointDataStoreDetails;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupDiscreteRecoveryPointTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupDiscreteRecoveryPoint model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureBackupDiscreteRecoveryPoint\",\"friendlyName\":\"ynwcvtbv\",\"recoveryPointDataStoresDetails\":[{\"creationTime\":\"2021-05-06T12:46:31Z\",\"expiryTime\":\"2021-04-30T18:22:27Z\",\"id\":\"yqiatkzwp\",\"metaData\":\"p\",\"state\":\"cjaesgvvs\",\"type\":\"yajguqfhwygzlv\",\"visible\":false,\"rehydrationExpiryTime\":\"2021-10-30T00:31:15Z\",\"rehydrationStatus\":\"DELETED\"},{\"creationTime\":\"2021-10-16T01:46:34Z\",\"expiryTime\":\"2021-02-14T09:42:03Z\",\"id\":\"rmuhapfcq\",\"metaData\":\"sqxqvp\",\"state\":\"uoymgccelvezry\",\"type\":\"lmfeokerq\",\"visible\":false,\"rehydrationExpiryTime\":\"2021-02-06T22:33:53Z\",\"rehydrationStatus\":\"DELETE_IN_PROGRESS\"},{\"creationTime\":\"2021-02-24T18:35:08Z\",\"expiryTime\":\"2021-02-13T21:16:22Z\",\"id\":\"dkow\",\"metaData\":\"bqpc\",\"state\":\"kbwcc\",\"type\":\"jvcdwxlpqekf\",\"visible\":false,\"rehydrationExpiryTime\":\"2021-05-12T04:10:49Z\",\"rehydrationStatus\":\"FAILED\"}],\"recoveryPointTime\":\"2021-11-08T00:22:08Z\",\"policyName\":\"ngwfqatm\",\"policyVersion\":\"htmdvy\",\"recoveryPointId\":\"ikdgszywkbir\",\"recoveryPointType\":\"uzhlhkjoqrv\",\"retentionTagName\":\"aatjinrvgoupmfi\",\"retentionTagVersion\":\"fggjioolvr\",\"expiryTime\":\"2021-01-31T00:57:49Z\"}")
- .toObject(AzureBackupDiscreteRecoveryPoint.class);
- Assertions.assertEquals("ynwcvtbv", model.friendlyName());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-06T12:46:31Z"),
- model.recoveryPointDataStoresDetails().get(0).creationTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-30T18:22:27Z"),
- model.recoveryPointDataStoresDetails().get(0).expiryTime());
- Assertions.assertEquals("yqiatkzwp", model.recoveryPointDataStoresDetails().get(0).id());
- Assertions.assertEquals("p", model.recoveryPointDataStoresDetails().get(0).metadata());
- Assertions.assertEquals("cjaesgvvs", model.recoveryPointDataStoresDetails().get(0).state());
- Assertions.assertEquals("yajguqfhwygzlv", model.recoveryPointDataStoresDetails().get(0).type());
- Assertions.assertEquals(false, model.recoveryPointDataStoresDetails().get(0).visible());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T00:22:08Z"), model.recoveryPointTime());
- Assertions.assertEquals("ngwfqatm", model.policyName());
- Assertions.assertEquals("htmdvy", model.policyVersion());
- Assertions.assertEquals("ikdgszywkbir", model.recoveryPointId());
- Assertions.assertEquals("uzhlhkjoqrv", model.recoveryPointType());
- Assertions.assertEquals("aatjinrvgoupmfi", model.retentionTagName());
- Assertions.assertEquals("fggjioolvr", model.retentionTagVersion());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupDiscreteRecoveryPoint model =
- new AzureBackupDiscreteRecoveryPoint()
- .withFriendlyName("ynwcvtbv")
- .withRecoveryPointDataStoresDetails(
- Arrays
- .asList(
- new RecoveryPointDataStoreDetails()
- .withCreationTime(OffsetDateTime.parse("2021-05-06T12:46:31Z"))
- .withExpiryTime(OffsetDateTime.parse("2021-04-30T18:22:27Z"))
- .withId("yqiatkzwp")
- .withMetadata("p")
- .withState("cjaesgvvs")
- .withType("yajguqfhwygzlv")
- .withVisible(false),
- new RecoveryPointDataStoreDetails()
- .withCreationTime(OffsetDateTime.parse("2021-10-16T01:46:34Z"))
- .withExpiryTime(OffsetDateTime.parse("2021-02-14T09:42:03Z"))
- .withId("rmuhapfcq")
- .withMetadata("sqxqvp")
- .withState("uoymgccelvezry")
- .withType("lmfeokerq")
- .withVisible(false),
- new RecoveryPointDataStoreDetails()
- .withCreationTime(OffsetDateTime.parse("2021-02-24T18:35:08Z"))
- .withExpiryTime(OffsetDateTime.parse("2021-02-13T21:16:22Z"))
- .withId("dkow")
- .withMetadata("bqpc")
- .withState("kbwcc")
- .withType("jvcdwxlpqekf")
- .withVisible(false)))
- .withRecoveryPointTime(OffsetDateTime.parse("2021-11-08T00:22:08Z"))
- .withPolicyName("ngwfqatm")
- .withPolicyVersion("htmdvy")
- .withRecoveryPointId("ikdgszywkbir")
- .withRecoveryPointType("uzhlhkjoqrv")
- .withRetentionTagName("aatjinrvgoupmfi")
- .withRetentionTagVersion("fggjioolvr");
- model = BinaryData.fromObject(model).toObject(AzureBackupDiscreteRecoveryPoint.class);
- Assertions.assertEquals("ynwcvtbv", model.friendlyName());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-05-06T12:46:31Z"),
- model.recoveryPointDataStoresDetails().get(0).creationTime());
- Assertions
- .assertEquals(
- OffsetDateTime.parse("2021-04-30T18:22:27Z"),
- model.recoveryPointDataStoresDetails().get(0).expiryTime());
- Assertions.assertEquals("yqiatkzwp", model.recoveryPointDataStoresDetails().get(0).id());
- Assertions.assertEquals("p", model.recoveryPointDataStoresDetails().get(0).metadata());
- Assertions.assertEquals("cjaesgvvs", model.recoveryPointDataStoresDetails().get(0).state());
- Assertions.assertEquals("yajguqfhwygzlv", model.recoveryPointDataStoresDetails().get(0).type());
- Assertions.assertEquals(false, model.recoveryPointDataStoresDetails().get(0).visible());
- Assertions.assertEquals(OffsetDateTime.parse("2021-11-08T00:22:08Z"), model.recoveryPointTime());
- Assertions.assertEquals("ngwfqatm", model.policyName());
- Assertions.assertEquals("htmdvy", model.policyVersion());
- Assertions.assertEquals("ikdgszywkbir", model.recoveryPointId());
- Assertions.assertEquals("uzhlhkjoqrv", model.recoveryPointType());
- Assertions.assertEquals("aatjinrvgoupmfi", model.retentionTagName());
- Assertions.assertEquals("fggjioolvr", model.retentionTagVersion());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestResourceTests.java
deleted file mode 100644
index 4007149da6b4..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestResourceTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequestResource;
-import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupFindRestorableTimeRangesRequestResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupFindRestorableTimeRangesRequestResource model =
- BinaryData
- .fromString(
- "{\"content\":{\"sourceDataStoreType\":\"OperationalStore\",\"startTime\":\"yijejvegrhbpnaix\",\"endTime\":\"ccbdre\"},\"subscriptionId\":\"hcexdrrvqa\",\"uri\":\"kghtpwijnh\",\"headers\":{\"mtg\":[\"f\",\"cxzbfvoowvr\"],\"pnsxkmcwaek\":[\"ppyostronzmyhgf\"],\"elfk\":[\"jreafxtsgum\",\"jglikkxwslolb\",\"pvuzlmv\"]},\"supportedGroupVersions\":[\"lcrpw\",\"xeznoi\",\"brnjwmw\",\"pn\"],\"cultureInfo\":\"azej\",\"parameters\":{\"ugzxnf\":\"kagfhsxtt\",\"uenvrkp\":\"azpxdtnkdmkqjjl\",\"ibreb\":\"ou\"},\"httpMethod\":\"aysjkixqtnqttez\"}")
- .toObject(AzureBackupFindRestorableTimeRangesRequestResource.class);
- Assertions.assertEquals("hcexdrrvqa", model.subscriptionId());
- Assertions.assertEquals("kghtpwijnh", model.uri());
- Assertions.assertEquals("f", model.headers().get("mtg").get(0));
- Assertions.assertEquals("lcrpw", model.supportedGroupVersions().get(0));
- Assertions.assertEquals("azej", model.cultureInfo());
- Assertions.assertEquals("kagfhsxtt", model.parameters().get("ugzxnf"));
- Assertions.assertEquals("aysjkixqtnqttez", model.httpMethod());
- Assertions.assertEquals(RestoreSourceDataStoreType.OPERATIONAL_STORE, model.content().sourceDataStoreType());
- Assertions.assertEquals("yijejvegrhbpnaix", model.content().startTime());
- Assertions.assertEquals("ccbdre", model.content().endTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupFindRestorableTimeRangesRequestResource model =
- new AzureBackupFindRestorableTimeRangesRequestResource()
- .withSubscriptionId("hcexdrrvqa")
- .withUri("kghtpwijnh")
- .withHeaders(
- mapOf(
- "mtg",
- Arrays.asList("f", "cxzbfvoowvr"),
- "pnsxkmcwaek",
- Arrays.asList("ppyostronzmyhgf"),
- "elfk",
- Arrays.asList("jreafxtsgum", "jglikkxwslolb", "pvuzlmv")))
- .withSupportedGroupVersions(Arrays.asList("lcrpw", "xeznoi", "brnjwmw", "pn"))
- .withCultureInfo("azej")
- .withParameters(mapOf("ugzxnf", "kagfhsxtt", "uenvrkp", "azpxdtnkdmkqjjl", "ibreb", "ou"))
- .withHttpMethod("aysjkixqtnqttez")
- .withContent(
- new AzureBackupFindRestorableTimeRangesRequest()
- .withSourceDataStoreType(RestoreSourceDataStoreType.OPERATIONAL_STORE)
- .withStartTime("yijejvegrhbpnaix")
- .withEndTime("ccbdre"));
- model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesRequestResource.class);
- Assertions.assertEquals("hcexdrrvqa", model.subscriptionId());
- Assertions.assertEquals("kghtpwijnh", model.uri());
- Assertions.assertEquals("f", model.headers().get("mtg").get(0));
- Assertions.assertEquals("lcrpw", model.supportedGroupVersions().get(0));
- Assertions.assertEquals("azej", model.cultureInfo());
- Assertions.assertEquals("kagfhsxtt", model.parameters().get("ugzxnf"));
- Assertions.assertEquals("aysjkixqtnqttez", model.httpMethod());
- Assertions.assertEquals(RestoreSourceDataStoreType.OPERATIONAL_STORE, model.content().sourceDataStoreType());
- Assertions.assertEquals("yijejvegrhbpnaix", model.content().startTime());
- Assertions.assertEquals("ccbdre", model.content().endTime());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestTests.java
deleted file mode 100644
index 654b3bfbcf36..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesRequestTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest;
-import com.azure.resourcemanager.dataprotection.models.RestoreSourceDataStoreType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupFindRestorableTimeRangesRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupFindRestorableTimeRangesRequest model =
- BinaryData
- .fromString("{\"sourceDataStoreType\":\"VaultStore\",\"startTime\":\"nqpeh\",\"endTime\":\"doy\"}")
- .toObject(AzureBackupFindRestorableTimeRangesRequest.class);
- Assertions.assertEquals(RestoreSourceDataStoreType.VAULT_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("nqpeh", model.startTime());
- Assertions.assertEquals("doy", model.endTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupFindRestorableTimeRangesRequest model =
- new AzureBackupFindRestorableTimeRangesRequest()
- .withSourceDataStoreType(RestoreSourceDataStoreType.VAULT_STORE)
- .withStartTime("nqpeh")
- .withEndTime("doy");
- model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesRequest.class);
- Assertions.assertEquals(RestoreSourceDataStoreType.VAULT_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("nqpeh", model.startTime());
- Assertions.assertEquals("doy", model.endTime());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseResourceInnerTests.java
deleted file mode 100644
index 370b0858f118..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseResourceInnerTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupFindRestorableTimeRangesResponseResourceInner;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse;
-import com.azure.resourcemanager.dataprotection.models.RestorableTimeRange;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupFindRestorableTimeRangesResponseResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupFindRestorableTimeRangesResponseResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"restorableTimeRanges\":[{\"startTime\":\"thnzd\",\"endTime\":\"dslgnayqigynduh\",\"objectType\":\"hqlkthumaqo\"},{\"startTime\":\"bgycduiertgccym\",\"endTime\":\"aolps\",\"objectType\":\"qlfmmdnbb\"}],\"objectType\":\"zpswiydmc\"},\"id\":\"hzdxssadbzm\",\"name\":\"vdfznudaodvxzb\",\"type\":\"cblylpstdbhhxsr\"}")
- .toObject(AzureBackupFindRestorableTimeRangesResponseResourceInner.class);
- Assertions.assertEquals("thnzd", model.properties().restorableTimeRanges().get(0).startTime());
- Assertions.assertEquals("dslgnayqigynduh", model.properties().restorableTimeRanges().get(0).endTime());
- Assertions.assertEquals("hqlkthumaqo", model.properties().restorableTimeRanges().get(0).objectType());
- Assertions.assertEquals("zpswiydmc", model.properties().objectType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupFindRestorableTimeRangesResponseResourceInner model =
- new AzureBackupFindRestorableTimeRangesResponseResourceInner()
- .withProperties(
- new AzureBackupFindRestorableTimeRangesResponse()
- .withRestorableTimeRanges(
- Arrays
- .asList(
- new RestorableTimeRange()
- .withStartTime("thnzd")
- .withEndTime("dslgnayqigynduh")
- .withObjectType("hqlkthumaqo"),
- new RestorableTimeRange()
- .withStartTime("bgycduiertgccym")
- .withEndTime("aolps")
- .withObjectType("qlfmmdnbb")))
- .withObjectType("zpswiydmc"));
- model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesResponseResourceInner.class);
- Assertions.assertEquals("thnzd", model.properties().restorableTimeRanges().get(0).startTime());
- Assertions.assertEquals("dslgnayqigynduh", model.properties().restorableTimeRanges().get(0).endTime());
- Assertions.assertEquals("hqlkthumaqo", model.properties().restorableTimeRanges().get(0).objectType());
- Assertions.assertEquals("zpswiydmc", model.properties().objectType());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseTests.java
deleted file mode 100644
index 90c7ec665ea9..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupFindRestorableTimeRangesResponseTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse;
-import com.azure.resourcemanager.dataprotection.models.RestorableTimeRange;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupFindRestorableTimeRangesResponseTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupFindRestorableTimeRangesResponse model =
- BinaryData
- .fromString(
- "{\"restorableTimeRanges\":[{\"startTime\":\"ucerscdntnevfi\",\"endTime\":\"jmygtdsslswtmwer\",\"objectType\":\"fzp\"},{\"startTime\":\"qsemwabne\",\"endTime\":\"shhszhedplvwiw\",\"objectType\":\"mwmbes\"},{\"startTime\":\"dnkwwtppjflcxog\",\"endTime\":\"okonzmnsikvmkqz\",\"objectType\":\"qkdltfz\"},{\"startTime\":\"mhhv\",\"endTime\":\"gureodkwobdag\",\"objectType\":\"ibqdxbxwakbogqx\"}],\"objectType\":\"lkzgxhuriplbp\"}")
- .toObject(AzureBackupFindRestorableTimeRangesResponse.class);
- Assertions.assertEquals("ucerscdntnevfi", model.restorableTimeRanges().get(0).startTime());
- Assertions.assertEquals("jmygtdsslswtmwer", model.restorableTimeRanges().get(0).endTime());
- Assertions.assertEquals("fzp", model.restorableTimeRanges().get(0).objectType());
- Assertions.assertEquals("lkzgxhuriplbp", model.objectType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupFindRestorableTimeRangesResponse model =
- new AzureBackupFindRestorableTimeRangesResponse()
- .withRestorableTimeRanges(
- Arrays
- .asList(
- new RestorableTimeRange()
- .withStartTime("ucerscdntnevfi")
- .withEndTime("jmygtdsslswtmwer")
- .withObjectType("fzp"),
- new RestorableTimeRange()
- .withStartTime("qsemwabne")
- .withEndTime("shhszhedplvwiw")
- .withObjectType("mwmbes"),
- new RestorableTimeRange()
- .withStartTime("dnkwwtppjflcxog")
- .withEndTime("okonzmnsikvmkqz")
- .withObjectType("qkdltfz"),
- new RestorableTimeRange()
- .withStartTime("mhhv")
- .withEndTime("gureodkwobdag")
- .withObjectType("ibqdxbxwakbogqx")))
- .withObjectType("lkzgxhuriplbp");
- model = BinaryData.fromObject(model).toObject(AzureBackupFindRestorableTimeRangesResponse.class);
- Assertions.assertEquals("ucerscdntnevfi", model.restorableTimeRanges().get(0).startTime());
- Assertions.assertEquals("jmygtdsslswtmwer", model.restorableTimeRanges().get(0).endTime());
- Assertions.assertEquals("fzp", model.restorableTimeRanges().get(0).objectType());
- Assertions.assertEquals("lkzgxhuriplbp", model.objectType());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupParamsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupParamsTests.java
deleted file mode 100644
index 98c112feb588..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupParamsTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupParams;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupParamsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupParams model =
- BinaryData
- .fromString("{\"objectType\":\"AzureBackupParams\",\"backupType\":\"oiwiithtywub\"}")
- .toObject(AzureBackupParams.class);
- Assertions.assertEquals("oiwiithtywub", model.backupType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupParams model = new AzureBackupParams().withBackupType("oiwiithtywub");
- model = BinaryData.fromObject(model).toObject(AzureBackupParams.class);
- Assertions.assertEquals("oiwiithtywub", model.backupType());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointBasedRestoreRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointBasedRestoreRequestTests.java
deleted file mode 100644
index bd51993e042f..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointBasedRestoreRequestTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointBasedRestoreRequest;
-import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
-import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase;
-import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupRecoveryPointBasedRestoreRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRecoveryPointBasedRestoreRequest model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureBackupRecoveryPointBasedRestoreRequest\",\"recoveryPointId\":\"cbihwqk\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"ntwjch\"},\"sourceDataStoreType\":\"VaultStore\",\"sourceResourceId\":\"oihxumwctondzjlu\",\"identityDetails\":{\"useSystemAssignedIdentity\":true,\"userAssignedIdentityArmUrl\":\"wggytsbwtovvt\"}}")
- .toObject(AzureBackupRecoveryPointBasedRestoreRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("ntwjch", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.VAULT_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("oihxumwctondzjlu", model.sourceResourceId());
- Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("wggytsbwtovvt", model.identityDetails().userAssignedIdentityArmUrl());
- Assertions.assertEquals("cbihwqk", model.recoveryPointId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRecoveryPointBasedRestoreRequest model =
- new AzureBackupRecoveryPointBasedRestoreRequest()
- .withRestoreTargetInfo(
- new RestoreTargetInfoBase()
- .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
- .withRestoreLocation("ntwjch"))
- .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE)
- .withSourceResourceId("oihxumwctondzjlu")
- .withIdentityDetails(
- new IdentityDetails()
- .withUseSystemAssignedIdentity(true)
- .withUserAssignedIdentityArmUrl("wggytsbwtovvt"))
- .withRecoveryPointId("cbihwqk");
- model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPointBasedRestoreRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("ntwjch", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.VAULT_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("oihxumwctondzjlu", model.sourceResourceId());
- Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("wggytsbwtovvt", model.identityDetails().userAssignedIdentityArmUrl());
- Assertions.assertEquals("cbihwqk", model.recoveryPointId());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceInnerTests.java
deleted file mode 100644
index db14cc7a98a3..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceInnerTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint;
-
-public final class AzureBackupRecoveryPointResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRecoveryPointResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"bm\",\"name\":\"ow\",\"type\":\"wpr\"}")
- .toObject(AzureBackupRecoveryPointResourceInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRecoveryPointResourceInner model =
- new AzureBackupRecoveryPointResourceInner().withProperties(new AzureBackupRecoveryPoint());
- model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPointResourceInner.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceListTests.java
deleted file mode 100644
index e793e070e708..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointResourceListTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.AzureBackupRecoveryPointResourceInner;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPointResourceList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupRecoveryPointResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRecoveryPointResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"gjrwjueiotwmcdyt\",\"name\":\"x\",\"type\":\"it\"},{\"properties\":{\"objectType\":\"AzureBackupRecoveryPoint\"},\"id\":\"jawgqwg\",\"name\":\"hniskxfbkpyc\",\"type\":\"klwndnhjdauwhv\"}],\"nextLink\":\"wzbtdhxu\"}")
- .toObject(AzureBackupRecoveryPointResourceList.class);
- Assertions.assertEquals("wzbtdhxu", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRecoveryPointResourceList model =
- new AzureBackupRecoveryPointResourceList()
- .withNextLink("wzbtdhxu")
- .withValue(
- Arrays
- .asList(
- new AzureBackupRecoveryPointResourceInner().withProperties(new AzureBackupRecoveryPoint()),
- new AzureBackupRecoveryPointResourceInner()
- .withProperties(new AzureBackupRecoveryPoint())));
- model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPointResourceList.class);
- Assertions.assertEquals("wzbtdhxu", model.nextLink());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointTests.java
deleted file mode 100644
index a0e650e9bbce..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryPointTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryPoint;
-
-public final class AzureBackupRecoveryPointTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRecoveryPoint model =
- BinaryData
- .fromString("{\"objectType\":\"AzureBackupRecoveryPoint\"}")
- .toObject(AzureBackupRecoveryPoint.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRecoveryPoint model = new AzureBackupRecoveryPoint();
- model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryPoint.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryTimeBasedRestoreRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryTimeBasedRestoreRequestTests.java
deleted file mode 100644
index 7b1d314b4c77..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRecoveryTimeBasedRestoreRequestTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRecoveryTimeBasedRestoreRequest;
-import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
-import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase;
-import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupRecoveryTimeBasedRestoreRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRecoveryTimeBasedRestoreRequest model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureBackupRecoveryTimeBasedRestoreRequest\",\"recoveryPointTime\":\"ronasxift\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"yzhftwesgogczh\"},\"sourceDataStoreType\":\"ArchiveStore\",\"sourceResourceId\":\"xkr\",\"identityDetails\":{\"useSystemAssignedIdentity\":true,\"userAssignedIdentityArmUrl\":\"mossxkkgthrrghxj\"}}")
- .toObject(AzureBackupRecoveryTimeBasedRestoreRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("yzhftwesgogczh", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("xkr", model.sourceResourceId());
- Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("mossxkkgthrrghxj", model.identityDetails().userAssignedIdentityArmUrl());
- Assertions.assertEquals("ronasxift", model.recoveryPointTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRecoveryTimeBasedRestoreRequest model =
- new AzureBackupRecoveryTimeBasedRestoreRequest()
- .withRestoreTargetInfo(
- new RestoreTargetInfoBase()
- .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
- .withRestoreLocation("yzhftwesgogczh"))
- .withSourceDataStoreType(SourceDataStoreType.ARCHIVE_STORE)
- .withSourceResourceId("xkr")
- .withIdentityDetails(
- new IdentityDetails()
- .withUseSystemAssignedIdentity(true)
- .withUserAssignedIdentityArmUrl("mossxkkgthrrghxj"))
- .withRecoveryPointTime("ronasxift");
- model = BinaryData.fromObject(model).toObject(AzureBackupRecoveryTimeBasedRestoreRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("yzhftwesgogczh", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("xkr", model.sourceResourceId());
- Assertions.assertEquals(true, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("mossxkkgthrrghxj", model.identityDetails().userAssignedIdentityArmUrl());
- Assertions.assertEquals("ronasxift", model.recoveryPointTime());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRehydrationRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRehydrationRequestTests.java
deleted file mode 100644
index f0499b3c6759..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRehydrationRequestTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRehydrationRequest;
-import com.azure.resourcemanager.dataprotection.models.RehydrationPriority;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupRehydrationRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRehydrationRequest model =
- BinaryData
- .fromString(
- "{\"recoveryPointId\":\"qlveualupjmkh\",\"rehydrationPriority\":\"High\",\"rehydrationRetentionDuration\":\"bbcswsrtjri\"}")
- .toObject(AzureBackupRehydrationRequest.class);
- Assertions.assertEquals("qlveualupjmkh", model.recoveryPointId());
- Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority());
- Assertions.assertEquals("bbcswsrtjri", model.rehydrationRetentionDuration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRehydrationRequest model =
- new AzureBackupRehydrationRequest()
- .withRecoveryPointId("qlveualupjmkh")
- .withRehydrationPriority(RehydrationPriority.HIGH)
- .withRehydrationRetentionDuration("bbcswsrtjri");
- model = BinaryData.fromObject(model).toObject(AzureBackupRehydrationRequest.class);
- Assertions.assertEquals("qlveualupjmkh", model.recoveryPointId());
- Assertions.assertEquals(RehydrationPriority.HIGH, model.rehydrationPriority());
- Assertions.assertEquals("bbcswsrtjri", model.rehydrationRetentionDuration());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreRequestTests.java
deleted file mode 100644
index 62ad5574eb7f..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreRequestTests.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
-import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
-import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase;
-import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupRestoreRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRestoreRequest model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureBackupRestoreRequest\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"bpbewtghfgb\"},\"sourceDataStoreType\":\"ArchiveStore\",\"sourceResourceId\":\"wxzvlvqhjkb\",\"identityDetails\":{\"useSystemAssignedIdentity\":false,\"userAssignedIdentityArmUrl\":\"nmxiebwwaloayqc\"}}")
- .toObject(AzureBackupRestoreRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("bpbewtghfgb", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("wxzvlvqhjkb", model.sourceResourceId());
- Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("nmxiebwwaloayqc", model.identityDetails().userAssignedIdentityArmUrl());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRestoreRequest model =
- new AzureBackupRestoreRequest()
- .withRestoreTargetInfo(
- new RestoreTargetInfoBase()
- .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
- .withRestoreLocation("bpbewtghfgb"))
- .withSourceDataStoreType(SourceDataStoreType.ARCHIVE_STORE)
- .withSourceResourceId("wxzvlvqhjkb")
- .withIdentityDetails(
- new IdentityDetails()
- .withUseSystemAssignedIdentity(false)
- .withUserAssignedIdentityArmUrl("nmxiebwwaloayqc"));
- model = BinaryData.fromObject(model).toObject(AzureBackupRestoreRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("bpbewtghfgb", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("wxzvlvqhjkb", model.sourceResourceId());
- Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("nmxiebwwaloayqc", model.identityDetails().userAssignedIdentityArmUrl());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreWithRehydrationRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreWithRehydrationRequestTests.java
deleted file mode 100644
index 6ed638ac83e3..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRestoreWithRehydrationRequestTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreWithRehydrationRequest;
-import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
-import com.azure.resourcemanager.dataprotection.models.RehydrationPriority;
-import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase;
-import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupRestoreWithRehydrationRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRestoreWithRehydrationRequest model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureBackupRestoreWithRehydrationRequest\",\"rehydrationPriority\":\"Standard\",\"rehydrationRetentionDuration\":\"einqf\",\"recoveryPointId\":\"ufxqknpirgnepttw\",\"restoreTargetInfo\":{\"objectType\":\"RestoreTargetInfoBase\",\"recoveryOption\":\"FailIfExists\",\"restoreLocation\":\"niffcdmqnroj\"},\"sourceDataStoreType\":\"ArchiveStore\",\"sourceResourceId\":\"jnkrxf\",\"identityDetails\":{\"useSystemAssignedIdentity\":false,\"userAssignedIdentityArmUrl\":\"ratiz\"}}")
- .toObject(AzureBackupRestoreWithRehydrationRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("niffcdmqnroj", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("jnkrxf", model.sourceResourceId());
- Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("ratiz", model.identityDetails().userAssignedIdentityArmUrl());
- Assertions.assertEquals("ufxqknpirgnepttw", model.recoveryPointId());
- Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority());
- Assertions.assertEquals("einqf", model.rehydrationRetentionDuration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRestoreWithRehydrationRequest model =
- new AzureBackupRestoreWithRehydrationRequest()
- .withRestoreTargetInfo(
- new RestoreTargetInfoBase()
- .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
- .withRestoreLocation("niffcdmqnroj"))
- .withSourceDataStoreType(SourceDataStoreType.ARCHIVE_STORE)
- .withSourceResourceId("jnkrxf")
- .withIdentityDetails(
- new IdentityDetails().withUseSystemAssignedIdentity(false).withUserAssignedIdentityArmUrl("ratiz"))
- .withRecoveryPointId("ufxqknpirgnepttw")
- .withRehydrationPriority(RehydrationPriority.STANDARD)
- .withRehydrationRetentionDuration("einqf");
- model = BinaryData.fromObject(model).toObject(AzureBackupRestoreWithRehydrationRequest.class);
- Assertions.assertEquals(RecoveryOption.FAIL_IF_EXISTS, model.restoreTargetInfo().recoveryOption());
- Assertions.assertEquals("niffcdmqnroj", model.restoreTargetInfo().restoreLocation());
- Assertions.assertEquals(SourceDataStoreType.ARCHIVE_STORE, model.sourceDataStoreType());
- Assertions.assertEquals("jnkrxf", model.sourceResourceId());
- Assertions.assertEquals(false, model.identityDetails().useSystemAssignedIdentity());
- Assertions.assertEquals("ratiz", model.identityDetails().userAssignedIdentityArmUrl());
- Assertions.assertEquals("ufxqknpirgnepttw", model.recoveryPointId());
- Assertions.assertEquals(RehydrationPriority.STANDARD, model.rehydrationPriority());
- Assertions.assertEquals("einqf", model.rehydrationRetentionDuration());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRuleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRuleTests.java
deleted file mode 100644
index ee22fd25629d..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureBackupRuleTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRule;
-import com.azure.resourcemanager.dataprotection.models.BackupParameters;
-import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase;
-import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.TriggerContext;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureBackupRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureBackupRule model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureBackupRule\",\"backupParameters\":{\"objectType\":\"BackupParameters\"},\"dataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"qxvcxgfrpdsofb\"},\"trigger\":{\"objectType\":\"TriggerContext\"},\"name\":\"hrnsvbu\"}")
- .toObject(AzureBackupRule.class);
- Assertions.assertEquals("hrnsvbu", model.name());
- Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStore().dataStoreType());
- Assertions.assertEquals("qxvcxgfrpdsofb", model.dataStore().objectType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureBackupRule model =
- new AzureBackupRule()
- .withName("hrnsvbu")
- .withBackupParameters(new BackupParameters())
- .withDataStore(
- new DataStoreInfoBase()
- .withDataStoreType(DataStoreTypes.ARCHIVE_STORE)
- .withObjectType("qxvcxgfrpdsofb"))
- .withTrigger(new TriggerContext());
- model = BinaryData.fromObject(model).toObject(AzureBackupRule.class);
- Assertions.assertEquals("hrnsvbu", model.name());
- Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStore().dataStoreType());
- Assertions.assertEquals("qxvcxgfrpdsofb", model.dataStore().objectType());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureMonitorAlertSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureMonitorAlertSettingsTests.java
deleted file mode 100644
index 8d306dde08b5..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureMonitorAlertSettingsTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureMonitorAlertSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureMonitorAlertSettings model =
- BinaryData
- .fromString("{\"alertsForAllJobFailures\":\"Disabled\"}")
- .toObject(AzureMonitorAlertSettings.class);
- Assertions.assertEquals(AlertsState.DISABLED, model.alertsForAllJobFailures());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureMonitorAlertSettings model =
- new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.DISABLED);
- model = BinaryData.fromObject(model).toObject(AzureMonitorAlertSettings.class);
- Assertions.assertEquals(AlertsState.DISABLED, model.alertsForAllJobFailures());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureOperationalStoreParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureOperationalStoreParametersTests.java
deleted file mode 100644
index 4d6b2b9c90b7..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureOperationalStoreParametersTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureOperationalStoreParameters;
-import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureOperationalStoreParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureOperationalStoreParameters model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureOperationalStoreParameters\",\"resourceGroupId\":\"wnopqgikyzirtx\",\"dataStoreType\":\"VaultStore\"}")
- .toObject(AzureOperationalStoreParameters.class);
- Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType());
- Assertions.assertEquals("wnopqgikyzirtx", model.resourceGroupId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureOperationalStoreParameters model =
- new AzureOperationalStoreParameters()
- .withDataStoreType(DataStoreTypes.VAULT_STORE)
- .withResourceGroupId("wnopqgikyzirtx");
- model = BinaryData.fromObject(model).toObject(AzureOperationalStoreParameters.class);
- Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType());
- Assertions.assertEquals("wnopqgikyzirtx", model.resourceGroupId());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureRetentionRuleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureRetentionRuleTests.java
deleted file mode 100644
index f4de46cd7703..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/AzureRetentionRuleTests.java
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AzureRetentionRule;
-import com.azure.resourcemanager.dataprotection.models.CopyOption;
-import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase;
-import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.DeleteOption;
-import com.azure.resourcemanager.dataprotection.models.SourceLifeCycle;
-import com.azure.resourcemanager.dataprotection.models.TargetCopySetting;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureRetentionRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureRetentionRule model =
- BinaryData
- .fromString(
- "{\"objectType\":\"AzureRetentionRule\",\"isDefault\":false,\"lifecycles\":[{\"deleteAfter\":{\"objectType\":\"DeleteOption\",\"duration\":\"sdvlmfwdgzxulucv\"},\"sourceDataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"mrsreuzvxurisjnh\"},\"targetDataStoreCopySettings\":[{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"ifqjz\"}},{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"OperationalStore\",\"objectType\":\"mrhublwpc\"}}]},{\"deleteAfter\":{\"objectType\":\"DeleteOption\",\"duration\":\"sutrgjup\"},\"sourceDataStore\":{\"dataStoreType\":\"ArchiveStore\",\"objectType\":\"utpwoqhihejqgw\"},\"targetDataStoreCopySettings\":[{\"copyAfter\":{\"objectType\":\"CopyOption\"},\"dataStore\":{\"dataStoreType\":\"VaultStore\",\"objectType\":\"qntcypsxjvfoimwk\"}}]}],\"name\":\"lirc\"}")
- .toObject(AzureRetentionRule.class);
- Assertions.assertEquals("lirc", model.name());
- Assertions.assertEquals(false, model.isDefault());
- Assertions.assertEquals("sdvlmfwdgzxulucv", model.lifecycles().get(0).deleteAfter().duration());
- Assertions
- .assertEquals(DataStoreTypes.ARCHIVE_STORE, model.lifecycles().get(0).sourceDataStore().dataStoreType());
- Assertions.assertEquals("mrsreuzvxurisjnh", model.lifecycles().get(0).sourceDataStore().objectType());
- Assertions
- .assertEquals(
- DataStoreTypes.ARCHIVE_STORE,
- model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().dataStoreType());
- Assertions
- .assertEquals(
- "ifqjz", model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().objectType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureRetentionRule model =
- new AzureRetentionRule()
- .withName("lirc")
- .withIsDefault(false)
- .withLifecycles(
- Arrays
- .asList(
- new SourceLifeCycle()
- .withDeleteAfter(new DeleteOption().withDuration("sdvlmfwdgzxulucv"))
- .withSourceDataStore(
- new DataStoreInfoBase()
- .withDataStoreType(DataStoreTypes.ARCHIVE_STORE)
- .withObjectType("mrsreuzvxurisjnh"))
- .withTargetDataStoreCopySettings(
- Arrays
- .asList(
- new TargetCopySetting()
- .withCopyAfter(new CopyOption())
- .withDataStore(
- new DataStoreInfoBase()
- .withDataStoreType(DataStoreTypes.ARCHIVE_STORE)
- .withObjectType("ifqjz")),
- new TargetCopySetting()
- .withCopyAfter(new CopyOption())
- .withDataStore(
- new DataStoreInfoBase()
- .withDataStoreType(DataStoreTypes.OPERATIONAL_STORE)
- .withObjectType("mrhublwpc")))),
- new SourceLifeCycle()
- .withDeleteAfter(new DeleteOption().withDuration("sutrgjup"))
- .withSourceDataStore(
- new DataStoreInfoBase()
- .withDataStoreType(DataStoreTypes.ARCHIVE_STORE)
- .withObjectType("utpwoqhihejqgw"))
- .withTargetDataStoreCopySettings(
- Arrays
- .asList(
- new TargetCopySetting()
- .withCopyAfter(new CopyOption())
- .withDataStore(
- new DataStoreInfoBase()
- .withDataStoreType(DataStoreTypes.VAULT_STORE)
- .withObjectType("qntcypsxjvfoimwk"))))));
- model = BinaryData.fromObject(model).toObject(AzureRetentionRule.class);
- Assertions.assertEquals("lirc", model.name());
- Assertions.assertEquals(false, model.isDefault());
- Assertions.assertEquals("sdvlmfwdgzxulucv", model.lifecycles().get(0).deleteAfter().duration());
- Assertions
- .assertEquals(DataStoreTypes.ARCHIVE_STORE, model.lifecycles().get(0).sourceDataStore().dataStoreType());
- Assertions.assertEquals("mrsreuzvxurisjnh", model.lifecycles().get(0).sourceDataStore().objectType());
- Assertions
- .assertEquals(
- DataStoreTypes.ARCHIVE_STORE,
- model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().dataStoreType());
- Assertions
- .assertEquals(
- "ifqjz", model.lifecycles().get(0).targetDataStoreCopySettings().get(0).dataStore().objectType());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupCriteriaTests.java
deleted file mode 100644
index 30d501819073..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupCriteriaTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BackupCriteria;
-
-public final class BackupCriteriaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupCriteria model =
- BinaryData.fromString("{\"objectType\":\"BackupCriteria\"}").toObject(BackupCriteria.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupCriteria model = new BackupCriteria();
- model = BinaryData.fromObject(model).toObject(BackupCriteria.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupDatasourceParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupDatasourceParametersTests.java
deleted file mode 100644
index c11a73f3ef17..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupDatasourceParametersTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BackupDatasourceParameters;
-
-public final class BackupDatasourceParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupDatasourceParameters model =
- BinaryData
- .fromString("{\"objectType\":\"BackupDatasourceParameters\"}")
- .toObject(BackupDatasourceParameters.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupDatasourceParameters model = new BackupDatasourceParameters();
- model = BinaryData.fromObject(model).toObject(BackupDatasourceParameters.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupMockTests.java
deleted file mode 100644
index e474af8a4e2e..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesAdhocBackupMockTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AdHocBackupRuleOptions;
-import com.azure.resourcemanager.dataprotection.models.AdhocBackupTriggerOption;
-import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
-import com.azure.resourcemanager.dataprotection.models.TriggerBackupRequest;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesAdhocBackupMockTests {
- @Test
- public void testAdhocBackup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"gyyprotwy\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationJobExtendedInfo response =
- manager
- .backupInstances()
- .adhocBackup(
- "mexiitdfuxt",
- "asiibmiybnnust",
- "nlj",
- new TriggerBackupRequest()
- .withBackupRuleOptions(
- new AdHocBackupRuleOptions()
- .withRuleName("nmgixh")
- .withTriggerOption(
- new AdhocBackupTriggerOption().withRetentionTagOverride("avmqfoudor"))),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("gyyprotwy", response.jobId());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteMockTests.java
deleted file mode 100644
index f029087988d2..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.backupInstances().delete("gh", "iypoqeyhlqhykprl", "yznuciqd", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsMockTests.java
deleted file mode 100644
index 9ec248106407..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeBackupsMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesResumeBackupsMockTests {
- @Test
- public void testResumeBackups() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.backupInstances().resumeBackups("hv", "slkvntjl", "igjkskyrio", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionMockTests.java
deleted file mode 100644
index 40cf358f61be..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesResumeProtectionMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesResumeProtectionMockTests {
- @Test
- public void testResumeProtection() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.backupInstances().resumeProtection("vzidsxwaab", "mifrygznmma", "ri", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionMockTests.java
deleted file mode 100644
index d4da206f57cc..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesStopProtectionMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesStopProtectionMockTests {
- @Test
- public void testStopProtection() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .backupInstances()
- .stopProtection("kzobgopxlhsln", "lxieixynllxecwcr", "jphslhcaw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsMockTests.java
deleted file mode 100644
index 30c5cd91fc8a..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSuspendBackupsMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesSuspendBackupsMockTests {
- @Test
- public void testSuspendBackups() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.backupInstances().suspendBackups("u", "i", "dwfmvigorqjb", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceMockTests.java
deleted file mode 100644
index f6195225f40b..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesSyncBackupInstanceMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.SyncBackupInstanceRequest;
-import com.azure.resourcemanager.dataprotection.models.SyncType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesSyncBackupInstanceMockTests {
- @Test
- public void testSyncBackupInstance() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .backupInstances()
- .syncBackupInstance(
- "tzh",
- "aglkafhon",
- "juj",
- new SyncBackupInstanceRequest().withSyncType(SyncType.FORCE_RESYNC),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreMockTests.java
deleted file mode 100644
index 558c43c38ca1..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesTriggerRestoreMockTests.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
-import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
-import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
-import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase;
-import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesTriggerRestoreMockTests {
- @Test
- public void testTriggerRestore() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"bp\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationJobExtendedInfo response =
- manager
- .backupInstances()
- .triggerRestore(
- "zh",
- "jqg",
- "cfhmlrqryxyn",
- new AzureBackupRestoreRequest()
- .withRestoreTargetInfo(
- new RestoreTargetInfoBase()
- .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
- .withRestoreLocation("rd"))
- .withSourceDataStoreType(SourceDataStoreType.VAULT_STORE)
- .withSourceResourceId("vwxzn")
- .withIdentityDetails(
- new IdentityDetails()
- .withUseSystemAssignedIdentity(false)
- .withUserAssignedIdentityArmUrl("iyb")),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("bp", response.jobId());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreMockTests.java
deleted file mode 100644
index e039c3cee2aa..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupInstancesValidateForRestoreMockTests.java
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AzureBackupRestoreRequest;
-import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
-import com.azure.resourcemanager.dataprotection.models.RecoveryOption;
-import com.azure.resourcemanager.dataprotection.models.RestoreTargetInfoBase;
-import com.azure.resourcemanager.dataprotection.models.SourceDataStoreType;
-import com.azure.resourcemanager.dataprotection.models.ValidateRestoreRequestObject;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupInstancesValidateForRestoreMockTests {
- @Test
- public void testValidateForRestore() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"asflvg\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationJobExtendedInfo response =
- manager
- .backupInstances()
- .validateForRestore(
- "kpzvcpopmxelnwc",
- "tyjedex",
- "mlfmkqs",
- new ValidateRestoreRequestObject()
- .withRestoreRequestObject(
- new AzureBackupRestoreRequest()
- .withRestoreTargetInfo(
- new RestoreTargetInfoBase()
- .withRecoveryOption(RecoveryOption.FAIL_IF_EXISTS)
- .withRestoreLocation("uawxtzx"))
- .withSourceDataStoreType(SourceDataStoreType.OPERATIONAL_STORE)
- .withSourceResourceId("mwabzxrvxc")
- .withIdentityDetails(
- new IdentityDetails()
- .withUseSystemAssignedIdentity(true)
- .withUserAssignedIdentityArmUrl("haivm"))),
- com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("asflvg", response.jobId());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupParametersTests.java
deleted file mode 100644
index b7e73cad636a..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupParametersTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BackupParameters;
-
-public final class BackupParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupParameters model =
- BinaryData.fromString("{\"objectType\":\"BackupParameters\"}").toObject(BackupParameters.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupParameters model = new BackupParameters();
- model = BinaryData.fromObject(model).toObject(BackupParameters.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index c12035fe4c3e..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupPoliciesCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"idizozsdbccxjmo\",\"fdgnwncypuuwwlt\",\"uqj\"]},\"id\":\"zenkeifzzhmkd\",\"name\":\"svflyhbxcudch\",\"type\":\"gsrboldforobw\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- BaseBackupPolicyResource response =
- manager
- .backupPolicies()
- .define("jtszcof")
- .withExistingBackupVault("gnl", "zonzlrpiqywnc")
- .withProperties(new BaseBackupPolicy().withDatasourceTypes(Arrays.asList("htd")))
- .create();
-
- Assertions.assertEquals("idizozsdbccxjmo", response.properties().datasourceTypes().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteWithResponseMockTests.java
deleted file mode 100644
index 7f7de852ff06..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupPoliciesDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.backupPolicies().deleteWithResponse("xzhczexrxz", "ujrtrhqvwr", "vk", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetWithResponseMockTests.java
deleted file mode 100644
index 03f9ab16e680..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupPoliciesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"eioqaqhvse\",\"fuqyrxpdlcgqlsi\"]},\"id\":\"jqfrddgamquh\",\"name\":\"os\",\"type\":\"sjuivfcdisyir\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- BaseBackupPolicyResource response =
- manager
- .backupPolicies()
- .getWithResponse("zaapmudqmeqwi", "pibudqwyxebeybpm", "znrtffyaqit", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("eioqaqhvse", response.properties().datasourceTypes().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListMockTests.java
deleted file mode 100644
index dc96d9bd3c89..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPoliciesListMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupPoliciesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"wm\",\"xmeb\",\"jscjpahl\",\"veabfqxnmwmqtib\"]},\"id\":\"ijddtvqc\",\"name\":\"tad\",\"type\":\"jaeukmrsieekpn\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.backupPolicies().list("wxdzaumweoohgu", "fuzboyjathwtzolb", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("wm", response.iterator().next().properties().datasourceTypes().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPolicyTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPolicyTests.java
deleted file mode 100644
index d13701d5dea4..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupPolicyTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BackupPolicy;
-import com.azure.resourcemanager.dataprotection.models.BasePolicyRule;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BackupPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupPolicy model =
- BinaryData
- .fromString(
- "{\"objectType\":\"BackupPolicy\",\"policyRules\":[{\"objectType\":\"BasePolicyRule\",\"name\":\"bejdznxcv\"},{\"objectType\":\"BasePolicyRule\",\"name\":\"srhnjivo\"},{\"objectType\":\"BasePolicyRule\",\"name\":\"v\"},{\"objectType\":\"BasePolicyRule\",\"name\":\"novqfzge\"}],\"datasourceTypes\":[\"dftuljltduce\",\"mtmczuome\",\"wcw\"]}")
- .toObject(BackupPolicy.class);
- Assertions.assertEquals("dftuljltduce", model.datasourceTypes().get(0));
- Assertions.assertEquals("bejdznxcv", model.policyRules().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupPolicy model =
- new BackupPolicy()
- .withDatasourceTypes(Arrays.asList("dftuljltduce", "mtmczuome", "wcw"))
- .withPolicyRules(
- Arrays
- .asList(
- new BasePolicyRule().withName("bejdznxcv"),
- new BasePolicyRule().withName("srhnjivo"),
- new BasePolicyRule().withName("v"),
- new BasePolicyRule().withName("novqfzge")));
- model = BinaryData.fromObject(model).toObject(BackupPolicy.class);
- Assertions.assertEquals("dftuljltduce", model.datasourceTypes().get(0));
- Assertions.assertEquals("bejdznxcv", model.policyRules().get(0).name());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupScheduleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupScheduleTests.java
deleted file mode 100644
index 52a01d82afdb..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupScheduleTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BackupSchedule;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BackupScheduleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupSchedule model =
- BinaryData
- .fromString("{\"repeatingTimeIntervals\":[\"ioknssxmoj\",\"sv\",\"kjprvk\"],\"timeZone\":\"fz\"}")
- .toObject(BackupSchedule.class);
- Assertions.assertEquals("ioknssxmoj", model.repeatingTimeIntervals().get(0));
- Assertions.assertEquals("fz", model.timeZone());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupSchedule model =
- new BackupSchedule()
- .withRepeatingTimeIntervals(Arrays.asList("ioknssxmoj", "sv", "kjprvk"))
- .withTimeZone("fz");
- model = BinaryData.fromObject(model).toObject(BackupSchedule.class);
- Assertions.assertEquals("ioknssxmoj", model.repeatingTimeIntervals().get(0));
- Assertions.assertEquals("fz", model.timeZone());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetWithResponseMockTests.java
deleted file mode 100644
index 5fcb50dd9b7c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultOperationResultsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupVaultOperationResultsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"PartialSuccess\",\"resourceMoveDetails\":{\"operationId\":\"bmxva\",\"startTimeUtc\":\"efdeesve\",\"completionTimeUtc\":\"ijpxtx\",\"sourceResourcePath\":\"wprtu\",\"targetResourcePath\":\"sawddjibabxvi\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"On\",\"retentionDurationInDays\":35.69950221341751},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"},{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"},{\"datastoreType\":\"ArchiveStore\",\"type\":\"GeoRedundant\"},{\"datastoreType\":\"OperationalStore\",\"type\":\"GeoRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Minimum\"},\"identity\":{\"principalId\":\"xudb\",\"tenantId\":\"odhtnsirudhzm\",\"type\":\"sckdlp\",\"userAssignedIdentities\":{\"x\":{\"principalId\":\"ded892d5-40a8-40f4-9383-1747c1db5cff\",\"clientId\":\"73b5760b-fc94-4df6-b05b-48ae4ff02d44\"},\"lc\":{\"principalId\":\"c5be0ed3-817a-44c1-852c-805439e2cba0\",\"clientId\":\"c34c8d19-4ef5-4c54-9d54-65208b3a89db\"},\"m\":{\"principalId\":\"adeeee11-3f3c-4339-a5ba-c037bc315121\",\"clientId\":\"f789ff75-8e1a-4f3d-971a-eb20d759c6f5\"},\"xdfgsftufqobr\":{\"principalId\":\"58000328-b64f-486b-83a7-4f9ca25aea32\",\"clientId\":\"84b08a3f-178a-4aa0-bf2b-01786164c24b\"}}},\"eTag\":\"nac\",\"location\":\"ckknhxkizvy\",\"tags\":{\"aaeranokqgukk\":\"zvulj\",\"oylaxxul\":\"qnvb\"},\"id\":\"disdosfjbjsvgj\",\"name\":\"whryvycytdcl\",\"type\":\"gc\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- BackupVaultResource response =
- manager
- .backupVaultOperationResults()
- .getWithResponse("ckt", "iymerteeammxqi", "kk", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("ckknhxkizvy", response.location());
- Assertions.assertEquals("zvulj", response.tags().get("aaeranokqgukk"));
- Assertions.assertEquals("nac", response.etag());
- Assertions.assertEquals("sckdlp", response.identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- response.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions
- .assertEquals(SoftDeleteState.ON, response.properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 35.69950221341751D,
- response.properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.DISABLED, response.properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE, response.properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, response.properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- response.properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED,
- response.properties().featureSettings().crossRegionRestoreSettings().state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceInnerTests.java
deleted file mode 100644
index d9bc35b5bb3d..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceInnerTests.java
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import com.azure.resourcemanager.dataprotection.models.BackupVault;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
-import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSetting;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class BackupVaultResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupVaultResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Failed\",\"resourceMoveState\":\"PrepareTimedout\",\"resourceMoveDetails\":{\"operationId\":\"v\",\"startTimeUtc\":\"mjqulngsn\",\"completionTimeUtc\":\"bybkzgcwrwclxx\",\"sourceResourcePath\":\"ljdousk\",\"targetResourcePath\":\"vkocrcjdkwtn\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":30.743644504476197},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"ppeebvmgxsab\",\"tenantId\":\"qduujitcjczdz\",\"type\":\"ndhkrw\",\"userAssignedIdentities\":{\"dsbdkvwrwjf\":{\"principalId\":\"31776e23-8c83-4449-96f9-1cf2a857ddc1\",\"clientId\":\"b575cc54-aa3b-408a-b375-706c48648f79\"}}},\"eTag\":\"snhu\",\"location\":\"eltmrldhugjzzdat\",\"tags\":{\"geablgphuticndvk\":\"oc\",\"ftyxolniw\":\"ozwyiftyhxhuro\"},\"id\":\"wcukjfkgiawxk\",\"name\":\"ryplwckbasyypn\",\"type\":\"dhsgcba\"}")
- .toObject(BackupVaultResourceInner.class);
- Assertions.assertEquals("eltmrldhugjzzdat", model.location());
- Assertions.assertEquals("oc", model.tags().get("geablgphuticndvk"));
- Assertions.assertEquals("snhu", model.etag());
- Assertions.assertEquals("ndhkrw", model.identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 30.743644504476197D,
- model.properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE, model.properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, model.properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.PERMANENTLY_DISABLED,
- model.properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.ENABLED,
- model.properties().featureSettings().crossRegionRestoreSettings().state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupVaultResourceInner model =
- new BackupVaultResourceInner()
- .withLocation("eltmrldhugjzzdat")
- .withTags(mapOf("geablgphuticndvk", "oc", "ftyxolniw", "ozwyiftyhxhuro"))
- .withEtag("snhu")
- .withIdentity(
- new DppIdentityDetails()
- .withType("ndhkrw")
- .withUserAssignedIdentities(mapOf("dsbdkvwrwjf", new UserAssignedIdentity())))
- .withProperties(
- new BackupVault()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.DISABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.ALWAYS_ON)
- .withRetentionDurationInDays(30.743644504476197D))
- .withImmutabilitySettings(
- new ImmutabilitySettings().withState(ImmutabilityState.DISABLED)))
- .withStorageSettings(
- Arrays
- .asList(
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE)
- .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED))));
- model = BinaryData.fromObject(model).toObject(BackupVaultResourceInner.class);
- Assertions.assertEquals("eltmrldhugjzzdat", model.location());
- Assertions.assertEquals("oc", model.tags().get("geablgphuticndvk"));
- Assertions.assertEquals("snhu", model.etag());
- Assertions.assertEquals("ndhkrw", model.identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 30.743644504476197D,
- model.properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE, model.properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, model.properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.PERMANENTLY_DISABLED,
- model.properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.ENABLED,
- model.properties().featureSettings().crossRegionRestoreSettings().state());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceListTests.java
deleted file mode 100644
index 62a4e36fd679..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultResourceListTests.java
+++ /dev/null
@@ -1,277 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import com.azure.resourcemanager.dataprotection.models.BackupVault;
-import com.azure.resourcemanager.dataprotection.models.BackupVaultResourceList;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
-import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSetting;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class BackupVaultResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupVaultResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"InProgress\",\"resourceMoveDetails\":{\"operationId\":\"czmehmtzopbsp\",\"startTimeUtc\":\"upi\",\"completionTimeUtc\":\"sybbejhph\",\"sourceResourcePath\":\"cmsxaobhdxbm\",\"targetResourcePath\":\"ioq\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"On\",\"retentionDurationInDays\":12.53974621306525},\"immutabilitySettings\":{\"state\":\"Locked\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"gkdmb\",\"tenantId\":\"zlobcufpd\",\"type\":\"rbt\",\"userAssignedIdentities\":{\"qglhq\":{\"principalId\":\"f2d3b8e7-52a0-4f8b-b8c7-36079f909e5d\",\"clientId\":\"0cff634b-fd47-4068-b753-cfe92b8d0770\"},\"foooj\":{\"principalId\":\"0eaa23b0-2246-4ac9-9535-d7a040c9eeb6\",\"clientId\":\"3b924f59-ee26-4a50-a04d-68b9c823eb9a\"},\"fsqesaagdfmglzlh\":{\"principalId\":\"6ed79fac-a234-44ee-8992-1d781ed629a6\",\"clientId\":\"d9e48a54-1d25-4553-a9e1-5b77ad8009fc\"},\"ifkwmrvktsizntoc\":{\"principalId\":\"6145262b-4c14-4055-9825-0c4b1036b8a7\",\"clientId\":\"5bf44891-dd30-45d2-b606-3a01f0586d48\"}}},\"eTag\":\"a\",\"location\":\"ajpsquc\",\"tags\":{\"kfo\":\"yf\"},\"id\":\"knygjofjddeq\",\"name\":\"rd\",\"type\":\"upewnwreitjzy\"},{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"CommitTimedout\",\"resourceMoveDetails\":{\"operationId\":\"qhsmyurkdtml\",\"startTimeUtc\":\"ekuksjtx\",\"completionTimeUtc\":\"cdm\",\"sourceResourcePath\":\"rcryuanzwuxzdxta\",\"targetResourcePath\":\"lhmwhfpmrqobm\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":30.42594303603623},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"storageSettings\":[{\"datastoreType\":\"OperationalStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"zufcyzkohdbi\",\"tenantId\":\"nufhf\",\"type\":\"jysagith\",\"userAssignedIdentities\":{\"ifpikxwczby\":{\"principalId\":\"ef399efe-6d7b-4c2d-a4e3-61ff69034318\",\"clientId\":\"7db38b12-8fb5-4bc4-8eee-981e777a83be\"}}},\"eTag\":\"npqxuh\",\"location\":\"y\",\"tags\":{\"rkxvdum\":\"wby\",\"xgaudccs\":\"grtfwvu\",\"jcny\":\"h\",\"kryhtnapczwlokj\":\"j\"},\"id\":\"emkkvnipjox\",\"name\":\"jnchgej\",\"type\":\"podmailzydehojwy\"},{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"CommitTimedout\",\"resourceMoveDetails\":{\"operationId\":\"aqwi\",\"startTimeUtc\":\"sprozvcput\",\"completionTimeUtc\":\"jvwmfda\",\"sourceResourcePath\":\"cmdv\",\"targetResourcePath\":\"hulsuuvmkjozkrwf\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":59.75135945335241},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"OperationalStore\",\"type\":\"GeoRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"None\"},\"identity\":{\"principalId\":\"lahbcryff\",\"tenantId\":\"dosyg\",\"type\":\"paojakhmsbzjh\",\"userAssignedIdentities\":{\"dphlxaolt\":{\"principalId\":\"cbc53dd9-b826-4009-88b3-a2f5261abe4d\",\"clientId\":\"cd7e0a0a-a5e2-4c16-ba4c-e561a5008c3e\"},\"rgqjbpfzfsinzg\":{\"principalId\":\"be86cbae-a4b5-4e66-810c-4b462e1e04dd\",\"clientId\":\"38642b6a-9468-46e6-a44c-361a9720c2a0\"}}},\"eTag\":\"cjrwzoxxjtfellu\",\"location\":\"zitonpeqfpjkjl\",\"tags\":{\"nmayhuybb\":\"pdvhpfxxypin\",\"inuvamiheogn\":\"podepoo\",\"usivye\":\"rxzxtheo\"},\"id\":\"cciqihnhungbwjz\",\"name\":\"nfygxgispemvtz\",\"type\":\"kufubljo\"}],\"nextLink\":\"qeof\"}")
- .toObject(BackupVaultResourceList.class);
- Assertions.assertEquals("qeof", model.nextLink());
- Assertions.assertEquals("ajpsquc", model.value().get(0).location());
- Assertions.assertEquals("yf", model.value().get(0).tags().get("kfo"));
- Assertions.assertEquals("a", model.value().get(0).etag());
- Assertions.assertEquals("rbt", model.value().get(0).identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- model
- .value()
- .get(0)
- .properties()
- .monitoringSettings()
- .azureMonitorAlertSettings()
- .alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.ON, model.value().get(0).properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 12.53974621306525D,
- model.value().get(0).properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.LOCKED,
- model.value().get(0).properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE,
- model.value().get(0).properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(
- StorageSettingTypes.ZONE_REDUNDANT, model.value().get(0).properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- model.value().get(0).properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED,
- model.value().get(0).properties().featureSettings().crossRegionRestoreSettings().state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupVaultResourceList model =
- new BackupVaultResourceList()
- .withNextLink("qeof")
- .withValue(
- Arrays
- .asList(
- new BackupVaultResourceInner()
- .withLocation("ajpsquc")
- .withTags(mapOf("kfo", "yf"))
- .withEtag("a")
- .withIdentity(
- new DppIdentityDetails()
- .withType("rbt")
- .withUserAssignedIdentities(
- mapOf(
- "qglhq",
- new UserAssignedIdentity(),
- "foooj",
- new UserAssignedIdentity(),
- "fsqesaagdfmglzlh",
- new UserAssignedIdentity(),
- "ifkwmrvktsizntoc",
- new UserAssignedIdentity())))
- .withProperties(
- new BackupVault()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings()
- .withAlertsForAllJobFailures(AlertsState.DISABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.ON)
- .withRetentionDurationInDays(12.53974621306525D))
- .withImmutabilitySettings(
- new ImmutabilitySettings().withState(ImmutabilityState.LOCKED)))
- .withStorageSettings(
- Arrays
- .asList(
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE)
- .withType(StorageSettingTypes.ZONE_REDUNDANT)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.ENABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings()
- .withState(CrossRegionRestoreState.DISABLED)))),
- new BackupVaultResourceInner()
- .withLocation("y")
- .withTags(
- mapOf("rkxvdum", "wby", "xgaudccs", "grtfwvu", "jcny", "h", "kryhtnapczwlokj", "j"))
- .withEtag("npqxuh")
- .withIdentity(
- new DppIdentityDetails()
- .withType("jysagith")
- .withUserAssignedIdentities(mapOf("ifpikxwczby", new UserAssignedIdentity())))
- .withProperties(
- new BackupVault()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings()
- .withAlertsForAllJobFailures(AlertsState.DISABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.ALWAYS_ON)
- .withRetentionDurationInDays(30.42594303603623D))
- .withImmutabilitySettings(
- new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED)))
- .withStorageSettings(
- Arrays
- .asList(
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.OPERATIONAL_STORE)
- .withType(StorageSettingTypes.ZONE_REDUNDANT)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings()
- .withState(CrossRegionRestoreState.ENABLED)))),
- new BackupVaultResourceInner()
- .withLocation("zitonpeqfpjkjl")
- .withTags(
- mapOf("nmayhuybb", "pdvhpfxxypin", "inuvamiheogn", "podepoo", "usivye", "rxzxtheo"))
- .withEtag("cjrwzoxxjtfellu")
- .withIdentity(
- new DppIdentityDetails()
- .withType("paojakhmsbzjh")
- .withUserAssignedIdentities(
- mapOf(
- "dphlxaolt",
- new UserAssignedIdentity(),
- "rgqjbpfzfsinzg",
- new UserAssignedIdentity())))
- .withProperties(
- new BackupVault()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings()
- .withAlertsForAllJobFailures(AlertsState.ENABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.ALWAYS_ON)
- .withRetentionDurationInDays(59.75135945335241D))
- .withImmutabilitySettings(
- new ImmutabilitySettings().withState(ImmutabilityState.DISABLED)))
- .withStorageSettings(
- Arrays
- .asList(
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.OPERATIONAL_STORE)
- .withType(StorageSettingTypes.GEO_REDUNDANT),
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE)
- .withType(StorageSettingTypes.ZONE_REDUNDANT)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings()
- .withState(CrossRegionRestoreState.ENABLED))))));
- model = BinaryData.fromObject(model).toObject(BackupVaultResourceList.class);
- Assertions.assertEquals("qeof", model.nextLink());
- Assertions.assertEquals("ajpsquc", model.value().get(0).location());
- Assertions.assertEquals("yf", model.value().get(0).tags().get("kfo"));
- Assertions.assertEquals("a", model.value().get(0).etag());
- Assertions.assertEquals("rbt", model.value().get(0).identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- model
- .value()
- .get(0)
- .properties()
- .monitoringSettings()
- .azureMonitorAlertSettings()
- .alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.ON, model.value().get(0).properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 12.53974621306525D,
- model.value().get(0).properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.LOCKED,
- model.value().get(0).properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE,
- model.value().get(0).properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(
- StorageSettingTypes.ZONE_REDUNDANT, model.value().get(0).properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- model.value().get(0).properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED,
- model.value().get(0).properties().featureSettings().crossRegionRestoreSettings().state());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultTests.java
deleted file mode 100644
index cc79ef547503..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultTests.java
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import com.azure.resourcemanager.dataprotection.models.BackupVault;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
-import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSetting;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BackupVaultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BackupVault model =
- BinaryData
- .fromString(
- "{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Updating\",\"resourceMoveState\":\"PrepareTimedout\",\"resourceMoveDetails\":{\"operationId\":\"gou\",\"startTimeUtc\":\"ndlik\",\"completionTimeUtc\":\"qkgfgibma\",\"sourceResourcePath\":\"akeqs\",\"targetResourcePath\":\"yb\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":18.452690158174846},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"GeoRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Adequate\"}")
- .toObject(BackupVault.class);
- Assertions
- .assertEquals(
- AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(18.452690158174846D, model.securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state());
- Assertions.assertEquals(StorageSettingStoreTypes.ARCHIVE_STORE, model.storageSettings().get(0).datastoreType());
- Assertions.assertEquals(StorageSettingTypes.GEO_REDUNDANT, model.storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.PERMANENTLY_DISABLED,
- model.featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED, model.featureSettings().crossRegionRestoreSettings().state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BackupVault model =
- new BackupVault()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.OFF)
- .withRetentionDurationInDays(18.452690158174846D))
- .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED)))
- .withStorageSettings(
- Arrays
- .asList(
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE)
- .withType(StorageSettingTypes.GEO_REDUNDANT)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.DISABLED)));
- model = BinaryData.fromObject(model).toObject(BackupVault.class);
- Assertions
- .assertEquals(
- AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(18.452690158174846D, model.securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state());
- Assertions.assertEquals(StorageSettingStoreTypes.ARCHIVE_STORE, model.storageSettings().get(0).datastoreType());
- Assertions.assertEquals(StorageSettingTypes.GEO_REDUNDANT, model.storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.PERMANENTLY_DISABLED,
- model.featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED, model.featureSettings().crossRegionRestoreSettings().state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilityWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilityWithResponseMockTests.java
deleted file mode 100644
index 90046e932e09..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCheckNameAvailabilityWithResponseMockTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest;
-import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityResult;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupVaultsCheckNameAvailabilityWithResponseMockTests {
- @Test
- public void testCheckNameAvailabilityWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"message\":\"wgdsl\",\"nameAvailable\":false,\"reason\":\"hrmooi\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CheckNameAvailabilityResult response =
- manager
- .backupVaults()
- .checkNameAvailabilityWithResponse(
- "kvyklxubyjaffmm",
- "bl",
- new CheckNameAvailabilityRequest().withName("cuubgq").withType("rtalmet"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("wgdsl", response.message());
- Assertions.assertEquals(false, response.nameAvailable());
- Assertions.assertEquals("hrmooi", response.reason());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateMockTests.java
deleted file mode 100644
index d39b9df9fbac..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import com.azure.resourcemanager.dataprotection.models.BackupVault;
-import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
-import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSetting;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupVaultsCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Succeeded\",\"resourceMoveState\":\"PrepareTimedout\",\"resourceMoveDetails\":{\"operationId\":\"euvyinzqodfvpgs\",\"startTimeUtc\":\"xgsg\",\"completionTimeUtc\":\"fgzdjtxvz\",\"sourceResourcePath\":\"bqvgaqv\",\"targetResourcePath\":\"a\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":38.97441720807582},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"OperationalStore\",\"type\":\"ZoneRedundant\"}],\"isVaultProtectedByResourceGuard\":true,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Disabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Maximum\"},\"identity\":{\"principalId\":\"ekdxuku\",\"tenantId\":\"sjjxundxgketw\",\"type\":\"hzjhf\",\"userAssignedIdentities\":{\"muvgp\":{\"principalId\":\"064ceadf-b7bc-483a-8d61-390687b5d81b\",\"clientId\":\"85611a6f-fcb4-4efe-861b-27c047302e8f\"},\"eqsx\":{\"principalId\":\"909a84f7-be3b-4d49-8cb4-0ac272d4e6e8\",\"clientId\":\"8a858bc1-79db-49fe-a83c-f5b10c9c7123\"},\"fbuzjyihs\":{\"principalId\":\"019798cb-4757-4158-b694-546f00104f54\",\"clientId\":\"b8867c5b-b012-4e72-83aa-935b136deae0\"}}},\"eTag\":\"bhu\",\"location\":\"pohyuemslynsqyr\",\"tags\":{\"msjnygqdnfw\":\"obrltt\",\"ijouwivkxoyzunb\":\"zdzgtilaxhnfhqly\",\"wpgclrcivt\":\"xxrtikvc\"},\"id\":\"oxfrkenxpmyyefr\",\"name\":\"mpdnqqskawa\",\"type\":\"qvmmbn\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- BackupVaultResource response =
- manager
- .backupVaults()
- .define("zhyrpeto")
- .withRegion("bousn")
- .withExistingResourceGroup("qseypxiutcxa")
- .withProperties(
- new BackupVault()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.ALWAYS_ON)
- .withRetentionDurationInDays(29.275683310623478D))
- .withImmutabilitySettings(
- new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED)))
- .withStorageSettings(
- Arrays
- .asList(
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.OPERATIONAL_STORE)
- .withType(StorageSettingTypes.ZONE_REDUNDANT),
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE)
- .withType(StorageSettingTypes.ZONE_REDUNDANT),
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.ARCHIVE_STORE)
- .withType(StorageSettingTypes.GEO_REDUNDANT),
- new StorageSetting()
- .withDatastoreType(StorageSettingStoreTypes.VAULT_STORE)
- .withType(StorageSettingTypes.LOCALLY_REDUNDANT)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.ENABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED))))
- .withTags(mapOf("ykxhdjh", "gfewetwlyxgnc", "h", "immbcx", "qizxfpxtgqscjavf", "cporxvxcjz"))
- .withEtag("pchwa")
- .withIdentity(
- new DppIdentityDetails()
- .withType("ktalhsnvkcdmxz")
- .withUserAssignedIdentities(
- mapOf(
- "mlnwiaaomylweazu",
- new UserAssignedIdentity(),
- "ethwwnpjhlfz",
- new UserAssignedIdentity())))
- .create();
-
- Assertions.assertEquals("pohyuemslynsqyr", response.location());
- Assertions.assertEquals("obrltt", response.tags().get("msjnygqdnfw"));
- Assertions.assertEquals("bhu", response.etag());
- Assertions.assertEquals("hzjhf", response.identity().type());
- Assertions
- .assertEquals(
- AlertsState.ENABLED,
- response.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions
- .assertEquals(SoftDeleteState.OFF, response.properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 38.97441720807582D,
- response.properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.DISABLED, response.properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE, response.properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(StorageSettingTypes.LOCALLY_REDUNDANT, response.properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.DISABLED,
- response.properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.ENABLED,
- response.properties().featureSettings().crossRegionRestoreSettings().state());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteMockTests.java
deleted file mode 100644
index da945aecd726..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupVaultsDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.backupVaults().delete("cvhrfsp", "uagrttikteusqc", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index 8e1e69c1f2ea..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupVaultsGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"provisioningState\":\"Failed\",\"resourceMoveState\":\"CommitFailed\",\"resourceMoveDetails\":{\"operationId\":\"bunzozudh\",\"startTimeUtc\":\"gkmoyxcdyuibhmfd\",\"completionTimeUtc\":\"zydvfvf\",\"sourceResourcePath\":\"naeo\",\"targetResourcePath\":\"rvhmgor\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"On\",\"retentionDurationInDays\":71.74888692263151},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"storageSettings\":[{\"datastoreType\":\"OperationalStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"ArchiveStore\",\"type\":\"GeoRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}},\"secureScore\":\"Adequate\"},\"identity\":{\"principalId\":\"jfzqlqhycavodgg\",\"tenantId\":\"beesmieknlra\",\"type\":\"aawiuagydwqfb\",\"userAssignedIdentities\":{\"giagtcojo\":{\"principalId\":\"4c1b70df-e96d-4ef6-8c3e-2c9f8b042761\",\"clientId\":\"d69abbb5-dfe3-4eb5-a402-a6c2fb14a9f5\"}}},\"eTag\":\"wogfnzjvu\",\"location\":\"zldmozuxy\",\"tags\":{\"grjqctojcmi\":\"btkadpysownbtgkb\",\"eypefojyqd\":\"of\",\"hlhzdsqtzbsrgno\":\"cuplcplcwkhih\",\"teyowclu\":\"cjhfgmvecactxmw\"},\"id\":\"ovekqvgqouwi\",\"name\":\"zmpjwyiv\",\"type\":\"ikf\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- BackupVaultResource response =
- manager
- .backupVaults()
- .getByResourceGroupWithResponse("khocxvdfffwaf", "roud", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("zldmozuxy", response.location());
- Assertions.assertEquals("btkadpysownbtgkb", response.tags().get("grjqctojcmi"));
- Assertions.assertEquals("wogfnzjvu", response.etag());
- Assertions.assertEquals("aawiuagydwqfb", response.identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- response.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions
- .assertEquals(SoftDeleteState.ON, response.properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 71.74888692263151D,
- response.properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.UNLOCKED, response.properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.OPERATIONAL_STORE,
- response.properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(StorageSettingTypes.ZONE_REDUNDANT, response.properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.PERMANENTLY_DISABLED,
- response.properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.ENABLED,
- response.properties().featureSettings().crossRegionRestoreSettings().state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupMockTests.java
deleted file mode 100644
index 14ffcd98433c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupVaultsListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Succeeded\",\"resourceMoveState\":\"MoveSucceeded\",\"resourceMoveDetails\":{\"operationId\":\"bf\",\"startTimeUtc\":\"clnpkci\",\"completionTimeUtc\":\"zriykhy\",\"sourceResourcePath\":\"fvjlboxqvkjlmx\",\"targetResourcePath\":\"mdy\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":92.44657852084777},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"ZoneRedundant\"},{\"datastoreType\":\"VaultStore\",\"type\":\"LocallyRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Disabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Adequate\"},\"identity\":{\"principalId\":\"iqyuvvfo\",\"tenantId\":\"p\",\"type\":\"qyikvy\",\"userAssignedIdentities\":{\"vluwmncsttij\":{\"principalId\":\"46ce289c-67d0-4d4e-aadc-f17d8b1a6765\",\"clientId\":\"5eaeb323-8fd2-4284-8614-65268c9cfa0b\"}}},\"eTag\":\"bvpoekrsgsgbdhu\",\"location\":\"gnjdgkynscliqhz\",\"tags\":{\"mtk\":\"nk\",\"ppnvdxz\":\"bo\",\"hlfkqojpy\":\"hihfrbbcevqagtlt\"},\"id\":\"vgtrdcnifmzzs\",\"name\":\"ymbrnysuxmpraf\",\"type\":\"g\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.backupVaults().listByResourceGroup("cokpv", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("gnjdgkynscliqhz", response.iterator().next().location());
- Assertions.assertEquals("nk", response.iterator().next().tags().get("mtk"));
- Assertions.assertEquals("bvpoekrsgsgbdhu", response.iterator().next().etag());
- Assertions.assertEquals("qyikvy", response.iterator().next().identity().type());
- Assertions
- .assertEquals(
- AlertsState.ENABLED,
- response
- .iterator()
- .next()
- .properties()
- .monitoringSettings()
- .azureMonitorAlertSettings()
- .alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.OFF,
- response.iterator().next().properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 92.44657852084777D,
- response
- .iterator()
- .next()
- .properties()
- .securitySettings()
- .softDeleteSettings()
- .retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.DISABLED,
- response.iterator().next().properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE,
- response.iterator().next().properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(
- StorageSettingTypes.ZONE_REDUNDANT,
- response.iterator().next().properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.DISABLED,
- response.iterator().next().properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED,
- response.iterator().next().properties().featureSettings().crossRegionRestoreSettings().state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListMockTests.java
deleted file mode 100644
index b7890fce31f9..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BackupVaultsListMockTests.java
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.BackupVaultResource;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingStoreTypes;
-import com.azure.resourcemanager.dataprotection.models.StorageSettingTypes;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class BackupVaultsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"provisioningState\":\"Succeeded\",\"resourceMoveState\":\"MoveSucceeded\",\"resourceMoveDetails\":{\"operationId\":\"wyrpgogtqxepnyl\",\"startTimeUtc\":\"uajlyj\",\"completionTimeUtc\":\"vofqzhvfc\",\"sourceResourcePath\":\"yfm\",\"targetResourcePath\":\"uxrkjp\"},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":77.28442995264712},\"immutabilitySettings\":{\"state\":\"Locked\"}},\"storageSettings\":[{\"datastoreType\":\"ArchiveStore\",\"type\":\"LocallyRedundant\"}],\"isVaultProtectedByResourceGuard\":false,\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}},\"secureScore\":\"Minimum\"},\"identity\":{\"principalId\":\"gvmnvuqeq\",\"tenantId\":\"dspastjbkkdmfl\",\"type\":\"stmjlxrri\",\"userAssignedIdentities\":{\"eewchpxlktw\":{\"principalId\":\"3e4e6d4b-3b37-47c2-88f7-a9756da0e940\",\"clientId\":\"5f40efbf-ad8a-490c-b4df-e3b41f3f45d2\"},\"iycslevuf\":{\"principalId\":\"874c4d45-f68c-4563-8220-ee31fd84546c\",\"clientId\":\"f4567b4b-bbe8-4f61-a4b3-765ee4c0f8e6\"},\"cktyh\":{\"principalId\":\"fffa31af-ed5c-4139-af6c-997be1fcebe2\",\"clientId\":\"353aea24-6cf1-4c30-9b53-eafc1400508e\"}}},\"eTag\":\"qedcgzulwm\",\"location\":\"qzz\",\"tags\":{\"krvq\":\"vpglydz\",\"oepry\":\"ev\",\"wytpzdmovz\":\"t\"},\"id\":\"fvaawzqa\",\"name\":\"f\",\"type\":\"gzuriglaecxndt\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.backupVaults().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("qzz", response.iterator().next().location());
- Assertions.assertEquals("vpglydz", response.iterator().next().tags().get("krvq"));
- Assertions.assertEquals("qedcgzulwm", response.iterator().next().etag());
- Assertions.assertEquals("stmjlxrri", response.iterator().next().identity().type());
- Assertions
- .assertEquals(
- AlertsState.ENABLED,
- response
- .iterator()
- .next()
- .properties()
- .monitoringSettings()
- .azureMonitorAlertSettings()
- .alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.OFF,
- response.iterator().next().properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 77.28442995264712D,
- response
- .iterator()
- .next()
- .properties()
- .securitySettings()
- .softDeleteSettings()
- .retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.LOCKED,
- response.iterator().next().properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- StorageSettingStoreTypes.ARCHIVE_STORE,
- response.iterator().next().properties().storageSettings().get(0).datastoreType());
- Assertions
- .assertEquals(
- StorageSettingTypes.LOCALLY_REDUNDANT,
- response.iterator().next().properties().storageSettings().get(0).type());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- response.iterator().next().properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED,
- response.iterator().next().properties().featureSettings().crossRegionRestoreSettings().state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceInnerTests.java
deleted file mode 100644
index 5fec009ec0c9..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceInnerTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BaseBackupPolicyResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BaseBackupPolicyResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"osvexcsonpclhoc\"]},\"id\":\"slkevle\",\"name\":\"gz\",\"type\":\"buhfmvfaxkffeiit\"}")
- .toObject(BaseBackupPolicyResourceInner.class);
- Assertions.assertEquals("osvexcsonpclhoc", model.properties().datasourceTypes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BaseBackupPolicyResourceInner model =
- new BaseBackupPolicyResourceInner()
- .withProperties(new BaseBackupPolicy().withDatasourceTypes(Arrays.asList("osvexcsonpclhoc")));
- model = BinaryData.fromObject(model).toObject(BaseBackupPolicyResourceInner.class);
- Assertions.assertEquals("osvexcsonpclhoc", model.properties().datasourceTypes().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceListTests.java
deleted file mode 100644
index 6a9bd9317ed4..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyResourceListTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.BaseBackupPolicyResourceInner;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicyResourceList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BaseBackupPolicyResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BaseBackupPolicyResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"yokacspkw\",\"hzdobpxjmflbvvnc\",\"rkcciwwzjuqk\"]},\"id\":\"sa\",\"name\":\"iwkuofos\",\"type\":\"ghsauuimjmvxied\"}],\"nextLink\":\"gidyjrrf\"}")
- .toObject(BaseBackupPolicyResourceList.class);
- Assertions.assertEquals("gidyjrrf", model.nextLink());
- Assertions.assertEquals("yokacspkw", model.value().get(0).properties().datasourceTypes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BaseBackupPolicyResourceList model =
- new BaseBackupPolicyResourceList()
- .withNextLink("gidyjrrf")
- .withValue(
- Arrays
- .asList(
- new BaseBackupPolicyResourceInner()
- .withProperties(
- new BaseBackupPolicy()
- .withDatasourceTypes(
- Arrays.asList("yokacspkw", "hzdobpxjmflbvvnc", "rkcciwwzjuqk")))));
- model = BinaryData.fromObject(model).toObject(BaseBackupPolicyResourceList.class);
- Assertions.assertEquals("gidyjrrf", model.nextLink());
- Assertions.assertEquals("yokacspkw", model.value().get(0).properties().datasourceTypes().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyTests.java
deleted file mode 100644
index 0a42c9dde878..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseBackupPolicyTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BaseBackupPolicy;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BaseBackupPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BaseBackupPolicy model =
- BinaryData
- .fromString(
- "{\"objectType\":\"BaseBackupPolicy\",\"datasourceTypes\":[\"vmezy\",\"shxmzsbbzoggigrx\",\"burvjxxjnspy\",\"ptkoenkoukn\"]}")
- .toObject(BaseBackupPolicy.class);
- Assertions.assertEquals("vmezy", model.datasourceTypes().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BaseBackupPolicy model =
- new BaseBackupPolicy()
- .withDatasourceTypes(Arrays.asList("vmezy", "shxmzsbbzoggigrx", "burvjxxjnspy", "ptkoenkoukn"));
- model = BinaryData.fromObject(model).toObject(BaseBackupPolicy.class);
- Assertions.assertEquals("vmezy", model.datasourceTypes().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BasePolicyRuleTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BasePolicyRuleTests.java
deleted file mode 100644
index 8edafac0c79d..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BasePolicyRuleTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BasePolicyRule;
-import org.junit.jupiter.api.Assertions;
-
-public final class BasePolicyRuleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BasePolicyRule model =
- BinaryData
- .fromString("{\"objectType\":\"BasePolicyRule\",\"name\":\"jsrtk\"}")
- .toObject(BasePolicyRule.class);
- Assertions.assertEquals("jsrtk", model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BasePolicyRule model = new BasePolicyRule().withName("jsrtk");
- model = BinaryData.fromObject(model).toObject(BasePolicyRule.class);
- Assertions.assertEquals("jsrtk", model.name());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseResourcePropertiesTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseResourcePropertiesTests.java
deleted file mode 100644
index 8452ac569d52..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BaseResourcePropertiesTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BaseResourceProperties;
-
-public final class BaseResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BaseResourceProperties model =
- BinaryData.fromString("{\"objectType\":\"BaseResourceProperties\"}").toObject(BaseResourceProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BaseResourceProperties model = new BaseResourceProperties();
- model = BinaryData.fromObject(model).toObject(BaseResourceProperties.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BlobBackupDatasourceParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BlobBackupDatasourceParametersTests.java
deleted file mode 100644
index cfe41ff78015..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/BlobBackupDatasourceParametersTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BlobBackupDatasourceParameters;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class BlobBackupDatasourceParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- BlobBackupDatasourceParameters model =
- BinaryData
- .fromString(
- "{\"objectType\":\"BlobBackupDatasourceParameters\",\"containersList\":[\"ymoxoftpipiwyczu\",\"xacpqjli\",\"hyus\"]}")
- .toObject(BlobBackupDatasourceParameters.class);
- Assertions.assertEquals("ymoxoftpipiwyczu", model.containersList().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- BlobBackupDatasourceParameters model =
- new BlobBackupDatasourceParameters()
- .withContainersList(Arrays.asList("ymoxoftpipiwyczu", "xacpqjli", "hyus"));
- model = BinaryData.fromObject(model).toObject(BlobBackupDatasourceParameters.class);
- Assertions.assertEquals("ymoxoftpipiwyczu", model.containersList().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityRequestTests.java
deleted file mode 100644
index 946f1d12d7c3..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityRequestTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.CheckNameAvailabilityRequest;
-import org.junit.jupiter.api.Assertions;
-
-public final class CheckNameAvailabilityRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CheckNameAvailabilityRequest model =
- BinaryData
- .fromString("{\"name\":\"tkftutqxlngx\",\"type\":\"fgugnxkrxdqmid\"}")
- .toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("tkftutqxlngx", model.name());
- Assertions.assertEquals("fgugnxkrxdqmid", model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CheckNameAvailabilityRequest model =
- new CheckNameAvailabilityRequest().withName("tkftutqxlngx").withType("fgugnxkrxdqmid");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("tkftutqxlngx", model.name());
- Assertions.assertEquals("fgugnxkrxdqmid", model.type());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityResultInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityResultInnerTests.java
deleted file mode 100644
index 12ca746fab2f..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CheckNameAvailabilityResultInnerTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.CheckNameAvailabilityResultInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class CheckNameAvailabilityResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CheckNameAvailabilityResultInner model =
- BinaryData
- .fromString("{\"message\":\"hzrvqd\",\"nameAvailable\":false,\"reason\":\"jybige\"}")
- .toObject(CheckNameAvailabilityResultInner.class);
- Assertions.assertEquals("hzrvqd", model.message());
- Assertions.assertEquals(false, model.nameAvailable());
- Assertions.assertEquals("jybige", model.reason());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CheckNameAvailabilityResultInner model =
- new CheckNameAvailabilityResultInner().withMessage("hzrvqd").withNameAvailable(false).withReason("jybige");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResultInner.class);
- Assertions.assertEquals("hzrvqd", model.message());
- Assertions.assertEquals(false, model.nameAvailable());
- Assertions.assertEquals("jybige", model.reason());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryDisplayTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryDisplayTests.java
deleted file mode 100644
index eacd6910f715..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryDisplayTests.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientDiscoveryDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientDiscoveryDisplay model =
- BinaryData
- .fromString(
- "{\"description\":\"hezrkgq\",\"operation\":\"jrefovgmkqsle\",\"provider\":\"vxyqjpkcattpngjc\",\"resource\":\"czsqpjhvm\"}")
- .toObject(ClientDiscoveryDisplay.class);
- Assertions.assertEquals("hezrkgq", model.description());
- Assertions.assertEquals("jrefovgmkqsle", model.operation());
- Assertions.assertEquals("vxyqjpkcattpngjc", model.provider());
- Assertions.assertEquals("czsqpjhvm", model.resource());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientDiscoveryDisplay model =
- new ClientDiscoveryDisplay()
- .withDescription("hezrkgq")
- .withOperation("jrefovgmkqsle")
- .withProvider("vxyqjpkcattpngjc")
- .withResource("czsqpjhvm");
- model = BinaryData.fromObject(model).toObject(ClientDiscoveryDisplay.class);
- Assertions.assertEquals("hezrkgq", model.description());
- Assertions.assertEquals("jrefovgmkqsle", model.operation());
- Assertions.assertEquals("vxyqjpkcattpngjc", model.provider());
- Assertions.assertEquals("czsqpjhvm", model.resource());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForLogSpecificationTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForLogSpecificationTests.java
deleted file mode 100644
index c9d84a452f84..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForLogSpecificationTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientDiscoveryForLogSpecificationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientDiscoveryForLogSpecification model =
- BinaryData
- .fromString("{\"blobDuration\":\"vvdfwatkpnpul\",\"displayName\":\"xbczwtruwiqz\",\"name\":\"j\"}")
- .toObject(ClientDiscoveryForLogSpecification.class);
- Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration());
- Assertions.assertEquals("xbczwtruwiqz", model.displayName());
- Assertions.assertEquals("j", model.name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientDiscoveryForLogSpecification model =
- new ClientDiscoveryForLogSpecification()
- .withBlobDuration("vvdfwatkpnpul")
- .withDisplayName("xbczwtruwiqz")
- .withName("j");
- model = BinaryData.fromObject(model).toObject(ClientDiscoveryForLogSpecification.class);
- Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration());
- Assertions.assertEquals("xbczwtruwiqz", model.displayName());
- Assertions.assertEquals("j", model.name());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForPropertiesTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForPropertiesTests.java
deleted file mode 100644
index 5d56c47d6b31..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForPropertiesTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientDiscoveryForPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientDiscoveryForProperties model =
- BinaryData
- .fromString(
- "{\"serviceSpecification\":{\"logSpecifications\":[{\"blobDuration\":\"ysou\",\"displayName\":\"e\",\"name\":\"noae\"}]}}")
- .toObject(ClientDiscoveryForProperties.class);
- Assertions.assertEquals("ysou", model.serviceSpecification().logSpecifications().get(0).blobDuration());
- Assertions.assertEquals("e", model.serviceSpecification().logSpecifications().get(0).displayName());
- Assertions.assertEquals("noae", model.serviceSpecification().logSpecifications().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientDiscoveryForProperties model =
- new ClientDiscoveryForProperties()
- .withServiceSpecification(
- new ClientDiscoveryForServiceSpecification()
- .withLogSpecifications(
- Arrays
- .asList(
- new ClientDiscoveryForLogSpecification()
- .withBlobDuration("ysou")
- .withDisplayName("e")
- .withName("noae"))));
- model = BinaryData.fromObject(model).toObject(ClientDiscoveryForProperties.class);
- Assertions.assertEquals("ysou", model.serviceSpecification().logSpecifications().get(0).blobDuration());
- Assertions.assertEquals("e", model.serviceSpecification().logSpecifications().get(0).displayName());
- Assertions.assertEquals("noae", model.serviceSpecification().logSpecifications().get(0).name());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForServiceSpecificationTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForServiceSpecificationTests.java
deleted file mode 100644
index 1edc150c2c1f..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryForServiceSpecificationTests.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientDiscoveryForServiceSpecificationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientDiscoveryForServiceSpecification model =
- BinaryData
- .fromString(
- "{\"logSpecifications\":[{\"blobDuration\":\"yhltrpmopjmcm\",\"displayName\":\"u\",\"name\":\"thfuiuaodsfcpkvx\"},{\"blobDuration\":\"puozmyzydag\",\"displayName\":\"axbezyiuo\",\"name\":\"twhrdxwzywqsm\"},{\"blobDuration\":\"ureximoryocfs\",\"displayName\":\"s\",\"name\":\"ddystkiiuxhqy\"},{\"blobDuration\":\"xorrqnb\",\"displayName\":\"czvyifq\",\"name\":\"kdvjsll\"}]}")
- .toObject(ClientDiscoveryForServiceSpecification.class);
- Assertions.assertEquals("yhltrpmopjmcm", model.logSpecifications().get(0).blobDuration());
- Assertions.assertEquals("u", model.logSpecifications().get(0).displayName());
- Assertions.assertEquals("thfuiuaodsfcpkvx", model.logSpecifications().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientDiscoveryForServiceSpecification model =
- new ClientDiscoveryForServiceSpecification()
- .withLogSpecifications(
- Arrays
- .asList(
- new ClientDiscoveryForLogSpecification()
- .withBlobDuration("yhltrpmopjmcm")
- .withDisplayName("u")
- .withName("thfuiuaodsfcpkvx"),
- new ClientDiscoveryForLogSpecification()
- .withBlobDuration("puozmyzydag")
- .withDisplayName("axbezyiuo")
- .withName("twhrdxwzywqsm"),
- new ClientDiscoveryForLogSpecification()
- .withBlobDuration("ureximoryocfs")
- .withDisplayName("s")
- .withName("ddystkiiuxhqy"),
- new ClientDiscoveryForLogSpecification()
- .withBlobDuration("xorrqnb")
- .withDisplayName("czvyifq")
- .withName("kdvjsll")));
- model = BinaryData.fromObject(model).toObject(ClientDiscoveryForServiceSpecification.class);
- Assertions.assertEquals("yhltrpmopjmcm", model.logSpecifications().get(0).blobDuration());
- Assertions.assertEquals("u", model.logSpecifications().get(0).displayName());
- Assertions.assertEquals("thfuiuaodsfcpkvx", model.logSpecifications().get(0).name());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryResponseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryResponseTests.java
deleted file mode 100644
index 54c304acd82b..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryResponseTests.java
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryResponse;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientDiscoveryResponseTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientDiscoveryResponse model =
- BinaryData
- .fromString(
- "{\"nextLink\":\"qfbow\",\"value\":[{\"display\":{\"description\":\"ktzlcuiywg\",\"operation\":\"wgndrvynhzgpp\",\"provider\":\"cgyncocpecf\",\"resource\":\"mcoo\"},\"name\":\"xlzevgbmqjqabcy\",\"isDataAction\":true,\"origin\":\"kwlzuvccfwnfn\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"display\":{\"description\":\"l\",\"operation\":\"x\",\"provider\":\"qgtz\",\"resource\":\"pnqbqqwxrjfe\"},\"name\":\"lnwsubisn\",\"isDataAction\":true,\"origin\":\"mngnzscxaqw\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"display\":{\"description\":\"nqvpkvlrxnje\",\"operation\":\"eipheoflokeyy\",\"provider\":\"nj\",\"resource\":\"lwtgrhpdj\"},\"name\":\"umasxazjpq\",\"isDataAction\":false,\"origin\":\"alhbx\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"display\":{\"description\":\"v\",\"operation\":\"dgwdslfhot\",\"provider\":\"cynpwlbjnp\",\"resource\":\"cftadeh\"},\"name\":\"ltyfsop\",\"isDataAction\":false,\"origin\":\"esnzwde\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}]}}}]}")
- .toObject(ClientDiscoveryResponse.class);
- Assertions.assertEquals("qfbow", model.nextLink());
- Assertions.assertEquals("ktzlcuiywg", model.value().get(0).display().description());
- Assertions.assertEquals("wgndrvynhzgpp", model.value().get(0).display().operation());
- Assertions.assertEquals("cgyncocpecf", model.value().get(0).display().provider());
- Assertions.assertEquals("mcoo", model.value().get(0).display().resource());
- Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).name());
- Assertions.assertEquals(true, model.value().get(0).isDataAction());
- Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).origin());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientDiscoveryResponse model =
- new ClientDiscoveryResponse()
- .withNextLink("qfbow")
- .withValue(
- Arrays
- .asList(
- new ClientDiscoveryValueForSingleApiInner()
- .withDisplay(
- new ClientDiscoveryDisplay()
- .withDescription("ktzlcuiywg")
- .withOperation("wgndrvynhzgpp")
- .withProvider("cgyncocpecf")
- .withResource("mcoo"))
- .withName("xlzevgbmqjqabcy")
- .withIsDataAction(true)
- .withOrigin("kwlzuvccfwnfn")
- .withProperties(
- new ClientDiscoveryForProperties()
- .withServiceSpecification(
- new ClientDiscoveryForServiceSpecification()
- .withLogSpecifications(
- Arrays
- .asList(
- new ClientDiscoveryForLogSpecification(),
- new ClientDiscoveryForLogSpecification())))),
- new ClientDiscoveryValueForSingleApiInner()
- .withDisplay(
- new ClientDiscoveryDisplay()
- .withDescription("l")
- .withOperation("x")
- .withProvider("qgtz")
- .withResource("pnqbqqwxrjfe"))
- .withName("lnwsubisn")
- .withIsDataAction(true)
- .withOrigin("mngnzscxaqw")
- .withProperties(
- new ClientDiscoveryForProperties()
- .withServiceSpecification(
- new ClientDiscoveryForServiceSpecification()
- .withLogSpecifications(
- Arrays
- .asList(
- new ClientDiscoveryForLogSpecification(),
- new ClientDiscoveryForLogSpecification())))),
- new ClientDiscoveryValueForSingleApiInner()
- .withDisplay(
- new ClientDiscoveryDisplay()
- .withDescription("nqvpkvlrxnje")
- .withOperation("eipheoflokeyy")
- .withProvider("nj")
- .withResource("lwtgrhpdj"))
- .withName("umasxazjpq")
- .withIsDataAction(false)
- .withOrigin("alhbx")
- .withProperties(
- new ClientDiscoveryForProperties()
- .withServiceSpecification(
- new ClientDiscoveryForServiceSpecification()
- .withLogSpecifications(
- Arrays
- .asList(
- new ClientDiscoveryForLogSpecification(),
- new ClientDiscoveryForLogSpecification())))),
- new ClientDiscoveryValueForSingleApiInner()
- .withDisplay(
- new ClientDiscoveryDisplay()
- .withDescription("v")
- .withOperation("dgwdslfhot")
- .withProvider("cynpwlbjnp")
- .withResource("cftadeh"))
- .withName("ltyfsop")
- .withIsDataAction(false)
- .withOrigin("esnzwde")
- .withProperties(
- new ClientDiscoveryForProperties()
- .withServiceSpecification(
- new ClientDiscoveryForServiceSpecification()
- .withLogSpecifications(
- Arrays
- .asList(
- new ClientDiscoveryForLogSpecification(),
- new ClientDiscoveryForLogSpecification(),
- new ClientDiscoveryForLogSpecification(),
- new ClientDiscoveryForLogSpecification()))))));
- model = BinaryData.fromObject(model).toObject(ClientDiscoveryResponse.class);
- Assertions.assertEquals("qfbow", model.nextLink());
- Assertions.assertEquals("ktzlcuiywg", model.value().get(0).display().description());
- Assertions.assertEquals("wgndrvynhzgpp", model.value().get(0).display().operation());
- Assertions.assertEquals("cgyncocpecf", model.value().get(0).display().provider());
- Assertions.assertEquals("mcoo", model.value().get(0).display().resource());
- Assertions.assertEquals("xlzevgbmqjqabcy", model.value().get(0).name());
- Assertions.assertEquals(true, model.value().get(0).isDataAction());
- Assertions.assertEquals("kwlzuvccfwnfn", model.value().get(0).origin());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryValueForSingleApiInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryValueForSingleApiInnerTests.java
deleted file mode 100644
index 1be2cd3982d0..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ClientDiscoveryValueForSingleApiInnerTests.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.ClientDiscoveryValueForSingleApiInner;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryDisplay;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForLogSpecification;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForProperties;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryForServiceSpecification;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientDiscoveryValueForSingleApiInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientDiscoveryValueForSingleApiInner model =
- BinaryData
- .fromString(
- "{\"display\":{\"description\":\"zdmohctbqvu\",\"operation\":\"xdn\",\"provider\":\"vo\",\"resource\":\"ujjugwdkcglh\"},\"name\":\"azjdyggd\",\"isDataAction\":true,\"origin\":\"hbkuofqwey\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"blobDuration\":\"vfyexfw\",\"displayName\":\"bcibvyvdcsitynn\",\"name\":\"mdectehfiqscjey\"}]}}}")
- .toObject(ClientDiscoveryValueForSingleApiInner.class);
- Assertions.assertEquals("zdmohctbqvu", model.display().description());
- Assertions.assertEquals("xdn", model.display().operation());
- Assertions.assertEquals("vo", model.display().provider());
- Assertions.assertEquals("ujjugwdkcglh", model.display().resource());
- Assertions.assertEquals("azjdyggd", model.name());
- Assertions.assertEquals(true, model.isDataAction());
- Assertions.assertEquals("hbkuofqwey", model.origin());
- Assertions
- .assertEquals(
- "vfyexfw", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration());
- Assertions
- .assertEquals(
- "bcibvyvdcsitynn", model.properties().serviceSpecification().logSpecifications().get(0).displayName());
- Assertions
- .assertEquals(
- "mdectehfiqscjey", model.properties().serviceSpecification().logSpecifications().get(0).name());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientDiscoveryValueForSingleApiInner model =
- new ClientDiscoveryValueForSingleApiInner()
- .withDisplay(
- new ClientDiscoveryDisplay()
- .withDescription("zdmohctbqvu")
- .withOperation("xdn")
- .withProvider("vo")
- .withResource("ujjugwdkcglh"))
- .withName("azjdyggd")
- .withIsDataAction(true)
- .withOrigin("hbkuofqwey")
- .withProperties(
- new ClientDiscoveryForProperties()
- .withServiceSpecification(
- new ClientDiscoveryForServiceSpecification()
- .withLogSpecifications(
- Arrays
- .asList(
- new ClientDiscoveryForLogSpecification()
- .withBlobDuration("vfyexfw")
- .withDisplayName("bcibvyvdcsitynn")
- .withName("mdectehfiqscjey")))));
- model = BinaryData.fromObject(model).toObject(ClientDiscoveryValueForSingleApiInner.class);
- Assertions.assertEquals("zdmohctbqvu", model.display().description());
- Assertions.assertEquals("xdn", model.display().operation());
- Assertions.assertEquals("vo", model.display().provider());
- Assertions.assertEquals("ujjugwdkcglh", model.display().resource());
- Assertions.assertEquals("azjdyggd", model.name());
- Assertions.assertEquals(true, model.isDataAction());
- Assertions.assertEquals("hbkuofqwey", model.origin());
- Assertions
- .assertEquals(
- "vfyexfw", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration());
- Assertions
- .assertEquals(
- "bcibvyvdcsitynn", model.properties().serviceSpecification().logSpecifications().get(0).displayName());
- Assertions
- .assertEquals(
- "mdectehfiqscjey", model.properties().serviceSpecification().logSpecifications().get(0).name());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOnExpiryOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOnExpiryOptionTests.java
deleted file mode 100644
index c50cb4939394..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOnExpiryOptionTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.CopyOnExpiryOption;
-
-public final class CopyOnExpiryOptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CopyOnExpiryOption model =
- BinaryData.fromString("{\"objectType\":\"CopyOnExpiryOption\"}").toObject(CopyOnExpiryOption.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CopyOnExpiryOption model = new CopyOnExpiryOption();
- model = BinaryData.fromObject(model).toObject(CopyOnExpiryOption.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOptionTests.java
deleted file mode 100644
index 225d533dee2d..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CopyOptionTests.java
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.CopyOption;
-
-public final class CopyOptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CopyOption model = BinaryData.fromString("{\"objectType\":\"CopyOption\"}").toObject(CopyOption.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CopyOption model = new CopyOption();
- model = BinaryData.fromObject(model).toObject(CopyOption.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreSettingsTests.java
deleted file mode 100644
index cf93fb7692dd..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossRegionRestoreSettingsTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import org.junit.jupiter.api.Assertions;
-
-public final class CrossRegionRestoreSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CrossRegionRestoreSettings model =
- BinaryData.fromString("{\"state\":\"Enabled\"}").toObject(CrossRegionRestoreSettings.class);
- Assertions.assertEquals(CrossRegionRestoreState.ENABLED, model.state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CrossRegionRestoreSettings model = new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED);
- model = BinaryData.fromObject(model).toObject(CrossRegionRestoreSettings.class);
- Assertions.assertEquals(CrossRegionRestoreState.ENABLED, model.state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossSubscriptionRestoreSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossSubscriptionRestoreSettingsTests.java
deleted file mode 100644
index addda0518133..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CrossSubscriptionRestoreSettingsTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import org.junit.jupiter.api.Assertions;
-
-public final class CrossSubscriptionRestoreSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CrossSubscriptionRestoreSettings model =
- BinaryData
- .fromString("{\"state\":\"PermanentlyDisabled\"}")
- .toObject(CrossSubscriptionRestoreSettings.class);
- Assertions.assertEquals(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CrossSubscriptionRestoreSettings model =
- new CrossSubscriptionRestoreSettings().withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED);
- model = BinaryData.fromObject(model).toObject(CrossSubscriptionRestoreSettings.class);
- Assertions.assertEquals(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CustomCopyOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CustomCopyOptionTests.java
deleted file mode 100644
index 6418670c0f50..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/CustomCopyOptionTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.CustomCopyOption;
-import org.junit.jupiter.api.Assertions;
-
-public final class CustomCopyOptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CustomCopyOption model =
- BinaryData
- .fromString("{\"objectType\":\"CustomCopyOption\",\"duration\":\"jyxgtczh\"}")
- .toObject(CustomCopyOption.class);
- Assertions.assertEquals("jyxgtczh", model.duration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CustomCopyOption model = new CustomCopyOption().withDuration("jyxgtczh");
- model = BinaryData.fromObject(model).toObject(CustomCopyOption.class);
- Assertions.assertEquals("jyxgtczh", model.duration());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListMockTests.java
deleted file mode 100644
index 1ae51f971c48..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionOperationsListMockTests.java
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.ClientDiscoveryValueForSingleApi;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DataProtectionOperationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"display\":{\"description\":\"ttzaefed\",\"operation\":\"hchrphkmcrjdqn\",\"provider\":\"fzpbgtgkyl\",\"resource\":\"ghrjeuutl\"},\"name\":\"ez\",\"isDataAction\":false,\"origin\":\"kvbwnhhtqlgeh\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"blobDuration\":\"fhpfeoajvgcxtx\",\"displayName\":\"sheafid\",\"name\":\"ugsresmkssjhoi\"},{\"blobDuration\":\"xfkfwegprhptill\",\"displayName\":\"biqtgdq\",\"name\":\"mcwsldrizetpwb\"},{\"blobDuration\":\"lllibph\",\"displayName\":\"zmizakakan\",\"name\":\"p\"},{\"blobDuration\":\"jzhajoy\",\"displayName\":\"jlmuoyxprimrsopt\",\"name\":\"cjmeislstvasy\"}]}}}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.dataProtectionOperations().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("ttzaefed", response.iterator().next().display().description());
- Assertions.assertEquals("hchrphkmcrjdqn", response.iterator().next().display().operation());
- Assertions.assertEquals("fzpbgtgkyl", response.iterator().next().display().provider());
- Assertions.assertEquals("ghrjeuutl", response.iterator().next().display().resource());
- Assertions.assertEquals("ez", response.iterator().next().name());
- Assertions.assertEquals(false, response.iterator().next().isDataAction());
- Assertions.assertEquals("kvbwnhhtqlgeh", response.iterator().next().origin());
- Assertions
- .assertEquals(
- "fhpfeoajvgcxtx",
- response
- .iterator()
- .next()
- .properties()
- .serviceSpecification()
- .logSpecifications()
- .get(0)
- .blobDuration());
- Assertions
- .assertEquals(
- "sheafid",
- response
- .iterator()
- .next()
- .properties()
- .serviceSpecification()
- .logSpecifications()
- .get(0)
- .displayName());
- Assertions
- .assertEquals(
- "ugsresmkssjhoi",
- response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionsCheckFeatureSupportWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionsCheckFeatureSupportWithResponseMockTests.java
deleted file mode 100644
index 545ccf1055b5..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataProtectionsCheckFeatureSupportWithResponseMockTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase;
-import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponseBase;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DataProtectionsCheckFeatureSupportWithResponseMockTests {
- @Test
- public void testCheckFeatureSupportWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"objectType\":\"FeatureValidationResponseBase\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- FeatureValidationResponseBase response =
- manager
- .dataProtections()
- .checkFeatureSupportWithResponse(
- "knfnwmbtmvpdv", new FeatureValidationRequestBase(), com.azure.core.util.Context.NONE)
- .getValue();
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreInfoBaseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreInfoBaseTests.java
deleted file mode 100644
index 6cdadfc0f9eb..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreInfoBaseTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DataStoreInfoBase;
-import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
-import org.junit.jupiter.api.Assertions;
-
-public final class DataStoreInfoBaseTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DataStoreInfoBase model =
- BinaryData
- .fromString("{\"dataStoreType\":\"VaultStore\",\"objectType\":\"dvzyybycnun\"}")
- .toObject(DataStoreInfoBase.class);
- Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType());
- Assertions.assertEquals("dvzyybycnun", model.objectType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DataStoreInfoBase model =
- new DataStoreInfoBase().withDataStoreType(DataStoreTypes.VAULT_STORE).withObjectType("dvzyybycnun");
- model = BinaryData.fromObject(model).toObject(DataStoreInfoBase.class);
- Assertions.assertEquals(DataStoreTypes.VAULT_STORE, model.dataStoreType());
- Assertions.assertEquals("dvzyybycnun", model.objectType());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreParametersTests.java
deleted file mode 100644
index 4083c7291427..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DataStoreParametersTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DataStoreParameters;
-import com.azure.resourcemanager.dataprotection.models.DataStoreTypes;
-import org.junit.jupiter.api.Assertions;
-
-public final class DataStoreParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DataStoreParameters model =
- BinaryData
- .fromString("{\"objectType\":\"DataStoreParameters\",\"dataStoreType\":\"ArchiveStore\"}")
- .toObject(DataStoreParameters.class);
- Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStoreType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DataStoreParameters model = new DataStoreParameters().withDataStoreType(DataStoreTypes.ARCHIVE_STORE);
- model = BinaryData.fromObject(model).toObject(DataStoreParameters.class);
- Assertions.assertEquals(DataStoreTypes.ARCHIVE_STORE, model.dataStoreType());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceSetTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceSetTests.java
deleted file mode 100644
index 9e889b01cbbe..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceSetTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BaseResourceProperties;
-import com.azure.resourcemanager.dataprotection.models.DatasourceSet;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatasourceSetTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DatasourceSet model =
- BinaryData
- .fromString(
- "{\"datasourceType\":\"lwzbhvgyugu\",\"objectType\":\"vmkfssxqu\",\"resourceID\":\"kfplgmgsxnk\",\"resourceLocation\":\"kde\",\"resourceName\":\"pvlopwiyighxpkd\",\"resourceType\":\"baiuebbaumny\",\"resourceUri\":\"ped\",\"resourceProperties\":{\"objectType\":\"BaseResourceProperties\"}}")
- .toObject(DatasourceSet.class);
- Assertions.assertEquals("lwzbhvgyugu", model.datasourceType());
- Assertions.assertEquals("vmkfssxqu", model.objectType());
- Assertions.assertEquals("kfplgmgsxnk", model.resourceId());
- Assertions.assertEquals("kde", model.resourceLocation());
- Assertions.assertEquals("pvlopwiyighxpkd", model.resourceName());
- Assertions.assertEquals("baiuebbaumny", model.resourceType());
- Assertions.assertEquals("ped", model.resourceUri());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DatasourceSet model =
- new DatasourceSet()
- .withDatasourceType("lwzbhvgyugu")
- .withObjectType("vmkfssxqu")
- .withResourceId("kfplgmgsxnk")
- .withResourceLocation("kde")
- .withResourceName("pvlopwiyighxpkd")
- .withResourceType("baiuebbaumny")
- .withResourceUri("ped")
- .withResourceProperties(new BaseResourceProperties());
- model = BinaryData.fromObject(model).toObject(DatasourceSet.class);
- Assertions.assertEquals("lwzbhvgyugu", model.datasourceType());
- Assertions.assertEquals("vmkfssxqu", model.objectType());
- Assertions.assertEquals("kfplgmgsxnk", model.resourceId());
- Assertions.assertEquals("kde", model.resourceLocation());
- Assertions.assertEquals("pvlopwiyighxpkd", model.resourceName());
- Assertions.assertEquals("baiuebbaumny", model.resourceType());
- Assertions.assertEquals("ped", model.resourceUri());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceTests.java
deleted file mode 100644
index 0a9cb2ddf282..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DatasourceTests.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.BaseResourceProperties;
-import com.azure.resourcemanager.dataprotection.models.Datasource;
-import org.junit.jupiter.api.Assertions;
-
-public final class DatasourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Datasource model =
- BinaryData
- .fromString(
- "{\"datasourceType\":\"hdwbavxbniwdjs\",\"objectType\":\"tsdbpgn\",\"resourceID\":\"ytxhp\",\"resourceLocation\":\"bzpfzab\",\"resourceName\":\"cuh\",\"resourceType\":\"tcty\",\"resourceUri\":\"klbb\",\"resourceProperties\":{\"objectType\":\"BaseResourceProperties\"}}")
- .toObject(Datasource.class);
- Assertions.assertEquals("hdwbavxbniwdjs", model.datasourceType());
- Assertions.assertEquals("tsdbpgn", model.objectType());
- Assertions.assertEquals("ytxhp", model.resourceId());
- Assertions.assertEquals("bzpfzab", model.resourceLocation());
- Assertions.assertEquals("cuh", model.resourceName());
- Assertions.assertEquals("tcty", model.resourceType());
- Assertions.assertEquals("klbb", model.resourceUri());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Datasource model =
- new Datasource()
- .withDatasourceType("hdwbavxbniwdjs")
- .withObjectType("tsdbpgn")
- .withResourceId("ytxhp")
- .withResourceLocation("bzpfzab")
- .withResourceName("cuh")
- .withResourceType("tcty")
- .withResourceUri("klbb")
- .withResourceProperties(new BaseResourceProperties());
- model = BinaryData.fromObject(model).toObject(Datasource.class);
- Assertions.assertEquals("hdwbavxbniwdjs", model.datasourceType());
- Assertions.assertEquals("tsdbpgn", model.objectType());
- Assertions.assertEquals("ytxhp", model.resourceId());
- Assertions.assertEquals("bzpfzab", model.resourceLocation());
- Assertions.assertEquals("cuh", model.resourceName());
- Assertions.assertEquals("tcty", model.resourceType());
- Assertions.assertEquals("klbb", model.resourceUri());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DayTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DayTests.java
deleted file mode 100644
index 029b3e8b310c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DayTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.Day;
-import org.junit.jupiter.api.Assertions;
-
-public final class DayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Day model = BinaryData.fromString("{\"date\":1722960093,\"isLast\":true}").toObject(Day.class);
- Assertions.assertEquals(1722960093, model.date());
- Assertions.assertEquals(true, model.isLast());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Day model = new Day().withDate(1722960093).withIsLast(true);
- model = BinaryData.fromObject(model).toObject(Day.class);
- Assertions.assertEquals(1722960093, model.date());
- Assertions.assertEquals(true, model.isLast());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeleteOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeleteOptionTests.java
deleted file mode 100644
index 517346ba5a3e..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeleteOptionTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DeleteOption;
-import org.junit.jupiter.api.Assertions;
-
-public final class DeleteOptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DeleteOption model =
- BinaryData
- .fromString("{\"objectType\":\"DeleteOption\",\"duration\":\"hfkvtvsexsowuel\"}")
- .toObject(DeleteOption.class);
- Assertions.assertEquals("hfkvtvsexsowuel", model.duration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DeleteOption model = new DeleteOption().withDuration("hfkvtvsexsowuel");
- model = BinaryData.fromObject(model).toObject(DeleteOption.class);
- Assertions.assertEquals("hfkvtvsexsowuel", model.duration());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteMockTests.java
deleted file mode 100644
index 2fd1145f7c04..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletedBackupInstancesUndeleteMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DeletedBackupInstancesUndeleteMockTests {
- @Test
- public void testUndelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .deletedBackupInstances()
- .undelete("zszuwiwtglxx", "ljfp", "picrmnzhrgmqgjsx", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletionInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletionInfoTests.java
deleted file mode 100644
index a5f737d9c9bc..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DeletionInfoTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DeletionInfo;
-
-public final class DeletionInfoTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DeletionInfo model =
- BinaryData
- .fromString(
- "{\"deletionTime\":\"ok\",\"billingEndDate\":\"llxdyhgs\",\"scheduledPurgeTime\":\"cogjltdtbn\",\"deleteActivityID\":\"adoocrkvc\"}")
- .toObject(DeletionInfo.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DeletionInfo model = new DeletionInfo();
- model = BinaryData.fromObject(model).toObject(DeletionInfo.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceInnerTests.java
deleted file mode 100644
index cbc5b81b4bcd..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceInnerTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner;
-
-public final class DppBaseResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppBaseResourceInner model =
- BinaryData
- .fromString("{\"id\":\"m\",\"name\":\"kufgmj\",\"type\":\"wr\"}")
- .toObject(DppBaseResourceInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppBaseResourceInner model = new DppBaseResourceInner();
- model = BinaryData.fromObject(model).toObject(DppBaseResourceInner.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceListTests.java
deleted file mode 100644
index 4063db17424c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseResourceListTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner;
-import com.azure.resourcemanager.dataprotection.models.DppBaseResourceList;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppBaseResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppBaseResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"id\":\"ximerqfobwyznk\",\"name\":\"kutwpf\",\"type\":\"a\"},{\"id\":\"hrskdsnfd\",\"name\":\"oakgtdlmkkzev\",\"type\":\"hewpusdsttwv\"}],\"nextLink\":\"vbbejdcng\"}")
- .toObject(DppBaseResourceList.class);
- Assertions.assertEquals("vbbejdcng", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppBaseResourceList model =
- new DppBaseResourceList()
- .withValue(Arrays.asList(new DppBaseResourceInner(), new DppBaseResourceInner()))
- .withNextLink("vbbejdcng");
- model = BinaryData.fromObject(model).toObject(DppBaseResourceList.class);
- Assertions.assertEquals("vbbejdcng", model.nextLink());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseTrackedResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseTrackedResourceTests.java
deleted file mode 100644
index fe0e580a3794..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppBaseTrackedResourceTests.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppBaseTrackedResource;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppBaseTrackedResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppBaseTrackedResource model =
- BinaryData
- .fromString(
- "{\"eTag\":\"dkirsoodqxhcr\",\"location\":\"ohjtckw\",\"tags\":{\"bznorcjxvsnby\":\"oifiyipjxsqwpgr\",\"cyshurzafbljjgp\":\"qabnmoc\",\"bqidtqaj\":\"toqcjmklja\",\"khbzhfepgzg\":\"yulpkudjkr\"},\"id\":\"e\",\"name\":\"zloc\",\"type\":\"scpai\"}")
- .toObject(DppBaseTrackedResource.class);
- Assertions.assertEquals("ohjtckw", model.location());
- Assertions.assertEquals("oifiyipjxsqwpgr", model.tags().get("bznorcjxvsnby"));
- Assertions.assertEquals("dkirsoodqxhcr", model.etag());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppBaseTrackedResource model =
- new DppBaseTrackedResource()
- .withLocation("ohjtckw")
- .withTags(
- mapOf(
- "bznorcjxvsnby",
- "oifiyipjxsqwpgr",
- "cyshurzafbljjgp",
- "qabnmoc",
- "bqidtqaj",
- "toqcjmklja",
- "khbzhfepgzg",
- "yulpkudjkr"))
- .withEtag("dkirsoodqxhcr");
- model = BinaryData.fromObject(model).toObject(DppBaseTrackedResource.class);
- Assertions.assertEquals("ohjtckw", model.location());
- Assertions.assertEquals("oifiyipjxsqwpgr", model.tags().get("bznorcjxvsnby"));
- Assertions.assertEquals("dkirsoodqxhcr", model.etag());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppIdentityDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppIdentityDetailsTests.java
deleted file mode 100644
index b2a80d571bce..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppIdentityDetailsTests.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppIdentityDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppIdentityDetails model =
- BinaryData
- .fromString(
- "{\"principalId\":\"xmnteiwaop\",\"tenantId\":\"mijcmmxdcufufs\",\"type\":\"ymzidn\",\"userAssignedIdentities\":{\"tbzsgfyccs\":{\"principalId\":\"05992a25-5a3c-489c-8844-8def4acbbb2a\",\"clientId\":\"145a6212-7d83-4f77-b358-8122dde72fd4\"},\"mdwzjeiachboo\":{\"principalId\":\"2ccbb825-1f77-4a8b-8614-e49530bae829\",\"clientId\":\"b3688cbe-fc11-42ed-9c9e-eed92d43f58d\"},\"nrosfqpte\":{\"principalId\":\"bbb7502f-6130-4080-8a33-fa24fd3506c5\",\"clientId\":\"9ca5c0f9-d64c-4b2d-ac40-c88841bb9267\"},\"zvypyqrimzinp\":{\"principalId\":\"ecca0efe-e900-46cd-92ba-1182988af69b\",\"clientId\":\"1ac68a2c-e646-4377-8203-79ca3b2f69f2\"}}}")
- .toObject(DppIdentityDetails.class);
- Assertions.assertEquals("ymzidn", model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppIdentityDetails model =
- new DppIdentityDetails()
- .withType("ymzidn")
- .withUserAssignedIdentities(
- mapOf(
- "tbzsgfyccs",
- new UserAssignedIdentity(),
- "mdwzjeiachboo",
- new UserAssignedIdentity(),
- "nrosfqpte",
- new UserAssignedIdentity(),
- "zvypyqrimzinp",
- new UserAssignedIdentity()));
- model = BinaryData.fromObject(model).toObject(DppIdentityDetails.class);
- Assertions.assertEquals("ymzidn", model.type());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppProxyResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppProxyResourceTests.java
deleted file mode 100644
index 815d3e6673f8..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppProxyResourceTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppProxyResource;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppProxyResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppProxyResource model =
- BinaryData
- .fromString(
- "{\"tags\":{\"zq\":\"gyepsbjt\",\"fjz\":\"gxywpmue\"},\"id\":\"qkqujidsu\",\"name\":\"onobglaocqx\",\"type\":\"ccm\"}")
- .toObject(DppProxyResource.class);
- Assertions.assertEquals("gyepsbjt", model.tags().get("zq"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppProxyResource model = new DppProxyResource().withTags(mapOf("zq", "gyepsbjt", "fjz", "gxywpmue"));
- model = BinaryData.fromObject(model).toObject(DppProxyResource.class);
- Assertions.assertEquals("gyepsbjt", model.tags().get("zq"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index fa57f5605331..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.ResourceGuardOperationDetail;
-import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBase;
-import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DppResourceGuardProxiesCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"resourceGuardResourceId\":\"hguynuchlgmltxdw\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"us\",\"defaultResourceRequest\":\"vlnsnnjz\"},{\"vaultCriticalOperation\":\"afolpymwamxqzrag\",\"defaultResourceRequest\":\"dphtv\"}],\"lastUpdatedTime\":\"lajv\",\"description\":\"jchcsrlzknmzla\"},\"id\":\"updwv\",\"name\":\"phcnzqtpj\",\"type\":\"mqrhvthl\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ResourceGuardProxyBaseResource response =
- manager
- .dppResourceGuardProxies()
- .define("jpu")
- .withExistingBackupVault("zrvjfnmjmvlwyzgi", "lkujrllfojui")
- .withProperties(
- new ResourceGuardProxyBase()
- .withResourceGuardResourceId("ucejikzoeovvtz")
- .withResourceGuardOperationDetails(
- Arrays
- .asList(
- new ResourceGuardOperationDetail()
- .withVaultCriticalOperation("jklntikyj")
- .withDefaultResourceRequest("k")))
- .withLastUpdatedTime("qzolxrzvhqjw")
- .withDescription("htgv"))
- .create();
-
- Assertions.assertEquals("hguynuchlgmltxdw", response.properties().resourceGuardResourceId());
- Assertions
- .assertEquals("us", response.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation());
- Assertions
- .assertEquals(
- "vlnsnnjz", response.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest());
- Assertions.assertEquals("lajv", response.properties().lastUpdatedTime());
- Assertions.assertEquals("jchcsrlzknmzla", response.properties().description());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesDeleteWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesDeleteWithResponseMockTests.java
deleted file mode 100644
index 118e3da6f92f..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DppResourceGuardProxiesDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .dppResourceGuardProxies()
- .deleteWithResponse("bmoichd", "pnfpubntnbat", "viqsowsaaelcattc", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesGetWithResponseMockTests.java
deleted file mode 100644
index d60be102ea37..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DppResourceGuardProxiesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"resourceGuardResourceId\":\"mmyky\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"glh\",\"defaultResourceRequest\":\"rryejylmbkzudnig\"},{\"vaultCriticalOperation\":\"ihotjewlpxuzzjg\",\"defaultResourceRequest\":\"efqyhqotoihiqaky\"}],\"lastUpdatedTime\":\"wf\",\"description\":\"kwpzdqtvh\"},\"id\":\"podaq\",\"name\":\"xsi\",\"type\":\"ietgbebjfu\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ResourceGuardProxyBaseResource response =
- manager
- .dppResourceGuardProxies()
- .getWithResponse("lrocuyzlwh", "memhooclutnpq", "emc", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("mmyky", response.properties().resourceGuardResourceId());
- Assertions
- .assertEquals("glh", response.properties().resourceGuardOperationDetails().get(0).vaultCriticalOperation());
- Assertions
- .assertEquals(
- "rryejylmbkzudnig",
- response.properties().resourceGuardOperationDetails().get(0).defaultResourceRequest());
- Assertions.assertEquals("wf", response.properties().lastUpdatedTime());
- Assertions.assertEquals("kwpzdqtvh", response.properties().description());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesListMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesListMockTests.java
deleted file mode 100644
index cea91fda439c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesListMockTests.java
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.ResourceGuardProxyBaseResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DppResourceGuardProxiesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"resourceGuardResourceId\":\"mzgwe\",\"resourceGuardOperationDetails\":[{\"vaultCriticalOperation\":\"xwefohecbvopwndy\",\"defaultResourceRequest\":\"eallklmtkhlo\"},{\"vaultCriticalOperation\":\"x\",\"defaultResourceRequest\":\"vbrdfjmzsyzfho\"}],\"lastUpdatedTime\":\"h\",\"description\":\"cyychunsjlp\"},\"id\":\"twszhvvuic\",\"name\":\"hvtrrmhwrbfdpyf\",\"type\":\"ubhvj\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.dppResourceGuardProxies().list("v", "xmycjimryvwgcw", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("mzgwe", response.iterator().next().properties().resourceGuardResourceId());
- Assertions
- .assertEquals(
- "xwefohecbvopwndy",
- response
- .iterator()
- .next()
- .properties()
- .resourceGuardOperationDetails()
- .get(0)
- .vaultCriticalOperation());
- Assertions
- .assertEquals(
- "eallklmtkhlo",
- response
- .iterator()
- .next()
- .properties()
- .resourceGuardOperationDetails()
- .get(0)
- .defaultResourceRequest());
- Assertions.assertEquals("h", response.iterator().next().properties().lastUpdatedTime());
- Assertions.assertEquals("cyychunsjlp", response.iterator().next().properties().description());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesUnlockDeleteWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesUnlockDeleteWithResponseMockTests.java
deleted file mode 100644
index 770190faf1d7..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceGuardProxiesUnlockDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.UnlockDeleteRequest;
-import com.azure.resourcemanager.dataprotection.models.UnlockDeleteResponse;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DppResourceGuardProxiesUnlockDeleteWithResponseMockTests {
- @Test
- public void testUnlockDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"unlockDeleteExpiryTime\":\"dqlvhukoveof\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- UnlockDeleteResponse response =
- manager
- .dppResourceGuardProxies()
- .unlockDeleteWithResponse(
- "uhplrvkmjcwmjv",
- "gfggcvkyylizrzbj",
- "sfxsf",
- new UnlockDeleteRequest()
- .withResourceGuardOperationRequests(Arrays.asList("lvt"))
- .withResourceToBeDeleted("agb"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("dqlvhukoveof", response.unlockDeleteExpiryTime());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceListTests.java
deleted file mode 100644
index a8a9bb9375be..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppResourceList;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppResourceList model =
- BinaryData.fromString("{\"nextLink\":\"hhbcsglummajtjao\"}").toObject(DppResourceList.class);
- Assertions.assertEquals("hhbcsglummajtjao", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppResourceList model = new DppResourceList().withNextLink("hhbcsglummajtjao");
- model = BinaryData.fromObject(model).toObject(DppResourceList.class);
- Assertions.assertEquals("hhbcsglummajtjao", model.nextLink());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceTests.java
deleted file mode 100644
index 5196d3e92761..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppResourceTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppResource;
-
-public final class DppResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppResource model =
- BinaryData
- .fromString("{\"id\":\"dwtiukbldngkp\",\"name\":\"cipazyxoegukgjnp\",\"type\":\"ucgygevqz\"}")
- .toObject(DppResource.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppResource model = new DppResource();
- model = BinaryData.fromObject(model).toObject(DppResource.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceListTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceListTests.java
deleted file mode 100644
index b92c3ee91f55..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceListTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppTrackedResourceList;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppTrackedResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppTrackedResourceList model =
- BinaryData.fromString("{\"nextLink\":\"azxkhnzbonlwnto\"}").toObject(DppTrackedResourceList.class);
- Assertions.assertEquals("azxkhnzbonlwnto", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppTrackedResourceList model = new DppTrackedResourceList().withNextLink("azxkhnzbonlwnto");
- model = BinaryData.fromObject(model).toObject(DppTrackedResourceList.class);
- Assertions.assertEquals("azxkhnzbonlwnto", model.nextLink());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceTests.java
deleted file mode 100644
index cf74b92beeb8..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppTrackedResourceTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.DppTrackedResource;
-import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppTrackedResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppTrackedResource model =
- BinaryData
- .fromString(
- "{\"identity\":{\"principalId\":\"jgzjaoyfhrtx\",\"tenantId\":\"n\",\"type\":\"kujysvlejuvfq\",\"userAssignedIdentities\":{\"xwjkcprbnwbxg\":{\"principalId\":\"219e0109-deda-4ee9-8735-2600b97e58d4\",\"clientId\":\"7e50e910-e1d0-4503-ab76-e9b81e1f8ead\"},\"bvpyss\":{\"principalId\":\"1227691a-a47d-4bcd-8a59-37efbbfd7349\",\"clientId\":\"3595c5f9-0d4b-49d6-b44d-b3b3bd5db6c2\"},\"rujqg\":{\"principalId\":\"fc47465c-0b57-4de4-96fd-7ff47914d8c8\",\"clientId\":\"cc034697-3a26-49ac-9e6b-3909fdfc1c67\"},\"uouq\":{\"principalId\":\"80f5dd5f-bda6-4c08-bfc7-d9ade0acc0b0\",\"clientId\":\"e17afb2b-e0a4-4e8e-9c15-a3a6b9e2de52\"}}},\"eTag\":\"rwzwbng\",\"location\":\"tnwu\",\"tags\":{\"x\":\"a\",\"hr\":\"fizuckyf\"},\"id\":\"idf\",\"name\":\"zwdzuh\",\"type\":\"ymwisdkft\"}")
- .toObject(DppTrackedResource.class);
- Assertions.assertEquals("tnwu", model.location());
- Assertions.assertEquals("a", model.tags().get("x"));
- Assertions.assertEquals("rwzwbng", model.etag());
- Assertions.assertEquals("kujysvlejuvfq", model.identity().type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppTrackedResource model =
- new DppTrackedResource()
- .withLocation("tnwu")
- .withTags(mapOf("x", "a", "hr", "fizuckyf"))
- .withEtag("rwzwbng")
- .withIdentity(
- new DppIdentityDetails()
- .withType("kujysvlejuvfq")
- .withUserAssignedIdentities(
- mapOf(
- "xwjkcprbnwbxg",
- new UserAssignedIdentity(),
- "bvpyss",
- new UserAssignedIdentity(),
- "rujqg",
- new UserAssignedIdentity(),
- "uouq",
- new UserAssignedIdentity())));
- model = BinaryData.fromObject(model).toObject(DppTrackedResource.class);
- Assertions.assertEquals("tnwu", model.location());
- Assertions.assertEquals("a", model.tags().get("x"));
- Assertions.assertEquals("rwzwbng", model.etag());
- Assertions.assertEquals("kujysvlejuvfq", model.identity().type());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppWorkerRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppWorkerRequestTests.java
deleted file mode 100644
index 41068a26f8b2..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/DppWorkerRequestTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.DppWorkerRequest;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DppWorkerRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DppWorkerRequest model =
- BinaryData
- .fromString(
- "{\"subscriptionId\":\"fffiak\",\"uri\":\"pqqmted\",\"headers\":{\"mdscwxqupev\":[\"jihy\",\"ozphvwauyqncygu\",\"kvi\"]},\"supportedGroupVersions\":[\"stotxh\"],\"cultureInfo\":\"ujbypelmcuvhixb\",\"parameters\":{\"yl\":\"fw\",\"ujrywvtyl\":\"coolsttpkiwkkb\"},\"httpMethod\":\"pncur\"}")
- .toObject(DppWorkerRequest.class);
- Assertions.assertEquals("fffiak", model.subscriptionId());
- Assertions.assertEquals("pqqmted", model.uri());
- Assertions.assertEquals("jihy", model.headers().get("mdscwxqupev").get(0));
- Assertions.assertEquals("stotxh", model.supportedGroupVersions().get(0));
- Assertions.assertEquals("ujbypelmcuvhixb", model.cultureInfo());
- Assertions.assertEquals("fw", model.parameters().get("yl"));
- Assertions.assertEquals("pncur", model.httpMethod());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DppWorkerRequest model =
- new DppWorkerRequest()
- .withSubscriptionId("fffiak")
- .withUri("pqqmted")
- .withHeaders(mapOf("mdscwxqupev", Arrays.asList("jihy", "ozphvwauyqncygu", "kvi")))
- .withSupportedGroupVersions(Arrays.asList("stotxh"))
- .withCultureInfo("ujbypelmcuvhixb")
- .withParameters(mapOf("yl", "fw", "ujrywvtyl", "coolsttpkiwkkb"))
- .withHttpMethod("pncur");
- model = BinaryData.fromObject(model).toObject(DppWorkerRequest.class);
- Assertions.assertEquals("fffiak", model.subscriptionId());
- Assertions.assertEquals("pqqmted", model.uri());
- Assertions.assertEquals("jihy", model.headers().get("mdscwxqupev").get(0));
- Assertions.assertEquals("stotxh", model.supportedGroupVersions().get(0));
- Assertions.assertEquals("ujbypelmcuvhixb", model.cultureInfo());
- Assertions.assertEquals("fw", model.parameters().get("yl"));
- Assertions.assertEquals("pncur", model.httpMethod());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureSettingsTests.java
deleted file mode 100644
index c0508ff28ffc..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureSettingsTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class FeatureSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FeatureSettings model =
- BinaryData
- .fromString(
- "{\"crossSubscriptionRestoreSettings\":{\"state\":\"PermanentlyDisabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}}")
- .toObject(FeatureSettings.class);
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.crossSubscriptionRestoreSettings().state());
- Assertions.assertEquals(CrossRegionRestoreState.DISABLED, model.crossRegionRestoreSettings().state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FeatureSettings model =
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.PERMANENTLY_DISABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.DISABLED));
- model = BinaryData.fromObject(model).toObject(FeatureSettings.class);
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.PERMANENTLY_DISABLED, model.crossSubscriptionRestoreSettings().state());
- Assertions.assertEquals(CrossRegionRestoreState.DISABLED, model.crossRegionRestoreSettings().state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestBaseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestBaseTests.java
deleted file mode 100644
index f86a04fe27fa..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestBaseTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequestBase;
-
-public final class FeatureValidationRequestBaseTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FeatureValidationRequestBase model =
- BinaryData
- .fromString("{\"objectType\":\"FeatureValidationRequestBase\"}")
- .toObject(FeatureValidationRequestBase.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FeatureValidationRequestBase model = new FeatureValidationRequestBase();
- model = BinaryData.fromObject(model).toObject(FeatureValidationRequestBase.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestTests.java
deleted file mode 100644
index 7bd151ae3936..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationRequestTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.FeatureType;
-import com.azure.resourcemanager.dataprotection.models.FeatureValidationRequest;
-import org.junit.jupiter.api.Assertions;
-
-public final class FeatureValidationRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FeatureValidationRequest model =
- BinaryData
- .fromString(
- "{\"objectType\":\"FeatureValidationRequest\",\"featureType\":\"DataSourceType\",\"featureName\":\"m\"}")
- .toObject(FeatureValidationRequest.class);
- Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType());
- Assertions.assertEquals("m", model.featureName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FeatureValidationRequest model =
- new FeatureValidationRequest().withFeatureType(FeatureType.DATA_SOURCE_TYPE).withFeatureName("m");
- model = BinaryData.fromObject(model).toObject(FeatureValidationRequest.class);
- Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType());
- Assertions.assertEquals("m", model.featureName());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseBaseInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseBaseInnerTests.java
deleted file mode 100644
index 1e41db25182f..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseBaseInnerTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.FeatureValidationResponseBaseInner;
-
-public final class FeatureValidationResponseBaseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FeatureValidationResponseBaseInner model =
- BinaryData
- .fromString("{\"objectType\":\"FeatureValidationResponseBase\"}")
- .toObject(FeatureValidationResponseBaseInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FeatureValidationResponseBaseInner model = new FeatureValidationResponseBaseInner();
- model = BinaryData.fromObject(model).toObject(FeatureValidationResponseBaseInner.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseTests.java
deleted file mode 100644
index 274a9a8c9302..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/FeatureValidationResponseTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.FeatureSupportStatus;
-import com.azure.resourcemanager.dataprotection.models.FeatureType;
-import com.azure.resourcemanager.dataprotection.models.FeatureValidationResponse;
-import com.azure.resourcemanager.dataprotection.models.SupportedFeature;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class FeatureValidationResponseTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- FeatureValidationResponse model =
- BinaryData
- .fromString(
- "{\"objectType\":\"FeatureValidationResponse\",\"featureType\":\"DataSourceType\",\"features\":[{\"featureName\":\"vbbxuripl\",\"supportStatus\":\"GenerallyAvailable\",\"exposureControlledFeatures\":[\"baxk\",\"xywr\"]},{\"featureName\":\"pyklyhpluodpvru\",\"supportStatus\":\"GenerallyAvailable\",\"exposureControlledFeatures\":[\"ibthostgktstvd\"]},{\"featureName\":\"clzedqbcvh\",\"supportStatus\":\"GenerallyAvailable\",\"exposureControlledFeatures\":[\"odqkdlwwqfb\",\"mlkxtrqjfs\",\"lmbtxhwgfwsrt\",\"wcoezbrhub\"]}]}")
- .toObject(FeatureValidationResponse.class);
- Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType());
- Assertions.assertEquals("vbbxuripl", model.features().get(0).featureName());
- Assertions.assertEquals(FeatureSupportStatus.GENERALLY_AVAILABLE, model.features().get(0).supportStatus());
- Assertions.assertEquals("baxk", model.features().get(0).exposureControlledFeatures().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- FeatureValidationResponse model =
- new FeatureValidationResponse()
- .withFeatureType(FeatureType.DATA_SOURCE_TYPE)
- .withFeatures(
- Arrays
- .asList(
- new SupportedFeature()
- .withFeatureName("vbbxuripl")
- .withSupportStatus(FeatureSupportStatus.GENERALLY_AVAILABLE)
- .withExposureControlledFeatures(Arrays.asList("baxk", "xywr")),
- new SupportedFeature()
- .withFeatureName("pyklyhpluodpvru")
- .withSupportStatus(FeatureSupportStatus.GENERALLY_AVAILABLE)
- .withExposureControlledFeatures(Arrays.asList("ibthostgktstvd")),
- new SupportedFeature()
- .withFeatureName("clzedqbcvh")
- .withSupportStatus(FeatureSupportStatus.GENERALLY_AVAILABLE)
- .withExposureControlledFeatures(
- Arrays.asList("odqkdlwwqfb", "mlkxtrqjfs", "lmbtxhwgfwsrt", "wcoezbrhub"))));
- model = BinaryData.fromObject(model).toObject(FeatureValidationResponse.class);
- Assertions.assertEquals(FeatureType.DATA_SOURCE_TYPE, model.featureType());
- Assertions.assertEquals("vbbxuripl", model.features().get(0).featureName());
- Assertions.assertEquals(FeatureSupportStatus.GENERALLY_AVAILABLE, model.features().get(0).supportStatus());
- Assertions.assertEquals("baxk", model.features().get(0).exposureControlledFeatures().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/IdentityDetailsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/IdentityDetailsTests.java
deleted file mode 100644
index 1e58f78d2ead..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/IdentityDetailsTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.IdentityDetails;
-import org.junit.jupiter.api.Assertions;
-
-public final class IdentityDetailsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- IdentityDetails model =
- BinaryData
- .fromString("{\"useSystemAssignedIdentity\":true,\"userAssignedIdentityArmUrl\":\"ermclfplphoxuscr\"}")
- .toObject(IdentityDetails.class);
- Assertions.assertEquals(true, model.useSystemAssignedIdentity());
- Assertions.assertEquals("ermclfplphoxuscr", model.userAssignedIdentityArmUrl());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- IdentityDetails model =
- new IdentityDetails()
- .withUseSystemAssignedIdentity(true)
- .withUserAssignedIdentityArmUrl("ermclfplphoxuscr");
- model = BinaryData.fromObject(model).toObject(IdentityDetails.class);
- Assertions.assertEquals(true, model.useSystemAssignedIdentity());
- Assertions.assertEquals("ermclfplphoxuscr", model.userAssignedIdentityArmUrl());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmediateCopyOptionTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmediateCopyOptionTests.java
deleted file mode 100644
index ec8c7cb6f9eb..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmediateCopyOptionTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ImmediateCopyOption;
-
-public final class ImmediateCopyOptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ImmediateCopyOption model =
- BinaryData.fromString("{\"objectType\":\"ImmediateCopyOption\"}").toObject(ImmediateCopyOption.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ImmediateCopyOption model = new ImmediateCopyOption();
- model = BinaryData.fromObject(model).toObject(ImmediateCopyOption.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmutabilitySettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmutabilitySettingsTests.java
deleted file mode 100644
index 6426fc25e21d..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ImmutabilitySettingsTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import org.junit.jupiter.api.Assertions;
-
-public final class ImmutabilitySettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ImmutabilitySettings model =
- BinaryData.fromString("{\"state\":\"Disabled\"}").toObject(ImmutabilitySettings.class);
- Assertions.assertEquals(ImmutabilityState.DISABLED, model.state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ImmutabilitySettings model = new ImmutabilitySettings().withState(ImmutabilityState.DISABLED);
- model = BinaryData.fromObject(model).toObject(ImmutabilitySettings.class);
- Assertions.assertEquals(ImmutabilityState.DISABLED, model.state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemLevelRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemLevelRestoreCriteriaTests.java
deleted file mode 100644
index 0c702b23dd0f..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemLevelRestoreCriteriaTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ItemLevelRestoreCriteria;
-
-public final class ItemLevelRestoreCriteriaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ItemLevelRestoreCriteria model =
- BinaryData
- .fromString("{\"objectType\":\"ItemLevelRestoreCriteria\"}")
- .toObject(ItemLevelRestoreCriteria.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ItemLevelRestoreCriteria model = new ItemLevelRestoreCriteria();
- model = BinaryData.fromObject(model).toObject(ItemLevelRestoreCriteria.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemPathBasedRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemPathBasedRestoreCriteriaTests.java
deleted file mode 100644
index b11da878c4df..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/ItemPathBasedRestoreCriteriaTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ItemPathBasedRestoreCriteria;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ItemPathBasedRestoreCriteriaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ItemPathBasedRestoreCriteria model =
- BinaryData
- .fromString(
- "{\"objectType\":\"ItemPathBasedRestoreCriteria\",\"itemPath\":\"xwmygdxpgpqc\",\"isPathRelativeToBackupItem\":false,\"subItemPathPrefix\":[\"epn\"]}")
- .toObject(ItemPathBasedRestoreCriteria.class);
- Assertions.assertEquals("xwmygdxpgpqc", model.itemPath());
- Assertions.assertEquals(false, model.isPathRelativeToBackupItem());
- Assertions.assertEquals("epn", model.subItemPathPrefix().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ItemPathBasedRestoreCriteria model =
- new ItemPathBasedRestoreCriteria()
- .withItemPath("xwmygdxpgpqc")
- .withIsPathRelativeToBackupItem(false)
- .withSubItemPathPrefix(Arrays.asList("epn"));
- model = BinaryData.fromObject(model).toObject(ItemPathBasedRestoreCriteria.class);
- Assertions.assertEquals("xwmygdxpgpqc", model.itemPath());
- Assertions.assertEquals(false, model.isPathRelativeToBackupItem());
- Assertions.assertEquals("epn", model.subItemPathPrefix().get(0));
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobExtendedInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobExtendedInfoTests.java
deleted file mode 100644
index a024d35ff51a..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobExtendedInfoTests.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.JobExtendedInfo;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class JobExtendedInfoTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- JobExtendedInfo model =
- BinaryData
- .fromString(
- "{\"additionalDetails\":{\"hhuao\":\"zfq\",\"ahzxctobgbk\":\"ppcqeqxolz\",\"mgrcfbu\":\"moizpos\",\"mjh\":\"rmfqjhhkxbpvj\"},\"backupInstanceState\":\"j\",\"dataTransferredInBytes\":87.30772584972803,\"recoveryDestination\":\"ivkrtsw\",\"sourceRecoverPoint\":{\"recoveryPointID\":\"zvszj\",\"recoveryPointTime\":\"2021-04-01T03:47:56Z\"},\"subTasks\":[{\"additionalDetails\":{\"cqaqtdoqmcbx\":\"xxivetv\",\"bhsfxob\":\"wvxysl\"},\"taskId\":168100762,\"taskName\":\"tkblmpewww\",\"taskProgress\":\"krvrns\",\"taskStatus\":\"shqjohxcrsbf\"}],\"targetRecoverPoint\":{\"recoveryPointID\":\"srruvwbhsqfsubcg\",\"recoveryPointTime\":\"2021-02-04T22:06:27Z\"}}")
- .toObject(JobExtendedInfo.class);
- Assertions.assertEquals("zfq", model.additionalDetails().get("hhuao"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- JobExtendedInfo model =
- new JobExtendedInfo()
- .withAdditionalDetails(
- mapOf("hhuao", "zfq", "ahzxctobgbk", "ppcqeqxolz", "mgrcfbu", "moizpos", "mjh", "rmfqjhhkxbpvj"));
- model = BinaryData.fromObject(model).toObject(JobExtendedInfo.class);
- Assertions.assertEquals("zfq", model.additionalDetails().get("hhuao"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobSubTaskTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobSubTaskTests.java
deleted file mode 100644
index 657f0df63449..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/JobSubTaskTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.JobSubTask;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class JobSubTaskTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- JobSubTask model =
- BinaryData
- .fromString(
- "{\"additionalDetails\":{\"bexilzznfqqnv\":\"fbjfdtwssotftpvj\",\"ujmkcjhwqy\":\"pmqtaru\"},\"taskId\":1656357002,\"taskName\":\"r\",\"taskProgress\":\"n\",\"taskStatus\":\"jewgdrjerv\"}")
- .toObject(JobSubTask.class);
- Assertions.assertEquals("fbjfdtwssotftpvj", model.additionalDetails().get("bexilzznfqqnv"));
- Assertions.assertEquals(1656357002, model.taskId());
- Assertions.assertEquals("r", model.taskName());
- Assertions.assertEquals("jewgdrjerv", model.taskStatus());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- JobSubTask model =
- new JobSubTask()
- .withAdditionalDetails(mapOf("bexilzznfqqnv", "fbjfdtwssotftpvj", "ujmkcjhwqy", "pmqtaru"))
- .withTaskId(1656357002)
- .withTaskName("r")
- .withTaskStatus("jewgdrjerv");
- model = BinaryData.fromObject(model).toObject(JobSubTask.class);
- Assertions.assertEquals("fbjfdtwssotftpvj", model.additionalDetails().get("bexilzznfqqnv"));
- Assertions.assertEquals(1656357002, model.taskId());
- Assertions.assertEquals("r", model.taskName());
- Assertions.assertEquals("jewgdrjerv", model.taskStatus());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterBackupDatasourceParametersTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterBackupDatasourceParametersTests.java
deleted file mode 100644
index 24c4c5819b3c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterBackupDatasourceParametersTests.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.KubernetesClusterBackupDatasourceParameters;
-import com.azure.resourcemanager.dataprotection.models.NamespacedNameResource;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class KubernetesClusterBackupDatasourceParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- KubernetesClusterBackupDatasourceParameters model =
- BinaryData
- .fromString(
- "{\"objectType\":\"KubernetesClusterBackupDatasourceParameters\",\"snapshotVolumes\":true,\"includeClusterScopeResources\":false,\"includedNamespaces\":[\"jntpsewgioilqu\"],\"excludedNamespaces\":[\"dxtqmieoxo\",\"ggufhyaomtb\"],\"includedResourceTypes\":[\"avgrvkffovjz\",\"pjbi\"],\"excludedResourceTypes\":[\"mfxumvfcluyovw\",\"nbkfezzxscy\"],\"labelSelectors\":[\"dgirujbzbom\",\"zzbtdcqvpniyujvi\"],\"backupHookReferences\":[{\"name\":\"shfssnrbgyef\",\"namespace\":\"msgaoj\"}]}")
- .toObject(KubernetesClusterBackupDatasourceParameters.class);
- Assertions.assertEquals(true, model.snapshotVolumes());
- Assertions.assertEquals(false, model.includeClusterScopeResources());
- Assertions.assertEquals("jntpsewgioilqu", model.includedNamespaces().get(0));
- Assertions.assertEquals("dxtqmieoxo", model.excludedNamespaces().get(0));
- Assertions.assertEquals("avgrvkffovjz", model.includedResourceTypes().get(0));
- Assertions.assertEquals("mfxumvfcluyovw", model.excludedResourceTypes().get(0));
- Assertions.assertEquals("dgirujbzbom", model.labelSelectors().get(0));
- Assertions.assertEquals("shfssnrbgyef", model.backupHookReferences().get(0).name());
- Assertions.assertEquals("msgaoj", model.backupHookReferences().get(0).namespace());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- KubernetesClusterBackupDatasourceParameters model =
- new KubernetesClusterBackupDatasourceParameters()
- .withSnapshotVolumes(true)
- .withIncludeClusterScopeResources(false)
- .withIncludedNamespaces(Arrays.asList("jntpsewgioilqu"))
- .withExcludedNamespaces(Arrays.asList("dxtqmieoxo", "ggufhyaomtb"))
- .withIncludedResourceTypes(Arrays.asList("avgrvkffovjz", "pjbi"))
- .withExcludedResourceTypes(Arrays.asList("mfxumvfcluyovw", "nbkfezzxscy"))
- .withLabelSelectors(Arrays.asList("dgirujbzbom", "zzbtdcqvpniyujvi"))
- .withBackupHookReferences(
- Arrays.asList(new NamespacedNameResource().withName("shfssnrbgyef").withNamespace("msgaoj")));
- model = BinaryData.fromObject(model).toObject(KubernetesClusterBackupDatasourceParameters.class);
- Assertions.assertEquals(true, model.snapshotVolumes());
- Assertions.assertEquals(false, model.includeClusterScopeResources());
- Assertions.assertEquals("jntpsewgioilqu", model.includedNamespaces().get(0));
- Assertions.assertEquals("dxtqmieoxo", model.excludedNamespaces().get(0));
- Assertions.assertEquals("avgrvkffovjz", model.includedResourceTypes().get(0));
- Assertions.assertEquals("mfxumvfcluyovw", model.excludedResourceTypes().get(0));
- Assertions.assertEquals("dgirujbzbom", model.labelSelectors().get(0));
- Assertions.assertEquals("shfssnrbgyef", model.backupHookReferences().get(0).name());
- Assertions.assertEquals("msgaoj", model.backupHookReferences().get(0).namespace());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterRestoreCriteriaTests.java
deleted file mode 100644
index 81d07a670d9d..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesClusterRestoreCriteriaTests.java
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.ExistingResourcePolicy;
-import com.azure.resourcemanager.dataprotection.models.KubernetesClusterRestoreCriteria;
-import com.azure.resourcemanager.dataprotection.models.NamespacedNameResource;
-import com.azure.resourcemanager.dataprotection.models.PersistentVolumeRestoreMode;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class KubernetesClusterRestoreCriteriaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- KubernetesClusterRestoreCriteria model =
- BinaryData
- .fromString(
- "{\"objectType\":\"KubernetesClusterRestoreCriteria\",\"includeClusterScopeResources\":false,\"includedNamespaces\":[\"nrwrbiork\",\"alywjhhgdn\",\"xmsivfomiloxggdu\"],\"excludedNamespaces\":[\"ndieuzaofj\"],\"includedResourceTypes\":[\"cyyysfgdot\"],\"excludedResourceTypes\":[\"iipuipwoqonm\",\"cje\"],\"labelSelectors\":[\"zshq\"],\"persistentVolumeRestoreMode\":\"RestoreWithVolumeData\",\"conflictPolicy\":\"Skip\",\"namespaceMappings\":{\"ccwr\":\"fgmblrrilbywdxsm\",\"dvoqyt\":\"fscjfnynszquji\",\"hjoxo\":\"byowbblgyavutp\"},\"restoreHookReferences\":[{\"name\":\"ksbpimlqoljx\",\"namespace\":\"gxxlxsffgcvizq\"},{\"name\":\"wlvwlyoupf\",\"namespace\":\"bkjubdyhgkfmins\"}]}")
- .toObject(KubernetesClusterRestoreCriteria.class);
- Assertions.assertEquals(false, model.includeClusterScopeResources());
- Assertions.assertEquals("nrwrbiork", model.includedNamespaces().get(0));
- Assertions.assertEquals("ndieuzaofj", model.excludedNamespaces().get(0));
- Assertions.assertEquals("cyyysfgdot", model.includedResourceTypes().get(0));
- Assertions.assertEquals("iipuipwoqonm", model.excludedResourceTypes().get(0));
- Assertions.assertEquals("zshq", model.labelSelectors().get(0));
- Assertions
- .assertEquals(PersistentVolumeRestoreMode.RESTORE_WITH_VOLUME_DATA, model.persistentVolumeRestoreMode());
- Assertions.assertEquals(ExistingResourcePolicy.SKIP, model.conflictPolicy());
- Assertions.assertEquals("fgmblrrilbywdxsm", model.namespaceMappings().get("ccwr"));
- Assertions.assertEquals("ksbpimlqoljx", model.restoreHookReferences().get(0).name());
- Assertions.assertEquals("gxxlxsffgcvizq", model.restoreHookReferences().get(0).namespace());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- KubernetesClusterRestoreCriteria model =
- new KubernetesClusterRestoreCriteria()
- .withIncludeClusterScopeResources(false)
- .withIncludedNamespaces(Arrays.asList("nrwrbiork", "alywjhhgdn", "xmsivfomiloxggdu"))
- .withExcludedNamespaces(Arrays.asList("ndieuzaofj"))
- .withIncludedResourceTypes(Arrays.asList("cyyysfgdot"))
- .withExcludedResourceTypes(Arrays.asList("iipuipwoqonm", "cje"))
- .withLabelSelectors(Arrays.asList("zshq"))
- .withPersistentVolumeRestoreMode(PersistentVolumeRestoreMode.RESTORE_WITH_VOLUME_DATA)
- .withConflictPolicy(ExistingResourcePolicy.SKIP)
- .withNamespaceMappings(
- mapOf("ccwr", "fgmblrrilbywdxsm", "dvoqyt", "fscjfnynszquji", "hjoxo", "byowbblgyavutp"))
- .withRestoreHookReferences(
- Arrays
- .asList(
- new NamespacedNameResource().withName("ksbpimlqoljx").withNamespace("gxxlxsffgcvizq"),
- new NamespacedNameResource().withName("wlvwlyoupf").withNamespace("bkjubdyhgkfmins")));
- model = BinaryData.fromObject(model).toObject(KubernetesClusterRestoreCriteria.class);
- Assertions.assertEquals(false, model.includeClusterScopeResources());
- Assertions.assertEquals("nrwrbiork", model.includedNamespaces().get(0));
- Assertions.assertEquals("ndieuzaofj", model.excludedNamespaces().get(0));
- Assertions.assertEquals("cyyysfgdot", model.includedResourceTypes().get(0));
- Assertions.assertEquals("iipuipwoqonm", model.excludedResourceTypes().get(0));
- Assertions.assertEquals("zshq", model.labelSelectors().get(0));
- Assertions
- .assertEquals(PersistentVolumeRestoreMode.RESTORE_WITH_VOLUME_DATA, model.persistentVolumeRestoreMode());
- Assertions.assertEquals(ExistingResourcePolicy.SKIP, model.conflictPolicy());
- Assertions.assertEquals("fgmblrrilbywdxsm", model.namespaceMappings().get("ccwr"));
- Assertions.assertEquals("ksbpimlqoljx", model.restoreHookReferences().get(0).name());
- Assertions.assertEquals("gxxlxsffgcvizq", model.restoreHookReferences().get(0).namespace());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesPVRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesPVRestoreCriteriaTests.java
deleted file mode 100644
index d5f251911b98..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesPVRestoreCriteriaTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.KubernetesPVRestoreCriteria;
-import org.junit.jupiter.api.Assertions;
-
-public final class KubernetesPVRestoreCriteriaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- KubernetesPVRestoreCriteria model =
- BinaryData
- .fromString(
- "{\"objectType\":\"KubernetesPVRestoreCriteria\",\"name\":\"hw\",\"storageClassName\":\"oldweyuqdu\"}")
- .toObject(KubernetesPVRestoreCriteria.class);
- Assertions.assertEquals("hw", model.name());
- Assertions.assertEquals("oldweyuqdu", model.storageClassName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- KubernetesPVRestoreCriteria model =
- new KubernetesPVRestoreCriteria().withName("hw").withStorageClassName("oldweyuqdu");
- model = BinaryData.fromObject(model).toObject(KubernetesPVRestoreCriteria.class);
- Assertions.assertEquals("hw", model.name());
- Assertions.assertEquals("oldweyuqdu", model.storageClassName());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesStorageClassRestoreCriteriaTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesStorageClassRestoreCriteriaTests.java
deleted file mode 100644
index 37601c4e419c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/KubernetesStorageClassRestoreCriteriaTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.KubernetesStorageClassRestoreCriteria;
-import org.junit.jupiter.api.Assertions;
-
-public final class KubernetesStorageClassRestoreCriteriaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- KubernetesStorageClassRestoreCriteria model =
- BinaryData
- .fromString(
- "{\"objectType\":\"KubernetesStorageClassRestoreCriteria\",\"selectedStorageClassName\":\"wbqpl\",\"provisioner\":\"vnuuepzl\"}")
- .toObject(KubernetesStorageClassRestoreCriteria.class);
- Assertions.assertEquals("wbqpl", model.selectedStorageClassName());
- Assertions.assertEquals("vnuuepzl", model.provisioner());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- KubernetesStorageClassRestoreCriteria model =
- new KubernetesStorageClassRestoreCriteria()
- .withSelectedStorageClassName("wbqpl")
- .withProvisioner("vnuuepzl");
- model = BinaryData.fromObject(model).toObject(KubernetesStorageClassRestoreCriteria.class);
- Assertions.assertEquals("wbqpl", model.selectedStorageClassName());
- Assertions.assertEquals("vnuuepzl", model.provisioner());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/MonitoringSettingsTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/MonitoringSettingsTests.java
deleted file mode 100644
index 07e1f288ecaa..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/MonitoringSettingsTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class MonitoringSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MonitoringSettings model =
- BinaryData
- .fromString("{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}}")
- .toObject(MonitoringSettings.class);
- Assertions.assertEquals(AlertsState.ENABLED, model.azureMonitorAlertSettings().alertsForAllJobFailures());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MonitoringSettings model =
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED));
- model = BinaryData.fromObject(model).toObject(MonitoringSettings.class);
- Assertions.assertEquals(AlertsState.ENABLED, model.azureMonitorAlertSettings().alertsForAllJobFailures());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/NamespacedNameResourceTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/NamespacedNameResourceTests.java
deleted file mode 100644
index 779991e053bb..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/NamespacedNameResourceTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.NamespacedNameResource;
-import org.junit.jupiter.api.Assertions;
-
-public final class NamespacedNameResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NamespacedNameResource model =
- BinaryData.fromString("{\"name\":\"wncot\",\"namespace\":\"fhir\"}").toObject(NamespacedNameResource.class);
- Assertions.assertEquals("wncot", model.name());
- Assertions.assertEquals("fhir", model.namespace());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NamespacedNameResource model = new NamespacedNameResource().withName("wncot").withNamespace("fhir");
- model = BinaryData.fromObject(model).toObject(NamespacedNameResource.class);
- Assertions.assertEquals("wncot", model.name());
- Assertions.assertEquals("fhir", model.namespace());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationExtendedInfoTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationExtendedInfoTests.java
deleted file mode 100644
index 26cf31748f4b..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationExtendedInfoTests.java
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo;
-
-public final class OperationExtendedInfoTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationExtendedInfo model =
- BinaryData.fromString("{\"objectType\":\"OperationExtendedInfo\"}").toObject(OperationExtendedInfo.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationExtendedInfo model = new OperationExtendedInfo();
- model = BinaryData.fromObject(model).toObject(OperationExtendedInfo.class);
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationJobExtendedInfoInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationJobExtendedInfoInnerTests.java
deleted file mode 100644
index ff52f8577deb..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationJobExtendedInfoInnerTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.OperationJobExtendedInfoInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationJobExtendedInfoInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationJobExtendedInfoInner model =
- BinaryData
- .fromString("{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"obnbdxkqpxokaj\"}")
- .toObject(OperationJobExtendedInfoInner.class);
- Assertions.assertEquals("obnbdxkqpxokaj", model.jobId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationJobExtendedInfoInner model = new OperationJobExtendedInfoInner().withJobId("obnbdxkqpxokaj");
- model = BinaryData.fromObject(model).toObject(OperationJobExtendedInfoInner.class);
- Assertions.assertEquals("obnbdxkqpxokaj", model.jobId());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResourceInnerTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResourceInnerTests.java
deleted file mode 100644
index 25b309ee2508..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResourceInnerTests.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.fluent.models.OperationResourceInner;
-import com.azure.resourcemanager.dataprotection.models.OperationExtendedInfo;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationResourceInner model =
- BinaryData
- .fromString(
- "{\"endTime\":\"2021-02-09T00:09:24Z\",\"id\":\"mexgstxgcp\",\"name\":\"gmaajrm\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-05-16T07:57:55Z\",\"status\":\"rlovmclwhijcoej\"}")
- .toObject(OperationResourceInner.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T00:09:24Z"), model.endTime());
- Assertions.assertEquals("mexgstxgcp", model.id());
- Assertions.assertEquals("gmaajrm", model.name());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T07:57:55Z"), model.startTime());
- Assertions.assertEquals("rlovmclwhijcoej", model.status());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationResourceInner model =
- new OperationResourceInner()
- .withEndTime(OffsetDateTime.parse("2021-02-09T00:09:24Z"))
- .withId("mexgstxgcp")
- .withName("gmaajrm")
- .withProperties(new OperationExtendedInfo())
- .withStartTime(OffsetDateTime.parse("2021-05-16T07:57:55Z"))
- .withStatus("rlovmclwhijcoej");
- model = BinaryData.fromObject(model).toObject(OperationResourceInner.class);
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-09T00:09:24Z"), model.endTime());
- Assertions.assertEquals("mexgstxgcp", model.id());
- Assertions.assertEquals("gmaajrm", model.name());
- Assertions.assertEquals(OffsetDateTime.parse("2021-05-16T07:57:55Z"), model.startTime());
- Assertions.assertEquals("rlovmclwhijcoej", model.status());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResultsGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResultsGetWithResponseMockTests.java
deleted file mode 100644
index 2227b1ac2f74..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationResultsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.OperationJobExtendedInfo;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationResultsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"objectType\":\"OperationJobExtendedInfo\",\"jobId\":\"itgvkx\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationJobExtendedInfo response =
- manager.operationResults().getWithResponse("qfr", "qlkzme", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("itgvkx", response.jobId());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextsGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextsGetWithResponseMockTests.java
deleted file mode 100644
index 415ee0402d1c..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusBackupVaultContextsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.OperationResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationStatusBackupVaultContextsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"endTime\":\"2021-08-06T17:28:28Z\",\"id\":\"mocwa\",\"name\":\"qgatjeaahhvjhhn\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-02-08T20:51:05Z\",\"status\":\"bjjidjksyxky\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationResource response =
- manager
- .operationStatusBackupVaultContexts()
- .getWithResponse("guxak", "sqzhzbezkg", "msidxasicddyvv", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T17:28:28Z"), response.endTime());
- Assertions.assertEquals("mocwa", response.id());
- Assertions.assertEquals("qgatjeaahhvjhhn", response.name());
- Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T20:51:05Z"), response.startTime());
- Assertions.assertEquals("bjjidjksyxky", response.status());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetWithResponseMockTests.java
deleted file mode 100644
index c8148d164ba3..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusGetWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.OperationResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationStatusGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"endTime\":\"2021-03-27T07:28:32Z\",\"id\":\"hlwigdivbkbxg\",\"name\":\"fajuwas\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-01-09T03:36:37Z\",\"status\":\"y\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationResource response =
- manager
- .operationStatus()
- .getWithResponse("zyqdrfegcealzx", "hcans", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-27T07:28:32Z"), response.endTime());
- Assertions.assertEquals("hlwigdivbkbxg", response.id());
- Assertions.assertEquals("fajuwas", response.name());
- Assertions.assertEquals(OffsetDateTime.parse("2021-01-09T03:36:37Z"), response.startTime());
- Assertions.assertEquals("y", response.status());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index a8b6a87175ee..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.dataprotection.DataProtectionManager;
-import com.azure.resourcemanager.dataprotection.models.OperationResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationStatusResourceGroupContextsGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"endTime\":\"2021-06-09T05:24:22Z\",\"id\":\"ulxunsmjbnkpp\",\"name\":\"nenlsvxeizzg\",\"properties\":{\"objectType\":\"OperationExtendedInfo\"},\"startTime\":\"2021-09-02T06:11:57Z\",\"status\":\"rmffeyc\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- DataProtectionManager manager =
- DataProtectionManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- OperationResource response =
- manager
- .operationStatusResourceGroupContexts()
- .getByResourceGroupWithResponse("vxevblb", "ednljl", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T05:24:22Z"), response.endTime());
- Assertions.assertEquals("ulxunsmjbnkpp", response.id());
- Assertions.assertEquals("nenlsvxeizzg", response.name());
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T06:11:57Z"), response.startTime());
- Assertions.assertEquals("rmffeyc", response.status());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchBackupVaultInputTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchBackupVaultInputTests.java
deleted file mode 100644
index 2e84e6e76ff9..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchBackupVaultInputTests.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
-import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput;
-import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import org.junit.jupiter.api.Assertions;
-
-public final class PatchBackupVaultInputTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PatchBackupVaultInput model =
- BinaryData
- .fromString(
- "{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Enabled\"}},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"Off\",\"retentionDurationInDays\":59.897839624628624},\"immutabilitySettings\":{\"state\":\"Unlocked\"}},\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Enabled\"}}}")
- .toObject(PatchBackupVaultInput.class);
- Assertions
- .assertEquals(
- AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(59.897839624628624D, model.securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- model.featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.ENABLED, model.featureSettings().crossRegionRestoreSettings().state());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PatchBackupVaultInput model =
- new PatchBackupVaultInput()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.ENABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.OFF)
- .withRetentionDurationInDays(59.897839624628624D))
- .withImmutabilitySettings(new ImmutabilitySettings().withState(ImmutabilityState.UNLOCKED)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings().withState(CrossSubscriptionRestoreState.ENABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.ENABLED)));
- model = BinaryData.fromObject(model).toObject(PatchBackupVaultInput.class);
- Assertions
- .assertEquals(
- AlertsState.ENABLED, model.monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions.assertEquals(SoftDeleteState.OFF, model.securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(59.897839624628624D, model.securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions.assertEquals(ImmutabilityState.UNLOCKED, model.securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- model.featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.ENABLED, model.featureSettings().crossRegionRestoreSettings().state());
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceGuardInputTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceGuardInputTests.java
deleted file mode 100644
index c08cd1be18e7..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceGuardInputTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.PatchResourceGuardInput;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class PatchResourceGuardInputTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PatchResourceGuardInput model =
- BinaryData
- .fromString("{\"tags\":{\"mrv\":\"kdwbwhkszz\",\"owtlmnguxawqald\":\"xztvbtqgsfraoyzk\"}}")
- .toObject(PatchResourceGuardInput.class);
- Assertions.assertEquals("kdwbwhkszz", model.tags().get("mrv"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PatchResourceGuardInput model =
- new PatchResourceGuardInput().withTags(mapOf("mrv", "kdwbwhkszz", "owtlmnguxawqald", "xztvbtqgsfraoyzk"));
- model = BinaryData.fromObject(model).toObject(PatchResourceGuardInput.class);
- Assertions.assertEquals("kdwbwhkszz", model.tags().get("mrv"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceRequestInputTests.java b/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceRequestInputTests.java
deleted file mode 100644
index e550e3baaf05..000000000000
--- a/sdk/dataprotection/azure-resourcemanager-dataprotection/src/test/java/com/azure/resourcemanager/dataprotection/generated/PatchResourceRequestInputTests.java
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.dataprotection.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.dataprotection.models.AlertsState;
-import com.azure.resourcemanager.dataprotection.models.AzureMonitorAlertSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossRegionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
-import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
-import com.azure.resourcemanager.dataprotection.models.DppIdentityDetails;
-import com.azure.resourcemanager.dataprotection.models.FeatureSettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilitySettings;
-import com.azure.resourcemanager.dataprotection.models.ImmutabilityState;
-import com.azure.resourcemanager.dataprotection.models.MonitoringSettings;
-import com.azure.resourcemanager.dataprotection.models.PatchBackupVaultInput;
-import com.azure.resourcemanager.dataprotection.models.PatchResourceRequestInput;
-import com.azure.resourcemanager.dataprotection.models.SecuritySettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteSettings;
-import com.azure.resourcemanager.dataprotection.models.SoftDeleteState;
-import com.azure.resourcemanager.dataprotection.models.UserAssignedIdentity;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class PatchResourceRequestInputTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PatchResourceRequestInput model =
- BinaryData
- .fromString(
- "{\"identity\":{\"principalId\":\"zaqsqsycbkbfk\",\"tenantId\":\"kdkexxp\",\"type\":\"fmxa\",\"userAssignedIdentities\":{\"gddtocj\":{\"principalId\":\"147cb136-2a60-4b06-a131-c36478985f49\",\"clientId\":\"bad0465d-c493-4571-acf2-db91e0a6d8d9\"},\"vpmouexhdzxib\":{\"principalId\":\"fa798c48-b47c-46a7-a1cb-6be53b13431e\",\"clientId\":\"d11aa6fb-e394-4b1c-8aa2-0364c6a070a1\"},\"jnxqbzvddntwn\":{\"principalId\":\"c138d274-8916-453f-bdd1-b0e35693f694\",\"clientId\":\"44478ebc-2907-4142-8991-3d0946f358ba\"},\"cbtwnpzaoqvuh\":{\"principalId\":\"1deba60b-57d2-4ea7-ab29-55811c0a2e0b\",\"clientId\":\"d02b3ab6-928d-4e8b-a8a0-cfe564603bd4\"}}},\"properties\":{\"monitoringSettings\":{\"azureMonitorAlertSettings\":{\"alertsForAllJobFailures\":\"Disabled\"}},\"securitySettings\":{\"softDeleteSettings\":{\"state\":\"AlwaysOn\",\"retentionDurationInDays\":51.7805556269055},\"immutabilitySettings\":{\"state\":\"Disabled\"}},\"featureSettings\":{\"crossSubscriptionRestoreSettings\":{\"state\":\"Enabled\"},\"crossRegionRestoreSettings\":{\"state\":\"Disabled\"}}},\"tags\":{\"wqvhkhixuigdt\":\"mqc\",\"hm\":\"pbobjo\"}}")
- .toObject(PatchResourceRequestInput.class);
- Assertions.assertEquals("fmxa", model.identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 51.7805556269055D,
- model.properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- model.properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED,
- model.properties().featureSettings().crossRegionRestoreSettings().state());
- Assertions.assertEquals("mqc", model.tags().get("wqvhkhixuigdt"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PatchResourceRequestInput model =
- new PatchResourceRequestInput()
- .withIdentity(
- new DppIdentityDetails()
- .withType("fmxa")
- .withUserAssignedIdentities(
- mapOf(
- "gddtocj",
- new UserAssignedIdentity(),
- "vpmouexhdzxib",
- new UserAssignedIdentity(),
- "jnxqbzvddntwn",
- new UserAssignedIdentity(),
- "cbtwnpzaoqvuh",
- new UserAssignedIdentity())))
- .withProperties(
- new PatchBackupVaultInput()
- .withMonitoringSettings(
- new MonitoringSettings()
- .withAzureMonitorAlertSettings(
- new AzureMonitorAlertSettings().withAlertsForAllJobFailures(AlertsState.DISABLED)))
- .withSecuritySettings(
- new SecuritySettings()
- .withSoftDeleteSettings(
- new SoftDeleteSettings()
- .withState(SoftDeleteState.ALWAYS_ON)
- .withRetentionDurationInDays(51.7805556269055D))
- .withImmutabilitySettings(
- new ImmutabilitySettings().withState(ImmutabilityState.DISABLED)))
- .withFeatureSettings(
- new FeatureSettings()
- .withCrossSubscriptionRestoreSettings(
- new CrossSubscriptionRestoreSettings()
- .withState(CrossSubscriptionRestoreState.ENABLED))
- .withCrossRegionRestoreSettings(
- new CrossRegionRestoreSettings().withState(CrossRegionRestoreState.DISABLED))))
- .withTags(mapOf("wqvhkhixuigdt", "mqc", "hm", "pbobjo"));
- model = BinaryData.fromObject(model).toObject(PatchResourceRequestInput.class);
- Assertions.assertEquals("fmxa", model.identity().type());
- Assertions
- .assertEquals(
- AlertsState.DISABLED,
- model.properties().monitoringSettings().azureMonitorAlertSettings().alertsForAllJobFailures());
- Assertions
- .assertEquals(
- SoftDeleteState.ALWAYS_ON, model.properties().securitySettings().softDeleteSettings().state());
- Assertions
- .assertEquals(
- 51.7805556269055D,
- model.properties().securitySettings().softDeleteSettings().retentionDurationInDays());
- Assertions
- .assertEquals(
- ImmutabilityState.DISABLED, model.properties().securitySettings().immutabilitySettings().state());
- Assertions
- .assertEquals(
- CrossSubscriptionRestoreState.ENABLED,
- model.properties().featureSettings().crossSubscriptionRestoreSettings().state());
- Assertions
- .assertEquals(
- CrossRegionRestoreState.DISABLED,
- model.properties().featureSettings().crossRegionRestoreSettings().state());
- Assertions.assertEquals("mqc", model.tags().get("wqvhkhixuigdt"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map