> get(
- @HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("vaultName") String vaultName,
- @PathParam("protectedItemName") String protectedItemName,
- @PathParam("operationId") String operationId,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
- }
-
- /**
- * Gets the protected item operation status.
- *
- * Tracks the results of an asynchronous operation on the protected item.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param vaultName The vault name.
- * @param protectedItemName The protected item name.
- * @param operationId The ID of an ongoing async 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 defines the operation status along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(
- String resourceGroupName, String vaultName, String protectedItemName, String operationId) {
- 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 (protectedItemName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null."));
- }
- if (operationId == null) {
- return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context ->
- service
- .get(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- vaultName,
- protectedItemName,
- operationId,
- this.client.getApiVersion(),
- accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the protected item operation status.
- *
- * Tracks the results of an asynchronous operation on the protected item.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param vaultName The vault name.
- * @param protectedItemName The protected item name.
- * @param operationId The ID of an ongoing async 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 defines the operation status along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(
- String resourceGroupName, String vaultName, String protectedItemName, String operationId, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono
- .error(
- new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (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 (protectedItemName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter protectedItemName is required and cannot be null."));
- }
- if (operationId == null) {
- return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .get(
- this.client.getEndpoint(),
- this.client.getSubscriptionId(),
- resourceGroupName,
- vaultName,
- protectedItemName,
- operationId,
- this.client.getApiVersion(),
- accept,
- context);
- }
-
- /**
- * Gets the protected item operation status.
- *
- * Tracks the results of an asynchronous operation on the protected item.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param vaultName The vault name.
- * @param protectedItemName The protected item name.
- * @param operationId The ID of an ongoing async 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 defines the operation status on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(
- String resourceGroupName, String vaultName, String protectedItemName, String operationId) {
- return getWithResponseAsync(resourceGroupName, vaultName, protectedItemName, operationId)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the protected item operation status.
- *
- * Tracks the results of an asynchronous operation on the protected item.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param vaultName The vault name.
- * @param protectedItemName The protected item name.
- * @param operationId The ID of an ongoing async 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 defines the operation status along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(
- String resourceGroupName, String vaultName, String protectedItemName, String operationId, Context context) {
- return getWithResponseAsync(resourceGroupName, vaultName, protectedItemName, operationId, context).block();
- }
-
- /**
- * Gets the protected item operation status.
- *
- * Tracks the results of an asynchronous operation on the protected item.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param vaultName The vault name.
- * @param protectedItemName The protected item name.
- * @param operationId The ID of an ongoing async 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 defines the operation status.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public OperationStatusInner get(
- String resourceGroupName, String vaultName, String protectedItemName, String operationId) {
- return getWithResponse(resourceGroupName, vaultName, protectedItemName, operationId, Context.NONE).getValue();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciEventModelCustomProperties.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciEventModelCustomProperties.java
deleted file mode 100644
index 9a56f27e75a8..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciEventModelCustomProperties.java
+++ /dev/null
@@ -1,110 +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.recoveryservicesdatareplication.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-/**
- * HyperV to AzStackHCI event model custom properties. This class provides provider specific details for events of type
- * DataContract.HealthEvents.HealthEventType.ProtectedItemHealth and
- * DataContract.HealthEvents.HealthEventType.AgentHealth.
- */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
-@JsonTypeName("HyperVToAzStackHCI")
-@Immutable
-public final class HyperVToAzStackHciEventModelCustomProperties extends EventModelCustomProperties {
- /*
- * Gets or sets the friendly name of the source which has raised this health event.
- */
- @JsonProperty(value = "eventSourceFriendlyName", access = JsonProperty.Access.WRITE_ONLY)
- private String eventSourceFriendlyName;
-
- /*
- * Gets or sets the protected item friendly name.
- */
- @JsonProperty(value = "protectedItemFriendlyName", access = JsonProperty.Access.WRITE_ONLY)
- private String protectedItemFriendlyName;
-
- /*
- * Gets or sets the source appliance name.
- */
- @JsonProperty(value = "sourceApplianceName", access = JsonProperty.Access.WRITE_ONLY)
- private String sourceApplianceName;
-
- /*
- * Gets or sets the source target name.
- */
- @JsonProperty(value = "targetApplianceName", access = JsonProperty.Access.WRITE_ONLY)
- private String targetApplianceName;
-
- /*
- * Gets or sets the server type.
- */
- @JsonProperty(value = "serverType", access = JsonProperty.Access.WRITE_ONLY)
- private String serverType;
-
- /** Creates an instance of HyperVToAzStackHciEventModelCustomProperties class. */
- public HyperVToAzStackHciEventModelCustomProperties() {
- }
-
- /**
- * Get the eventSourceFriendlyName property: Gets or sets the friendly name of the source which has raised this
- * health event.
- *
- * @return the eventSourceFriendlyName value.
- */
- public String eventSourceFriendlyName() {
- return this.eventSourceFriendlyName;
- }
-
- /**
- * Get the protectedItemFriendlyName property: Gets or sets the protected item friendly name.
- *
- * @return the protectedItemFriendlyName value.
- */
- public String protectedItemFriendlyName() {
- return this.protectedItemFriendlyName;
- }
-
- /**
- * Get the sourceApplianceName property: Gets or sets the source appliance name.
- *
- * @return the sourceApplianceName value.
- */
- public String sourceApplianceName() {
- return this.sourceApplianceName;
- }
-
- /**
- * Get the targetApplianceName property: Gets or sets the source target name.
- *
- * @return the targetApplianceName value.
- */
- public String targetApplianceName() {
- return this.targetApplianceName;
- }
-
- /**
- * Get the serverType property: Gets or sets the server type.
- *
- * @return the serverType value.
- */
- public String serverType() {
- return this.serverType;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciPlannedFailoverCustomProps.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciPlannedFailoverCustomProps.java
deleted file mode 100644
index 3de28db94f3a..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciPlannedFailoverCustomProps.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.recoveryservicesdatareplication.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-/** HyperV to AzStackHCI planned failover model custom properties. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
-@JsonTypeName("HyperVToAzStackHCI")
-@Fluent
-public final class HyperVToAzStackHciPlannedFailoverCustomProps extends PlannedFailoverModelCustomProperties {
- /*
- * Gets or sets a value indicating whether VM needs to be shut down.
- */
- @JsonProperty(value = "shutdownSourceVM", required = true)
- private boolean shutdownSourceVM;
-
- /** Creates an instance of HyperVToAzStackHciPlannedFailoverCustomProps class. */
- public HyperVToAzStackHciPlannedFailoverCustomProps() {
- }
-
- /**
- * Get the shutdownSourceVM property: Gets or sets a value indicating whether VM needs to be shut down.
- *
- * @return the shutdownSourceVM value.
- */
- public boolean shutdownSourceVM() {
- return this.shutdownSourceVM;
- }
-
- /**
- * Set the shutdownSourceVM property: Gets or sets a value indicating whether VM needs to be shut down.
- *
- * @param shutdownSourceVM the shutdownSourceVM value to set.
- * @return the HyperVToAzStackHciPlannedFailoverCustomProps object itself.
- */
- public HyperVToAzStackHciPlannedFailoverCustomProps withShutdownSourceVM(boolean shutdownSourceVM) {
- this.shutdownSourceVM = shutdownSourceVM;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciPolicyModelCustomProperties.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciPolicyModelCustomProperties.java
deleted file mode 100644
index e5bbcb9e3430..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/HyperVToAzStackHciPolicyModelCustomProperties.java
+++ /dev/null
@@ -1,118 +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.recoveryservicesdatareplication.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-/** HyperV To AzStackHCI Policy model custom properties. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
-@JsonTypeName("HyperVToAzStackHCI")
-@Fluent
-public final class HyperVToAzStackHciPolicyModelCustomProperties extends PolicyModelCustomProperties {
- /*
- * Gets or sets the duration in minutes until which the recovery points need to be
- * stored.
- */
- @JsonProperty(value = "recoveryPointHistoryInMinutes", required = true)
- private int recoveryPointHistoryInMinutes;
-
- /*
- * Gets or sets the crash consistent snapshot frequency (in minutes).
- */
- @JsonProperty(value = "crashConsistentFrequencyInMinutes", required = true)
- private int crashConsistentFrequencyInMinutes;
-
- /*
- * Gets or sets the app consistent snapshot frequency (in minutes).
- */
- @JsonProperty(value = "appConsistentFrequencyInMinutes", required = true)
- private int appConsistentFrequencyInMinutes;
-
- /** Creates an instance of HyperVToAzStackHciPolicyModelCustomProperties class. */
- public HyperVToAzStackHciPolicyModelCustomProperties() {
- }
-
- /**
- * Get the recoveryPointHistoryInMinutes property: Gets or sets the duration in minutes until which the recovery
- * points need to be stored.
- *
- * @return the recoveryPointHistoryInMinutes value.
- */
- public int recoveryPointHistoryInMinutes() {
- return this.recoveryPointHistoryInMinutes;
- }
-
- /**
- * Set the recoveryPointHistoryInMinutes property: Gets or sets the duration in minutes until which the recovery
- * points need to be stored.
- *
- * @param recoveryPointHistoryInMinutes the recoveryPointHistoryInMinutes value to set.
- * @return the HyperVToAzStackHciPolicyModelCustomProperties object itself.
- */
- public HyperVToAzStackHciPolicyModelCustomProperties withRecoveryPointHistoryInMinutes(
- int recoveryPointHistoryInMinutes) {
- this.recoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes;
- return this;
- }
-
- /**
- * Get the crashConsistentFrequencyInMinutes property: Gets or sets the crash consistent snapshot frequency (in
- * minutes).
- *
- * @return the crashConsistentFrequencyInMinutes value.
- */
- public int crashConsistentFrequencyInMinutes() {
- return this.crashConsistentFrequencyInMinutes;
- }
-
- /**
- * Set the crashConsistentFrequencyInMinutes property: Gets or sets the crash consistent snapshot frequency (in
- * minutes).
- *
- * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set.
- * @return the HyperVToAzStackHciPolicyModelCustomProperties object itself.
- */
- public HyperVToAzStackHciPolicyModelCustomProperties withCrashConsistentFrequencyInMinutes(
- int crashConsistentFrequencyInMinutes) {
- this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes;
- return this;
- }
-
- /**
- * Get the appConsistentFrequencyInMinutes property: Gets or sets the app consistent snapshot frequency (in
- * minutes).
- *
- * @return the appConsistentFrequencyInMinutes value.
- */
- public int appConsistentFrequencyInMinutes() {
- return this.appConsistentFrequencyInMinutes;
- }
-
- /**
- * Set the appConsistentFrequencyInMinutes property: Gets or sets the app consistent snapshot frequency (in
- * minutes).
- *
- * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set.
- * @return the HyperVToAzStackHciPolicyModelCustomProperties object itself.
- */
- public HyperVToAzStackHciPolicyModelCustomProperties withAppConsistentFrequencyInMinutes(
- int appConsistentFrequencyInMinutes) {
- this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/ProtectedItemModelPropertiesLastTestFailoverJob.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/ProtectedItemModelPropertiesLastTestFailoverJob.java
deleted file mode 100644
index 8d5fedc7179d..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/ProtectedItemModelPropertiesLastTestFailoverJob.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.recoveryservicesdatareplication.models;
-
-import com.azure.core.annotation.Immutable;
-
-/** The ProtectedItemModelPropertiesLastTestFailoverJob model. */
-@Immutable
-public final class ProtectedItemModelPropertiesLastTestFailoverJob extends ProtectedItemJobProperties {
- /** Creates an instance of ProtectedItemModelPropertiesLastTestFailoverJob class. */
- public ProtectedItemModelPropertiesLastTestFailoverJob() {
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/TestFailoverCleanupWorkflowModelCustomProperties.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/TestFailoverCleanupWorkflowModelCustomProperties.java
deleted file mode 100644
index 48b859e77c80..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/TestFailoverCleanupWorkflowModelCustomProperties.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.recoveryservicesdatareplication.models;
-
-import com.azure.core.annotation.Immutable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-/** Test failover cleanup workflow model custom properties. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
-@JsonTypeName("TestFailoverCleanupWorkflowDetails")
-@Immutable
-public final class TestFailoverCleanupWorkflowModelCustomProperties extends WorkflowModelCustomProperties {
- /*
- * Gets or sets the test failover cleanup comments.
- */
- @JsonProperty(value = "comments", access = JsonProperty.Access.WRITE_ONLY)
- private String comments;
-
- /** Creates an instance of TestFailoverCleanupWorkflowModelCustomProperties class. */
- public TestFailoverCleanupWorkflowModelCustomProperties() {
- }
-
- /**
- * Get the comments property: Gets or sets the test failover cleanup comments.
- *
- * @return the comments value.
- */
- public String comments() {
- return this.comments;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/VMwareToAzStackHciPlannedFailoverCustomProps.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/VMwareToAzStackHciPlannedFailoverCustomProps.java
deleted file mode 100644
index 81d3bc78ba68..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/VMwareToAzStackHciPlannedFailoverCustomProps.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.recoveryservicesdatareplication.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-/** VMware to AzStackHCI planned failover model custom properties. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
-@JsonTypeName("VMwareToAzStackHCI")
-@Fluent
-public final class VMwareToAzStackHciPlannedFailoverCustomProps extends PlannedFailoverModelCustomProperties {
- /*
- * Gets or sets a value indicating whether VM needs to be shut down.
- */
- @JsonProperty(value = "shutdownSourceVM", required = true)
- private boolean shutdownSourceVM;
-
- /** Creates an instance of VMwareToAzStackHciPlannedFailoverCustomProps class. */
- public VMwareToAzStackHciPlannedFailoverCustomProps() {
- }
-
- /**
- * Get the shutdownSourceVM property: Gets or sets a value indicating whether VM needs to be shut down.
- *
- * @return the shutdownSourceVM value.
- */
- public boolean shutdownSourceVM() {
- return this.shutdownSourceVM;
- }
-
- /**
- * Set the shutdownSourceVM property: Gets or sets a value indicating whether VM needs to be shut down.
- *
- * @param shutdownSourceVM the shutdownSourceVM value to set.
- * @return the VMwareToAzStackHciPlannedFailoverCustomProps object itself.
- */
- public VMwareToAzStackHciPlannedFailoverCustomProps withShutdownSourceVM(boolean shutdownSourceVM) {
- this.shutdownSourceVM = shutdownSourceVM;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/VMwareToAzStackHciPolicyModelCustomProperties.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/VMwareToAzStackHciPolicyModelCustomProperties.java
deleted file mode 100644
index 3e43cfb5aa57..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/main/java/com/azure/resourcemanager/recoveryservicesdatareplication/models/VMwareToAzStackHciPolicyModelCustomProperties.java
+++ /dev/null
@@ -1,118 +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.recoveryservicesdatareplication.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-
-/** VMware To AzStackHCI Policy model custom properties. */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
-@JsonTypeName("VMwareToAzStackHCI")
-@Fluent
-public final class VMwareToAzStackHciPolicyModelCustomProperties extends PolicyModelCustomProperties {
- /*
- * Gets or sets the duration in minutes until which the recovery points need to be
- * stored.
- */
- @JsonProperty(value = "recoveryPointHistoryInMinutes", required = true)
- private int recoveryPointHistoryInMinutes;
-
- /*
- * Gets or sets the crash consistent snapshot frequency (in minutes).
- */
- @JsonProperty(value = "crashConsistentFrequencyInMinutes", required = true)
- private int crashConsistentFrequencyInMinutes;
-
- /*
- * Gets or sets the app consistent snapshot frequency (in minutes).
- */
- @JsonProperty(value = "appConsistentFrequencyInMinutes", required = true)
- private int appConsistentFrequencyInMinutes;
-
- /** Creates an instance of VMwareToAzStackHciPolicyModelCustomProperties class. */
- public VMwareToAzStackHciPolicyModelCustomProperties() {
- }
-
- /**
- * Get the recoveryPointHistoryInMinutes property: Gets or sets the duration in minutes until which the recovery
- * points need to be stored.
- *
- * @return the recoveryPointHistoryInMinutes value.
- */
- public int recoveryPointHistoryInMinutes() {
- return this.recoveryPointHistoryInMinutes;
- }
-
- /**
- * Set the recoveryPointHistoryInMinutes property: Gets or sets the duration in minutes until which the recovery
- * points need to be stored.
- *
- * @param recoveryPointHistoryInMinutes the recoveryPointHistoryInMinutes value to set.
- * @return the VMwareToAzStackHciPolicyModelCustomProperties object itself.
- */
- public VMwareToAzStackHciPolicyModelCustomProperties withRecoveryPointHistoryInMinutes(
- int recoveryPointHistoryInMinutes) {
- this.recoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes;
- return this;
- }
-
- /**
- * Get the crashConsistentFrequencyInMinutes property: Gets or sets the crash consistent snapshot frequency (in
- * minutes).
- *
- * @return the crashConsistentFrequencyInMinutes value.
- */
- public int crashConsistentFrequencyInMinutes() {
- return this.crashConsistentFrequencyInMinutes;
- }
-
- /**
- * Set the crashConsistentFrequencyInMinutes property: Gets or sets the crash consistent snapshot frequency (in
- * minutes).
- *
- * @param crashConsistentFrequencyInMinutes the crashConsistentFrequencyInMinutes value to set.
- * @return the VMwareToAzStackHciPolicyModelCustomProperties object itself.
- */
- public VMwareToAzStackHciPolicyModelCustomProperties withCrashConsistentFrequencyInMinutes(
- int crashConsistentFrequencyInMinutes) {
- this.crashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes;
- return this;
- }
-
- /**
- * Get the appConsistentFrequencyInMinutes property: Gets or sets the app consistent snapshot frequency (in
- * minutes).
- *
- * @return the appConsistentFrequencyInMinutes value.
- */
- public int appConsistentFrequencyInMinutes() {
- return this.appConsistentFrequencyInMinutes;
- }
-
- /**
- * Set the appConsistentFrequencyInMinutes property: Gets or sets the app consistent snapshot frequency (in
- * minutes).
- *
- * @param appConsistentFrequencyInMinutes the appConsistentFrequencyInMinutes value to set.
- * @return the VMwareToAzStackHciPolicyModelCustomProperties object itself.
- */
- public VMwareToAzStackHciPolicyModelCustomProperties withAppConsistentFrequencyInMinutes(
- int appConsistentFrequencyInMinutes) {
- this.appConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ProtectedItemOperationStatusGetSamples.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ProtectedItemOperationStatusGetSamples.java
deleted file mode 100644
index 89aa4411f5ca..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ProtectedItemOperationStatusGetSamples.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.recoveryservicesdatareplication.generated;
-
-/** Samples for ProtectedItemOperationStatus Get. */
-public final class ProtectedItemOperationStatusGetSamples {
- /*
- * x-ms-original-file: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/ProtectedItemOperationStatus_Get.json
- */
- /**
- * Sample code: ProtectedItemOperationStatus_Get.
- *
- * @param manager Entry point to RecoveryServicesDataReplicationManager.
- */
- public static void protectedItemOperationStatusGet(
- com.azure.resourcemanager.recoveryservicesdatareplication.RecoveryServicesDataReplicationManager manager) {
- manager
- .protectedItemOperationStatus()
- .getWithResponse(
- "rgrecoveryservicesdatareplication", "4", "d", "wdqacsc", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ResourceProviderCheckNameAvailabilityS.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ResourceProviderCheckNameAvailabilityS.java
deleted file mode 100644
index 9dcb06d01810..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ResourceProviderCheckNameAvailabilityS.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.recoveryservicesdatareplication.generated;
-
-import com.azure.resourcemanager.recoveryservicesdatareplication.models.CheckNameAvailabilityModel;
-
-/** Samples for ResourceProvider CheckNameAvailability. */
-public final class ResourceProviderCheckNameAvailabilityS {
- /*
- * x-ms-original-file: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/CheckNameAvailability.json
- */
- /**
- * Sample code: CheckNameAvailability.
- *
- * @param manager Entry point to RecoveryServicesDataReplicationManager.
- */
- public static void checkNameAvailability(
- com.azure.resourcemanager.recoveryservicesdatareplication.RecoveryServicesDataReplicationManager manager) {
- manager
- .resourceProviders()
- .checkNameAvailabilityWithResponse(
- "trfqtbtmusswpibw",
- new CheckNameAvailabilityModel().withName("updkdcixs").withType("gngmcancdauwhdixjjvqnfkvqc"),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ResourceProviderDeploymentPreflightSam.java b/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ResourceProviderDeploymentPreflightSam.java
deleted file mode 100644
index ef57b8b94b1d..000000000000
--- a/sdk/recoveryservicesdatareplication/azure-resourcemanager-recoveryservicesdatareplication/src/samples/java/com/azure/resourcemanager/recoveryservicesdatareplication/generated/ResourceProviderDeploymentPreflightSam.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.recoveryservicesdatareplication.generated;
-
-import com.azure.resourcemanager.recoveryservicesdatareplication.fluent.models.DeploymentPreflightModelInner;
-import com.azure.resourcemanager.recoveryservicesdatareplication.models.DeploymentPreflightResource;
-import java.util.Arrays;
-
-/** Samples for ResourceProvider DeploymentPreflight. */
-public final class ResourceProviderDeploymentPreflightSam {
- /*
- * x-ms-original-file: specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/examples/DeploymentPreflight.json
- */
- /**
- * Sample code: DeploymentPreflight.
- *
- * @param manager Entry point to RecoveryServicesDataReplicationManager.
- */
- public static void deploymentPreflight(
- com.azure.resourcemanager.recoveryservicesdatareplication.RecoveryServicesDataReplicationManager manager) {
- manager
- .resourceProviders()
- .deploymentPreflightWithResponse(
- "rgrecoveryservicesdatareplication",
- "kjoiahxljomjcmvabaobumg",
- new DeploymentPreflightModelInner()
- .withResources(
- Arrays
- .asList(
- new DeploymentPreflightResource()
- .withName("xtgugoflfc")
- .withType("nsnaptduolqcxsikrewvgjbxqpt")
- .withLocation("cbsgtxkjdzwbyp")
- .withApiVersion("otihymhvzblycdoxo"))),
- com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsClientImpl.java
deleted file mode 100644
index 77f23d6e09ad..000000000000
--- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationEligibilityResultsOperationsClientImpl.java
+++ /dev/null
@@ -1,348 +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.recoveryservicessiterecovery.implementation;
-
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationEligibilityResultsOperationsClient;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsCollectionInner;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ReplicationEligibilityResultsInner;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in
- * ReplicationEligibilityResultsOperationsClient.
- */
-public final class ReplicationEligibilityResultsOperationsClientImpl
- implements ReplicationEligibilityResultsOperationsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final ReplicationEligibilityResultsOperationsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final SiteRecoveryManagementClientImpl client;
-
- /**
- * Initializes an instance of ReplicationEligibilityResultsOperationsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- ReplicationEligibilityResultsOperationsClientImpl(SiteRecoveryManagementClientImpl client) {
- this.service = RestProxy.create(ReplicationEligibilityResultsOperationsService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for SiteRecoveryManagementClientReplicationEligibilityResultsOperations
- * to be used by the proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "SiteRecoveryManageme")
- public interface ReplicationEligibilityResultsOperationsService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults")
- @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("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default")
- @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("virtualMachineName") String virtualMachineName, @HeaderParam("Accept") String accept,
- Context context);
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication eligibility results collection response model along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(String resourceGroupName,
- String virtualMachineName) {
- 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 (virtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
- resourceGroupName, this.client.getSubscriptionId(), virtualMachineName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @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 replication eligibility results collection response model along with {@link Response} on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listWithResponseAsync(String resourceGroupName,
- String virtualMachineName, 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 (virtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName,
- this.client.getSubscriptionId(), virtualMachineName, accept, context);
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication eligibility results collection response model on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listAsync(String resourceGroupName,
- String virtualMachineName) {
- return listWithResponseAsync(resourceGroupName, virtualMachineName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @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 replication eligibility results collection response model along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response listWithResponse(String resourceGroupName,
- String virtualMachineName, Context context) {
- return listWithResponseAsync(resourceGroupName, virtualMachineName, context).block();
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication eligibility results collection response model.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ReplicationEligibilityResultsCollectionInner list(String resourceGroupName, String virtualMachineName) {
- return listWithResponse(resourceGroupName, virtualMachineName, Context.NONE).getValue();
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication eligibility results response model along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName,
- String virtualMachineName) {
- 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 (virtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
- resourceGroupName, this.client.getSubscriptionId(), virtualMachineName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @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 replication eligibility results response model along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceGroupName,
- String virtualMachineName, 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 (virtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter virtualMachineName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceGroupName,
- this.client.getSubscriptionId(), virtualMachineName, accept, context);
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication eligibility results response model on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceGroupName, String virtualMachineName) {
- return getWithResponseAsync(resourceGroupName, virtualMachineName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @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 replication eligibility results response model along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String resourceGroupName,
- String virtualMachineName, Context context) {
- return getWithResponseAsync(resourceGroupName, virtualMachineName, context).block();
- }
-
- /**
- * Gets the validation errors in case the VM is unsuitable for protection.
- *
- * Validates whether a given VM can be protected or not in which case returns list of errors.
- *
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param virtualMachineName Virtual Machine name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return replication eligibility results response model.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ReplicationEligibilityResultsInner get(String resourceGroupName, String virtualMachineName) {
- return getWithResponse(resourceGroupName, virtualMachineName, Context.NONE).getValue();
- }
-}
diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsClientImpl.java
deleted file mode 100644
index 33944151acd5..000000000000
--- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationProtectionContainerMappingsClientImpl.java
+++ /dev/null
@@ -1,2039 +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.recoveryservicessiterecovery.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.Delete;
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.Patch;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
-import com.azure.core.annotation.Put;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.management.polling.PollResult;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.core.util.polling.SyncPoller;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationProtectionContainerMappingsClient;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.ProtectionContainerMappingInner;
-import com.azure.resourcemanager.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInput;
-import com.azure.resourcemanager.recoveryservicessiterecovery.models.ProtectionContainerMappingCollection;
-import com.azure.resourcemanager.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput;
-import com.azure.resourcemanager.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInput;
-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
- * ReplicationProtectionContainerMappingsClient.
- */
-public final class ReplicationProtectionContainerMappingsClientImpl
- implements ReplicationProtectionContainerMappingsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final ReplicationProtectionContainerMappingsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final SiteRecoveryManagementClientImpl client;
-
- /**
- * Initializes an instance of ReplicationProtectionContainerMappingsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- ReplicationProtectionContainerMappingsClientImpl(SiteRecoveryManagementClientImpl client) {
- this.service = RestProxy.create(ReplicationProtectionContainerMappingsService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for SiteRecoveryManagementClientReplicationProtectionContainerMappings
- * to be used by the proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "SiteRecoveryManageme")
- public interface ReplicationProtectionContainerMappingsService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByReplicationProtectionContainers(
- @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
- @PathParam("resourceName") String resourceName, @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("protectionContainerName") String protectionContainerName, @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("protectionContainerName") String protectionContainerName,
- @PathParam("mappingName") String mappingName, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> create(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("protectionContainerName") String protectionContainerName,
- @PathParam("mappingName") String mappingName,
- @BodyParam("application/json") CreateProtectionContainerMappingInput creationInput,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}")
- @ExpectedResponses({ 202, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> purge(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("protectionContainerName") String protectionContainerName,
- @PathParam("mappingName") String mappingName, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> update(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("protectionContainerName") String protectionContainerName,
- @PathParam("mappingName") String mappingName,
- @BodyParam("application/json") UpdateProtectionContainerMappingInput updateInput,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove")
- @ExpectedResponses({ 202, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("protectionContainerName") String protectionContainerName,
- @PathParam("mappingName") String mappingName,
- @BodyParam("application/json") RemoveProtectionContainerMappingInput removalInput, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationProtectionContainerMappings")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByReplicationProtectionContainersNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Gets the list of protection container mappings for a protection container.
- *
- * Lists the protection container mappings for a protection container.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByReplicationProtectionContainersSinglePageAsync(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listByReplicationProtectionContainers(this.client.getEndpoint(),
- this.client.getApiVersion(), resourceName, resourceGroupName, this.client.getSubscriptionId(),
- fabricName, protectionContainerName, accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the list of protection container mappings for a protection container.
- *
- * Lists the protection container mappings for a protection container.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @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 protection container mapping collection class along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByReplicationProtectionContainersSinglePageAsync(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByReplicationProtectionContainers(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, accept,
- context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Gets the list of protection container mappings for a protection container.
- *
- * Lists the protection container mappings for a protection container.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByReplicationProtectionContainersAsync(String resourceName,
- String resourceGroupName, String fabricName, String protectionContainerName) {
- return new PagedFlux<>(
- () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName),
- nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink));
- }
-
- /**
- * Gets the list of protection container mappings for a protection container.
- *
- * Lists the protection container mappings for a protection container.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @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 protection container mapping collection class as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByReplicationProtectionContainersAsync(String resourceName,
- String resourceGroupName, String fabricName, String protectionContainerName, Context context) {
- return new PagedFlux<>(
- () -> listByReplicationProtectionContainersSinglePageAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, context),
- nextLink -> listByReplicationProtectionContainersNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Gets the list of protection container mappings for a protection container.
- *
- * Lists the protection container mappings for a protection container.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByReplicationProtectionContainers(String resourceName,
- String resourceGroupName, String fabricName, String protectionContainerName) {
- return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName,
- fabricName, protectionContainerName));
- }
-
- /**
- * Gets the list of protection container mappings for a protection container.
- *
- * Lists the protection container mappings for a protection container.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @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 protection container mapping collection class as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByReplicationProtectionContainers(String resourceName,
- String resourceGroupName, String fabricName, String protectionContainerName, Context context) {
- return new PagedIterable<>(listByReplicationProtectionContainersAsync(resourceName, resourceGroupName,
- fabricName, protectionContainerName, context));
- }
-
- /**
- * Gets a protection container mapping.
- *
- * Gets the details of a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection Container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 details of a protection container mapping along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceName,
- String resourceGroupName, String fabricName, String protectionContainerName, String mappingName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName,
- accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets a protection container mapping.
- *
- * Gets the details of a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection Container mapping name.
- * @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 details of a protection container mapping along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceName,
- String resourceGroupName, String fabricName, String protectionContainerName, String mappingName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, accept, context);
- }
-
- /**
- * Gets a protection container mapping.
- *
- * Gets the details of a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection Container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 details of a protection container mapping on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName) {
- return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets a protection container mapping.
- *
- * Gets the details of a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection Container mapping name.
- * @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 details of a protection container mapping along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName, Context context) {
- return getWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- context).block();
- }
-
- /**
- * Gets a protection container mapping.
- *
- * Gets the details of a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection Container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 details of a protection container mapping.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ProtectionContainerMappingInner get(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName) {
- return getWithResponse(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- Context.NONE).getValue();
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping object along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- CreateProtectionContainerMappingInput creationInput) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- if (creationInput == null) {
- return Mono.error(new IllegalArgumentException("Parameter creationInput is required and cannot be null."));
- } else {
- creationInput.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName,
- creationInput, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @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 protection container mapping object along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- CreateProtectionContainerMappingInput creationInput, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- if (creationInput == null) {
- return Mono.error(new IllegalArgumentException("Parameter creationInput is required and cannot be null."));
- } else {
- creationInput.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, creationInput, accept,
- context);
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ProtectionContainerMappingInner> beginCreateAsync(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, CreateProtectionContainerMappingInput creationInput) {
- Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, mappingName, creationInput);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class,
- this.client.getContext());
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ProtectionContainerMappingInner> beginCreateAsync(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, CreateProtectionContainerMappingInput creationInput, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, mappingName, creationInput, context);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class,
- context);
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ProtectionContainerMappingInner> beginCreate(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, CreateProtectionContainerMappingInput creationInput) {
- return this.beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- creationInput).getSyncPoller();
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ProtectionContainerMappingInner> beginCreate(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, CreateProtectionContainerMappingInput creationInput, Context context) {
- return this.beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- creationInput, context).getSyncPoller();
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping object on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- CreateProtectionContainerMappingInput creationInput) {
- return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- creationInput).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @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 protection container mapping object on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- CreateProtectionContainerMappingInput creationInput, Context context) {
- return beginCreateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- creationInput, context).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ProtectionContainerMappingInner create(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName, CreateProtectionContainerMappingInput creationInput) {
- return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- creationInput).block();
- }
-
- /**
- * Create protection container mapping.
- *
- * The operation to create a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param creationInput Mapping creation input.
- * @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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ProtectionContainerMappingInner create(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName, CreateProtectionContainerMappingInput creationInput,
- Context context) {
- return createAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- creationInput, context).block();
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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>> purgeWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- return FluxUtil
- .withContext(context -> service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @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>> purgeWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- context = this.client.mergeContext(context);
- return service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, context);
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginPurgeAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName) {
- Mono>> mono
- = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @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> beginPurgeAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, mappingName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginPurge(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName) {
- return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName)
- .getSyncPoller();
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @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> beginPurge(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName, Context context) {
- return this
- .beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, context)
- .getSyncPoller();
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 purgeAsync(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName) {
- return beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @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 purgeAsync(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName, Context context) {
- return beginPurgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- context).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName) {
- purgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName).block();
- }
-
- /**
- * Purge protection container mapping.
- *
- * The operation to purge(force delete) a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @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 purge(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, Context context) {
- purgeAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, context).block();
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping object along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- UpdateProtectionContainerMappingInput updateInput) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- if (updateInput == null) {
- return Mono.error(new IllegalArgumentException("Parameter updateInput is required and cannot be null."));
- } else {
- updateInput.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName,
- updateInput, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @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 protection container mapping object along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- UpdateProtectionContainerMappingInput updateInput, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- if (updateInput == null) {
- return Mono.error(new IllegalArgumentException("Parameter updateInput is required and cannot be null."));
- } else {
- updateInput.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, updateInput, accept,
- context);
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ProtectionContainerMappingInner> beginUpdateAsync(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, UpdateProtectionContainerMappingInput updateInput) {
- Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, mappingName, updateInput);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class,
- this.client.getContext());
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ProtectionContainerMappingInner> beginUpdateAsync(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, UpdateProtectionContainerMappingInput updateInput, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = updateWithResponseAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, mappingName, updateInput, context);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), ProtectionContainerMappingInner.class, ProtectionContainerMappingInner.class,
- context);
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ProtectionContainerMappingInner> beginUpdate(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, UpdateProtectionContainerMappingInput updateInput) {
- return this.beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- updateInput).getSyncPoller();
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ProtectionContainerMappingInner> beginUpdate(
- String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, UpdateProtectionContainerMappingInput updateInput, Context context) {
- return this.beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- updateInput, context).getSyncPoller();
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping object on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- UpdateProtectionContainerMappingInput updateInput) {
- return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- updateInput).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @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 protection container mapping object on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- UpdateProtectionContainerMappingInput updateInput, Context context) {
- return beginUpdateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- updateInput, context).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ProtectionContainerMappingInner update(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName, UpdateProtectionContainerMappingInput updateInput) {
- return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- updateInput).block();
- }
-
- /**
- * Update protection container mapping.
- *
- * The operation to update protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param updateInput Mapping update input.
- * @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 protection container mapping object.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ProtectionContainerMappingInner update(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName, UpdateProtectionContainerMappingInput updateInput,
- Context context) {
- return updateAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- updateInput, context).block();
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- RemoveProtectionContainerMappingInput removalInput) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- if (removalInput == null) {
- return Mono.error(new IllegalArgumentException("Parameter removalInput is required and cannot be null."));
- } else {
- removalInput.validate();
- }
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName,
- removalInput, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- RemoveProtectionContainerMappingInput removalInput, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (protectionContainerName == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter protectionContainerName is required and cannot be null."));
- }
- if (mappingName == null) {
- return Mono.error(new IllegalArgumentException("Parameter mappingName is required and cannot be null."));
- }
- if (removalInput == null) {
- return Mono.error(new IllegalArgumentException("Parameter removalInput is required and cannot be null."));
- } else {
- removalInput.validate();
- }
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, protectionContainerName, mappingName, removalInput, context);
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginDeleteAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- RemoveProtectionContainerMappingInput removalInput) {
- Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, mappingName, removalInput);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @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> beginDeleteAsync(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- RemoveProtectionContainerMappingInput removalInput, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName,
- protectionContainerName, mappingName, removalInput, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginDelete(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- RemoveProtectionContainerMappingInput removalInput) {
- return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- removalInput).getSyncPoller();
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @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> beginDelete(String resourceName, String resourceGroupName,
- String fabricName, String protectionContainerName, String mappingName,
- RemoveProtectionContainerMappingInput removalInput, Context context) {
- return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- removalInput, context).getSyncPoller();
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInput removalInput) {
- return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- removalInput).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @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 deleteAsync(String resourceName, String resourceGroupName, String fabricName,
- String protectionContainerName, String mappingName, RemoveProtectionContainerMappingInput removalInput,
- Context context) {
- return beginDeleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName,
- removalInput, context).last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, RemoveProtectionContainerMappingInput removalInput) {
- deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput)
- .block();
- }
-
- /**
- * Remove protection container mapping.
- *
- * The operation to delete or remove a protection container mapping.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param protectionContainerName Protection container name.
- * @param mappingName Protection container mapping name.
- * @param removalInput Removal input.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceName, String resourceGroupName, String fabricName, String protectionContainerName,
- String mappingName, RemoveProtectionContainerMappingInput removalInput, Context context) {
- deleteAsync(resourceName, resourceGroupName, fabricName, protectionContainerName, mappingName, removalInput,
- context).block();
- }
-
- /**
- * Gets the list of all protection container mappings in a vault.
- *
- * Lists the protection container mappings in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceName,
- String resourceGroupName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the list of all protection container mappings in a vault.
- *
- * Lists the protection container mappings in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceName,
- String resourceGroupName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Gets the list of all protection container mappings in a vault.
- *
- * Lists the protection container mappings in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceName, String resourceGroupName) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName),
- nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Gets the list of all protection container mappings in a vault.
- *
- * Lists the protection container mappings in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceName, String resourceGroupName,
- Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Gets the list of all protection container mappings in a vault.
- *
- * Lists the protection container mappings in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceName, String resourceGroupName) {
- return new PagedIterable<>(listAsync(resourceName, resourceGroupName));
- }
-
- /**
- * Gets the list of all protection container mappings in a vault.
- *
- * Lists the protection container mappings in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return protection container mapping collection class as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceName, String resourceGroupName,
- Context context) {
- return new PagedIterable<>(listAsync(resourceName, resourceGroupName, 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 protection container mapping collection class along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByReplicationProtectionContainersNextSinglePageAsync(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.listByReplicationProtectionContainersNext(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 protection container mapping collection class along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByReplicationProtectionContainersNextSinglePageAsync(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.listByReplicationProtectionContainersNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items
- *
- * 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 protection container mapping collection class 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 protection container mapping collection class 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/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersClientImpl.java
deleted file mode 100644
index fb35a8fad6c2..000000000000
--- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/ReplicationRecoveryServicesProvidersClientImpl.java
+++ /dev/null
@@ -1,1859 +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.recoveryservicessiterecovery.implementation;
-
-import com.azure.core.annotation.BodyParam;
-import com.azure.core.annotation.Delete;
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.Post;
-import com.azure.core.annotation.Put;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.PagedFlux;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.http.rest.PagedResponse;
-import com.azure.core.http.rest.PagedResponseBase;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.management.polling.PollResult;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.core.util.polling.SyncPoller;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.ReplicationRecoveryServicesProvidersClient;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.RecoveryServicesProviderInner;
-import com.azure.resourcemanager.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInput;
-import com.azure.resourcemanager.recoveryservicessiterecovery.models.RecoveryServicesProviderCollection;
-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
- * ReplicationRecoveryServicesProvidersClient.
- */
-public final class ReplicationRecoveryServicesProvidersClientImpl
- implements ReplicationRecoveryServicesProvidersClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final ReplicationRecoveryServicesProvidersService service;
-
- /**
- * The service client containing this operation class.
- */
- private final SiteRecoveryManagementClientImpl client;
-
- /**
- * Initializes an instance of ReplicationRecoveryServicesProvidersClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- ReplicationRecoveryServicesProvidersClientImpl(SiteRecoveryManagementClientImpl client) {
- this.service = RestProxy.create(ReplicationRecoveryServicesProvidersService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for SiteRecoveryManagementClientReplicationRecoveryServicesProviders to
- * be used by the proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "SiteRecoveryManageme")
- public interface ReplicationRecoveryServicesProvidersService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByReplicationFabrics(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("providerName") String providerName, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> create(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("providerName") String providerName,
- @BodyParam("application/json") AddRecoveryServicesProviderInput addProviderInput,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}")
- @ExpectedResponses({ 202, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> purge(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("providerName") String providerName, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/refreshProvider")
- @ExpectedResponses({ 200, 202 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> refreshProvider(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("providerName") String providerName, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders/{providerName}/remove")
- @ExpectedResponses({ 202, 204 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @PathParam("fabricName") String fabricName,
- @PathParam("providerName") String providerName, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryServicesProviders")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByReplicationFabricsNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
-
- @Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Gets the list of registered recovery services providers for the fabric.
- *
- * Lists the registered recovery services providers for the specified fabric.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByReplicationFabricsSinglePageAsync(String resourceName, String resourceGroupName, String fabricName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(),
- resourceName, resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the list of registered recovery services providers for the fabric.
- *
- * Lists the registered recovery services providers for the specified fabric.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @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 collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByReplicationFabricsSinglePageAsync(
- String resourceName, String resourceGroupName, String fabricName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByReplicationFabrics(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Gets the list of registered recovery services providers for the fabric.
- *
- * Lists the registered recovery services providers for the specified fabric.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByReplicationFabricsAsync(String resourceName,
- String resourceGroupName, String fabricName) {
- return new PagedFlux<>(
- () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName),
- nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink));
- }
-
- /**
- * Gets the list of registered recovery services providers for the fabric.
- *
- * Lists the registered recovery services providers for the specified fabric.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @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 collection of providers as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByReplicationFabricsAsync(String resourceName,
- String resourceGroupName, String fabricName, Context context) {
- return new PagedFlux<>(
- () -> listByReplicationFabricsSinglePageAsync(resourceName, resourceGroupName, fabricName, context),
- nextLink -> listByReplicationFabricsNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Gets the list of registered recovery services providers for the fabric.
- *
- * Lists the registered recovery services providers for the specified fabric.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByReplicationFabrics(String resourceName,
- String resourceGroupName, String fabricName) {
- return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName));
- }
-
- /**
- * Gets the list of registered recovery services providers for the fabric.
- *
- * Lists the registered recovery services providers for the specified fabric.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @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 collection of providers as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByReplicationFabrics(String resourceName,
- String resourceGroupName, String fabricName, Context context) {
- return new PagedIterable<>(listByReplicationFabricsAsync(resourceName, resourceGroupName, fabricName, context));
- }
-
- /**
- * Gets the details of a recovery services provider.
- *
- * Gets the details of registered recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 details of registered recovery services provider along with {@link Response} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceName,
- String resourceGroupName, String fabricName, String providerName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the details of a recovery services provider.
- *
- * Gets the details of registered recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 details of registered recovery services provider along with {@link Response} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceName,
- String resourceGroupName, String fabricName, String providerName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, providerName, accept, context);
- }
-
- /**
- * Gets the details of a recovery services provider.
- *
- * Gets the details of registered recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 details of registered recovery services provider on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- return getWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the details of a recovery services provider.
- *
- * Gets the details of registered recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 details of registered recovery services provider along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- return getWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context).block();
- }
-
- /**
- * Gets the details of a recovery services provider.
- *
- * Gets the details of registered recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 details of registered recovery services provider.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RecoveryServicesProviderInner get(String resourceName, String resourceGroupName, String fabricName,
- String providerName) {
- return getWithResponse(resourceName, resourceGroupName, fabricName, providerName, Context.NONE).getValue();
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return provider details along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- if (addProviderInput == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter addProviderInput is required and cannot be null."));
- } else {
- addProviderInput.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, addProviderInput, accept,
- context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @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 provider details along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- if (addProviderInput == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter addProviderInput is required and cannot be null."));
- } else {
- addProviderInput.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, providerName, addProviderInput, accept, context);
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RecoveryServicesProviderInner> beginCreateAsync(
- String resourceName, String resourceGroupName, String fabricName, String providerName,
- AddRecoveryServicesProviderInput addProviderInput) {
- Mono>> mono
- = createWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class,
- this.client.getContext());
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RecoveryServicesProviderInner> beginCreateAsync(
- String resourceName, String resourceGroupName, String fabricName, String providerName,
- AddRecoveryServicesProviderInput addProviderInput, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = createWithResponseAsync(resourceName, resourceGroupName, fabricName,
- providerName, addProviderInput, context);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class,
- context);
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RecoveryServicesProviderInner> beginCreate(
- String resourceName, String resourceGroupName, String fabricName, String providerName,
- AddRecoveryServicesProviderInput addProviderInput) {
- return this.beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput)
- .getSyncPoller();
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RecoveryServicesProviderInner> beginCreate(
- String resourceName, String resourceGroupName, String fabricName, String providerName,
- AddRecoveryServicesProviderInput addProviderInput, Context context) {
- return this
- .beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput, context)
- .getSyncPoller();
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return provider details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput) {
- return beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @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 provider details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, AddRecoveryServicesProviderInput addProviderInput, Context context) {
- return beginCreateAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput, context)
- .last().flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return provider details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RecoveryServicesProviderInner create(String resourceName, String resourceGroupName, String fabricName,
- String providerName, AddRecoveryServicesProviderInput addProviderInput) {
- return createAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput).block();
- }
-
- /**
- * Adds a recovery services provider.
- *
- * The operation to add a recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param addProviderInput Add provider input.
- * @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 provider details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RecoveryServicesProviderInner create(String resourceName, String resourceGroupName, String fabricName,
- String providerName, AddRecoveryServicesProviderInput addProviderInput, Context context) {
- return createAsync(resourceName, resourceGroupName, fabricName, providerName, addProviderInput, context)
- .block();
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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>> purgeWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- return FluxUtil
- .withContext(context -> service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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>> purgeWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- context = this.client.mergeContext(context);
- return service.purge(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, providerName, context);
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginPurgeAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- Mono>> mono
- = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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> beginPurgeAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = purgeWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginPurge(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName).getSyncPoller();
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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> beginPurge(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- return this.beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName, context).getSyncPoller();
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 purgeAsync(String resourceName, String resourceGroupName, String fabricName,
- String providerName) {
- return beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 purgeAsync(String resourceName, String resourceGroupName, String fabricName, String providerName,
- Context context) {
- return beginPurgeAsync(resourceName, resourceGroupName, fabricName, providerName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @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 purge(String resourceName, String resourceGroupName, String fabricName, String providerName) {
- purgeAsync(resourceName, resourceGroupName, fabricName, providerName).block();
- }
-
- /**
- * Purges recovery service provider from fabric.
- *
- * The operation to purge(force delete) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 purge(String resourceName, String resourceGroupName, String fabricName, String providerName,
- Context context) {
- purgeAsync(resourceName, resourceGroupName, fabricName, providerName, context).block();
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return provider details along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> refreshProviderWithResponseAsync(String resourceName,
- String resourceGroupName, String fabricName, String providerName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.refreshProvider(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 provider details along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> refreshProviderWithResponseAsync(String resourceName,
- String resourceGroupName, String fabricName, String providerName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.refreshProvider(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, accept, context);
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RecoveryServicesProviderInner>
- beginRefreshProviderAsync(String resourceName, String resourceGroupName, String fabricName,
- String providerName) {
- Mono>> mono
- = refreshProviderWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class,
- this.client.getContext());
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, RecoveryServicesProviderInner>
- beginRefreshProviderAsync(String resourceName, String resourceGroupName, String fabricName, String providerName,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = refreshProviderWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), RecoveryServicesProviderInner.class, RecoveryServicesProviderInner.class,
- context);
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RecoveryServicesProviderInner>
- beginRefreshProvider(String resourceName, String resourceGroupName, String fabricName, String providerName) {
- return this.beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName)
- .getSyncPoller();
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 provider details.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, RecoveryServicesProviderInner> beginRefreshProvider(
- String resourceName, String resourceGroupName, String fabricName, String providerName, Context context) {
- return this.beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName, context)
- .getSyncPoller();
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return provider details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono refreshProviderAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- return beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 provider details on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono refreshProviderAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- return beginRefreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return provider details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RecoveryServicesProviderInner refreshProvider(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- return refreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName).block();
- }
-
- /**
- * Refresh details from the recovery services provider.
- *
- * The operation to refresh the information from the recovery services provider.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 provider details.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public RecoveryServicesProviderInner refreshProvider(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- return refreshProviderAsync(resourceName, resourceGroupName, fabricName, providerName, context).block();
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), fabricName, providerName, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (fabricName == null) {
- return Mono.error(new IllegalArgumentException("Parameter fabricName is required and cannot be null."));
- }
- if (providerName == null) {
- return Mono.error(new IllegalArgumentException("Parameter providerName is required and cannot be null."));
- }
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), fabricName, providerName, context);
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginDeleteAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- Mono>> mono
- = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- this.client.getContext());
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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> beginDeleteAsync(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = deleteWithResponseAsync(resourceName, resourceGroupName, fabricName, providerName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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> beginDelete(String resourceName, String resourceGroupName,
- String fabricName, String providerName) {
- return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName).getSyncPoller();
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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> beginDelete(String resourceName, String resourceGroupName,
- String fabricName, String providerName, Context context) {
- return this.beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName, context)
- .getSyncPoller();
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceName, String resourceGroupName, String fabricName,
- String providerName) {
- return beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @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 deleteAsync(String resourceName, String resourceGroupName, String fabricName,
- String providerName, Context context) {
- return beginDeleteAsync(resourceName, resourceGroupName, fabricName, providerName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceName, String resourceGroupName, String fabricName, String providerName) {
- deleteAsync(resourceName, resourceGroupName, fabricName, providerName).block();
- }
-
- /**
- * Deletes provider from fabric. Note: Deleting provider for any fabric other than SingleHost is unsupported. To
- * maintain backward compatibility for released clients the object "deleteRspInput" is used (if the object is empty
- * we assume that it is old client and continue the old behavior).
- *
- * The operation to removes/delete(unregister) a recovery services provider from the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param fabricName Fabric name.
- * @param providerName Recovery services provider name.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceName, String resourceGroupName, String fabricName, String providerName,
- Context context) {
- deleteAsync(resourceName, resourceGroupName, fabricName, providerName, context).block();
- }
-
- /**
- * Gets the list of registered recovery services providers in the vault. This is a view only api.
- *
- * Lists the registered recovery services providers in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceName,
- String resourceGroupName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the list of registered recovery services providers in the vault. This is a view only api.
- *
- * Lists the registered recovery services providers in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceName,
- String resourceGroupName, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Gets the list of registered recovery services providers in the vault. This is a view only api.
- *
- * Lists the registered recovery services providers in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceName, String resourceGroupName) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName),
- nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Gets the list of registered recovery services providers in the vault. This is a view only api.
- *
- * Lists the registered recovery services providers in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceName, String resourceGroupName,
- Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceName, resourceGroupName, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Gets the list of registered recovery services providers in the vault. This is a view only api.
- *
- * Lists the registered recovery services providers in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceName, String resourceGroupName) {
- return new PagedIterable<>(listAsync(resourceName, resourceGroupName));
- }
-
- /**
- * Gets the list of registered recovery services providers in the vault. This is a view only api.
- *
- * Lists the registered recovery services providers in the vault.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return collection of providers as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceName, String resourceGroupName,
- Context context) {
- return new PagedIterable<>(listAsync(resourceName, resourceGroupName, 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 collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByReplicationFabricsNextSinglePageAsync(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.listByReplicationFabricsNext(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 collection of providers along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>
- listByReplicationFabricsNextSinglePageAsync(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.listByReplicationFabricsNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Get the next page of items.
- *
- * @param nextLink The URL to get the next list of items
- *
- * 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 collection of providers 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 collection of providers 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/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsClientImpl.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsClientImpl.java
deleted file mode 100644
index d8547f504c35..000000000000
--- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/implementation/SupportedOperatingSystemsOperationsClientImpl.java
+++ /dev/null
@@ -1,196 +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.recoveryservicessiterecovery.implementation;
-
-import com.azure.core.annotation.ExpectedResponses;
-import com.azure.core.annotation.Get;
-import com.azure.core.annotation.HeaderParam;
-import com.azure.core.annotation.Headers;
-import com.azure.core.annotation.Host;
-import com.azure.core.annotation.HostParam;
-import com.azure.core.annotation.PathParam;
-import com.azure.core.annotation.QueryParam;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceInterface;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.annotation.UnexpectedResponseExceptionType;
-import com.azure.core.http.rest.Response;
-import com.azure.core.http.rest.RestProxy;
-import com.azure.core.management.exception.ManagementException;
-import com.azure.core.util.Context;
-import com.azure.core.util.FluxUtil;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.SupportedOperatingSystemsOperationsClient;
-import com.azure.resourcemanager.recoveryservicessiterecovery.fluent.models.SupportedOperatingSystemsInner;
-import reactor.core.publisher.Mono;
-
-/**
- * An instance of this class provides access to all the operations defined in
- * SupportedOperatingSystemsOperationsClient.
- */
-public final class SupportedOperatingSystemsOperationsClientImpl implements SupportedOperatingSystemsOperationsClient {
- /**
- * The proxy service used to perform REST calls.
- */
- private final SupportedOperatingSystemsOperationsService service;
-
- /**
- * The service client containing this operation class.
- */
- private final SiteRecoveryManagementClientImpl client;
-
- /**
- * Initializes an instance of SupportedOperatingSystemsOperationsClientImpl.
- *
- * @param client the instance of the service client containing this operation class.
- */
- SupportedOperatingSystemsOperationsClientImpl(SiteRecoveryManagementClientImpl client) {
- this.service = RestProxy.create(SupportedOperatingSystemsOperationsService.class, client.getHttpPipeline(),
- client.getSerializerAdapter());
- this.client = client;
- }
-
- /**
- * The interface defining all the services for SiteRecoveryManagementClientSupportedOperatingSystemsOperations to
- * be used by the proxy service to perform REST calls.
- */
- @Host("{$host}")
- @ServiceInterface(name = "SiteRecoveryManageme")
- public interface SupportedOperatingSystemsOperationsService {
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationSupportedOperatingSystems")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @PathParam("resourceName") String resourceName,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("instanceType") String instanceType,
- @HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Gets the data of supported operating systems by SRS.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param instanceType The instance type.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 data of supported operating systems by SRS along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceName,
- String resourceGroupName, String instanceType) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName,
- resourceGroupName, this.client.getSubscriptionId(), instanceType, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets the data of supported operating systems by SRS.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param instanceType The instance type.
- * @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 data of supported operating systems by SRS along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getWithResponseAsync(String resourceName,
- String resourceGroupName, String instanceType, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceName == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceName, resourceGroupName,
- this.client.getSubscriptionId(), instanceType, accept, context);
- }
-
- /**
- * Gets the data of supported operating systems by SRS.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the data of supported operating systems by SRS on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getAsync(String resourceName, String resourceGroupName) {
- final String instanceType = null;
- return getWithResponseAsync(resourceName, resourceGroupName, instanceType)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets the data of supported operating systems by SRS.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @param instanceType The instance type.
- * @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 data of supported operating systems by SRS along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getWithResponse(String resourceName, String resourceGroupName,
- String instanceType, Context context) {
- return getWithResponseAsync(resourceName, resourceGroupName, instanceType, context).block();
- }
-
- /**
- * Gets the data of supported operating systems by SRS.
- *
- * @param resourceName The name of the recovery services vault.
- * @param resourceGroupName The name of the resource group where the recovery services vault is present.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the data of supported operating systems by SRS.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public SupportedOperatingSystemsInner get(String resourceName, String resourceGroupName) {
- final String instanceType = null;
- return getWithResponse(resourceName, resourceGroupName, instanceType, Context.NONE).getValue();
- }
-}
diff --git a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java b/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java
deleted file mode 100644
index ddfaa2ec3d9b..000000000000
--- a/sdk/recoveryservicessiterecovery/azure-resourcemanager-recoveryservicessiterecovery/src/main/java/com/azure/resourcemanager/recoveryservicessiterecovery/models/HyperVReplicaAzureUpdateReplicationProtectedItemInput.java
+++ /dev/null
@@ -1,340 +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.recoveryservicessiterecovery.models;
-
-import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.annotation.JsonTypeName;
-import java.util.List;
-import java.util.Map;
-
-/**
- * HyperV replica Azure input to update replication protected item.
- */
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType")
-@JsonTypeName("HyperVReplicaAzure")
-@Fluent
-public final class HyperVReplicaAzureUpdateReplicationProtectedItemInput
- extends UpdateReplicationProtectedItemProviderInput {
- /*
- * The recovery Azure resource group Id for classic deployment.
- */
- @JsonProperty(value = "recoveryAzureV1ResourceGroupId")
- private String recoveryAzureV1ResourceGroupId;
-
- /*
- * The recovery Azure resource group Id for resource manager deployment.
- */
- @JsonProperty(value = "recoveryAzureV2ResourceGroupId")
- private String recoveryAzureV2ResourceGroupId;
-
- /*
- * A value indicating whether managed disks should be used during failover.
- */
- @JsonProperty(value = "useManagedDisks")
- private String useManagedDisks;
-
- /*
- * The dictionary of disk resource Id to disk encryption set ARM Id.
- */
- @JsonProperty(value = "diskIdToDiskEncryptionMap")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map diskIdToDiskEncryptionMap;
-
- /*
- * The target proximity placement group Id.
- */
- @JsonProperty(value = "targetProximityPlacementGroupId")
- private String targetProximityPlacementGroupId;
-
- /*
- * The target availability zone.
- */
- @JsonProperty(value = "targetAvailabilityZone")
- private String targetAvailabilityZone;
-
- /*
- * The target VM tags.
- */
- @JsonProperty(value = "targetVmTags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map targetVmTags;
-
- /*
- * The tags for the target managed disks.
- */
- @JsonProperty(value = "targetManagedDiskTags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map targetManagedDiskTags;
-
- /*
- * The tags for the target NICs.
- */
- @JsonProperty(value = "targetNicTags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
- private Map targetNicTags;
-
- /*
- * The SQL Server license type.
- */
- @JsonProperty(value = "sqlServerLicenseType")
- private SqlServerLicenseType sqlServerLicenseType;
-
- /*
- * The list of disk update properties.
- */
- @JsonProperty(value = "vmDisks")
- private List vmDisks;
-
- /**
- * Creates an instance of HyperVReplicaAzureUpdateReplicationProtectedItemInput class.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput() {
- }
-
- /**
- * Get the recoveryAzureV1ResourceGroupId property: The recovery Azure resource group Id for classic deployment.
- *
- * @return the recoveryAzureV1ResourceGroupId value.
- */
- public String recoveryAzureV1ResourceGroupId() {
- return this.recoveryAzureV1ResourceGroupId;
- }
-
- /**
- * Set the recoveryAzureV1ResourceGroupId property: The recovery Azure resource group Id for classic deployment.
- *
- * @param recoveryAzureV1ResourceGroupId the recoveryAzureV1ResourceGroupId value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput
- withRecoveryAzureV1ResourceGroupId(String recoveryAzureV1ResourceGroupId) {
- this.recoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId;
- return this;
- }
-
- /**
- * Get the recoveryAzureV2ResourceGroupId property: The recovery Azure resource group Id for resource manager
- * deployment.
- *
- * @return the recoveryAzureV2ResourceGroupId value.
- */
- public String recoveryAzureV2ResourceGroupId() {
- return this.recoveryAzureV2ResourceGroupId;
- }
-
- /**
- * Set the recoveryAzureV2ResourceGroupId property: The recovery Azure resource group Id for resource manager
- * deployment.
- *
- * @param recoveryAzureV2ResourceGroupId the recoveryAzureV2ResourceGroupId value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput
- withRecoveryAzureV2ResourceGroupId(String recoveryAzureV2ResourceGroupId) {
- this.recoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId;
- return this;
- }
-
- /**
- * Get the useManagedDisks property: A value indicating whether managed disks should be used during failover.
- *
- * @return the useManagedDisks value.
- */
- public String useManagedDisks() {
- return this.useManagedDisks;
- }
-
- /**
- * Set the useManagedDisks property: A value indicating whether managed disks should be used during failover.
- *
- * @param useManagedDisks the useManagedDisks value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput withUseManagedDisks(String useManagedDisks) {
- this.useManagedDisks = useManagedDisks;
- return this;
- }
-
- /**
- * Get the diskIdToDiskEncryptionMap property: The dictionary of disk resource Id to disk encryption set ARM Id.
- *
- * @return the diskIdToDiskEncryptionMap value.
- */
- public Map diskIdToDiskEncryptionMap() {
- return this.diskIdToDiskEncryptionMap;
- }
-
- /**
- * Set the diskIdToDiskEncryptionMap property: The dictionary of disk resource Id to disk encryption set ARM Id.
- *
- * @param diskIdToDiskEncryptionMap the diskIdToDiskEncryptionMap value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput
- withDiskIdToDiskEncryptionMap(Map diskIdToDiskEncryptionMap) {
- this.diskIdToDiskEncryptionMap = diskIdToDiskEncryptionMap;
- return this;
- }
-
- /**
- * Get the targetProximityPlacementGroupId property: The target proximity placement group Id.
- *
- * @return the targetProximityPlacementGroupId value.
- */
- public String targetProximityPlacementGroupId() {
- return this.targetProximityPlacementGroupId;
- }
-
- /**
- * Set the targetProximityPlacementGroupId property: The target proximity placement group Id.
- *
- * @param targetProximityPlacementGroupId the targetProximityPlacementGroupId value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput
- withTargetProximityPlacementGroupId(String targetProximityPlacementGroupId) {
- this.targetProximityPlacementGroupId = targetProximityPlacementGroupId;
- return this;
- }
-
- /**
- * Get the targetAvailabilityZone property: The target availability zone.
- *
- * @return the targetAvailabilityZone value.
- */
- public String targetAvailabilityZone() {
- return this.targetAvailabilityZone;
- }
-
- /**
- * Set the targetAvailabilityZone property: The target availability zone.
- *
- * @param targetAvailabilityZone the targetAvailabilityZone value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput
- withTargetAvailabilityZone(String targetAvailabilityZone) {
- this.targetAvailabilityZone = targetAvailabilityZone;
- return this;
- }
-
- /**
- * Get the targetVmTags property: The target VM tags.
- *
- * @return the targetVmTags value.
- */
- public Map targetVmTags() {
- return this.targetVmTags;
- }
-
- /**
- * Set the targetVmTags property: The target VM tags.
- *
- * @param targetVmTags the targetVmTags value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput withTargetVmTags(Map targetVmTags) {
- this.targetVmTags = targetVmTags;
- return this;
- }
-
- /**
- * Get the targetManagedDiskTags property: The tags for the target managed disks.
- *
- * @return the targetManagedDiskTags value.
- */
- public Map targetManagedDiskTags() {
- return this.targetManagedDiskTags;
- }
-
- /**
- * Set the targetManagedDiskTags property: The tags for the target managed disks.
- *
- * @param targetManagedDiskTags the targetManagedDiskTags value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput
- withTargetManagedDiskTags(Map targetManagedDiskTags) {
- this.targetManagedDiskTags = targetManagedDiskTags;
- return this;
- }
-
- /**
- * Get the targetNicTags property: The tags for the target NICs.
- *
- * @return the targetNicTags value.
- */
- public Map targetNicTags() {
- return this.targetNicTags;
- }
-
- /**
- * Set the targetNicTags property: The tags for the target NICs.
- *
- * @param targetNicTags the targetNicTags value to set.
- * @return the HyperVReplicaAzureUpdateReplicationProtectedItemInput object itself.
- */
- public HyperVReplicaAzureUpdateReplicationProtectedItemInput withTargetNicTags(Map