// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.dataprotection.implementation;

import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.Delete;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Headers;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.PagedResponse;
import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.dataprotection.fluent.ResourceGuardsClient;
import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner;
import com.azure.resourcemanager.dataprotection.fluent.models.ResourceGuardResourceInner;
import com.azure.resourcemanager.dataprotection.models.DppBaseResourceList;
import com.azure.resourcemanager.dataprotection.models.PatchResourceGuardInput;
import com.azure.resourcemanager.dataprotection.models.ResourceGuardResourceList;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in ResourceGuardsClient. */
public final class ResourceGuardsClientImpl implements ResourceGuardsClient {
    /** The proxy service used to perform REST calls. */
    private final ResourceGuardsService service;

    /** The service client containing this operation class. */
    private final DataProtectionClientImpl client;

    /**
     * Initializes an instance of ResourceGuardsClientImpl.
     *
     * @param client the instance of the service client containing this operation class.
     */
    ResourceGuardsClientImpl(DataProtectionClientImpl client) {
        this.service =
            RestProxy.create(ResourceGuardsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
        this.client = client;
    }

    /**
     * The interface defining all the services for DataProtectionClientResourceGuards to be used by the proxy service to
     * perform REST calls.
     */
    @Host("{$host}")
    @ServiceInterface(name = "DataProtectionClient")
    public interface ResourceGuardsService {
        @Headers({"Content-Type: application/json"})
        @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<ResourceGuardResourceList>> list(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("subscriptionId") String subscriptionId,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<ResourceGuardResourceList>> listByResourceGroup(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGroupName") String resourceGroupName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Put(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}")
        @ExpectedResponses({200, 201})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<ResourceGuardResourceInner>> put(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @BodyParam("application/json") ResourceGuardResourceInner parameters,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<ResourceGuardResourceInner>> getByResourceGroup(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Delete(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}")
        @ExpectedResponses({200, 204})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<Void>> delete(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Patch(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<ResourceGuardResourceInner>> patch(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @BodyParam("application/json") PatchResourceGuardInput parameters,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceList>> getDisableSoftDeleteRequestsObjects(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceList>> getDeleteResourceGuardProxyRequestsObjects(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceList>> getBackupSecurityPinRequestsObjects(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceList>> getDeleteProtectedItemRequestsObjects(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceList>> getUpdateProtectionPolicyRequestsObjects(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceList>> getUpdateProtectedItemRequestsObjects(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceInner>> getDefaultDisableSoftDeleteRequestsObject(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @PathParam("requestName") String requestName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceInner>> getDefaultDeleteResourceGuardProxyRequestsObject(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @PathParam("requestName") String requestName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceInner>> getDefaultBackupSecurityPinRequestsObject(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @PathParam("requestName") String requestName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceInner>> getDefaultDeleteProtectedItemRequestsObject(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @PathParam("requestName") String requestName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceInner>> getDefaultUpdateProtectionPolicyRequestsObject(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @PathParam("requestName") String requestName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get(
            "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<DppBaseResourceInner>> getDefaultUpdateProtectedItemRequestsObject(
            @HostParam("$host") String endpoint,
            @QueryParam("api-version") String apiVersion,
            @PathParam("resourceGroupName") String resourceGroupName,
            @PathParam("subscriptionId") String subscriptionId,
            @PathParam("resourceGuardsName") String resourceGuardsName,
            @PathParam("requestName") String requestName,
            @HeaderParam("Accept") String accept,
            Context context);

        @Headers({"Content-Type: application/json"})
        @Get("{nextLink}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(ManagementException.class)
        Mono<Response<ResourceGuardResourceList>> getResourcesInSubscriptionNext(
            @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<Response<ResourceGuardResourceList>> getResourcesInResourceGroupNext(
            @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<Response<DppBaseResourceList>> getDisableSoftDeleteRequestsObjectsNext(
            @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<Response<DppBaseResourceList>> getDeleteResourceGuardProxyRequestsObjectsNext(
            @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<Response<DppBaseResourceList>> getBackupSecurityPinRequestsObjectsNext(
            @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<Response<DppBaseResourceList>> getDeleteProtectedItemRequestsObjectsNext(
            @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<Response<DppBaseResourceList>> getUpdateProtectionPolicyRequestsObjectsNext(
            @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<Response<DppBaseResourceList>> getUpdateProtectedItemRequestsObjectsNext(
            @PathParam(value = "nextLink", encoded = true) String nextLink,
            @HostParam("$host") String endpoint,
            @HeaderParam("Accept") String accept,
            Context context);
    }

    /**
     * Returns ResourceGuards collection belonging to a subscription.
     *
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> listSinglePageAsync() {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .list(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            this.client.getSubscriptionId(),
                            accept,
                            context))
            .<PagedResponse<ResourceGuardResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns ResourceGuards collection belonging to a subscription.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> listSinglePageAsync(Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .list(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                this.client.getSubscriptionId(),
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns ResourceGuards collection belonging to a subscription.
     *
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<ResourceGuardResourceInner> listAsync() {
        return new PagedFlux<>(
            () -> listSinglePageAsync(), nextLink -> getResourcesInSubscriptionNextSinglePageAsync(nextLink));
    }

    /**
     * Returns ResourceGuards collection belonging to a subscription.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<ResourceGuardResourceInner> listAsync(Context context) {
        return new PagedFlux<>(
            () -> listSinglePageAsync(context),
            nextLink -> getResourcesInSubscriptionNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns ResourceGuards collection belonging to a subscription.
     *
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<ResourceGuardResourceInner> list() {
        return new PagedIterable<>(listAsync());
    }

    /**
     * Returns ResourceGuards collection belonging to a subscription.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<ResourceGuardResourceInner> list(Context context) {
        return new PagedIterable<>(listAsync(context));
    }

    /**
     * Returns ResourceGuards collection belonging to a ResourceGroup.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> listByResourceGroupSinglePageAsync(
        String resourceGroupName) {
        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."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .listByResourceGroup(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            this.client.getSubscriptionId(),
                            resourceGroupName,
                            accept,
                            context))
            .<PagedResponse<ResourceGuardResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns ResourceGuards collection belonging to a ResourceGroup.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> listByResourceGroupSinglePageAsync(
        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 (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."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .listByResourceGroup(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                this.client.getSubscriptionId(),
                resourceGroupName,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns ResourceGuards collection belonging to a ResourceGroup.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<ResourceGuardResourceInner> listByResourceGroupAsync(String resourceGroupName) {
        return new PagedFlux<>(
            () -> listByResourceGroupSinglePageAsync(resourceGroupName),
            nextLink -> getResourcesInResourceGroupNextSinglePageAsync(nextLink));
    }

    /**
     * Returns ResourceGuards collection belonging to a ResourceGroup.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<ResourceGuardResourceInner> listByResourceGroupAsync(String resourceGroupName, Context context) {
        return new PagedFlux<>(
            () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
            nextLink -> getResourcesInResourceGroupNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns ResourceGuards collection belonging to a ResourceGroup.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<ResourceGuardResourceInner> listByResourceGroup(String resourceGroupName) {
        return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
    }

    /**
     * Returns ResourceGuards collection belonging to a ResourceGroup.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<ResourceGuardResourceInner> listByResourceGroup(String resourceGroupName, Context context) {
        return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
    }

    /**
     * Creates or updates a ResourceGuard resource belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<ResourceGuardResourceInner>> putWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (parameters == null) {
            return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
        } else {
            parameters.validate();
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .put(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            parameters,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Creates or updates a ResourceGuard resource belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<ResourceGuardResourceInner>> putWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (parameters == null) {
            return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
        } else {
            parameters.validate();
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .put(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                parameters,
                accept,
                context);
    }

    /**
     * Creates or updates a ResourceGuard resource belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<ResourceGuardResourceInner> putAsync(
        String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters) {
        return putWithResponseAsync(resourceGroupName, resourceGuardsName, parameters)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Creates or updates a ResourceGuard resource belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<ResourceGuardResourceInner> putWithResponse(
        String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters, Context context) {
        return putWithResponseAsync(resourceGroupName, resourceGuardsName, parameters, context).block();
    }

    /**
     * Creates or updates a ResourceGuard resource belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public ResourceGuardResourceInner put(
        String resourceGroupName, String resourceGuardsName, ResourceGuardResourceInner parameters) {
        return putWithResponse(resourceGroupName, resourceGuardsName, parameters, Context.NONE).getValue();
    }

    /**
     * Returns a ResourceGuard belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<ResourceGuardResourceInner>> getByResourceGroupWithResponseAsync(
        String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getByResourceGroup(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns a ResourceGuard belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<ResourceGuardResourceInner>> getByResourceGroupWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getByResourceGroup(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context);
    }

    /**
     * Returns a ResourceGuard belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<ResourceGuardResourceInner> getByResourceGroupAsync(
        String resourceGroupName, String resourceGuardsName) {
        return getByResourceGroupWithResponseAsync(resourceGroupName, resourceGuardsName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Returns a ResourceGuard belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<ResourceGuardResourceInner> getByResourceGroupWithResponse(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return getByResourceGroupWithResponseAsync(resourceGroupName, resourceGuardsName, context).block();
    }

    /**
     * Returns a ResourceGuard belonging to a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public ResourceGuardResourceInner getByResourceGroup(String resourceGroupName, String resourceGuardsName) {
        return getByResourceGroupWithResponse(resourceGroupName, resourceGuardsName, Context.NONE).getValue();
    }

    /**
     * Deletes a ResourceGuard resource from the resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws 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<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .delete(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Deletes a ResourceGuard resource from the resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @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<Response<Void>> deleteWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .delete(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context);
    }

    /**
     * Deletes a ResourceGuard resource from the resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws 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<Void> deleteAsync(String resourceGroupName, String resourceGuardsName) {
        return deleteWithResponseAsync(resourceGroupName, resourceGuardsName).flatMap(ignored -> Mono.empty());
    }

    /**
     * Deletes a ResourceGuard resource from the resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<Void> deleteWithResponse(String resourceGroupName, String resourceGuardsName, Context context) {
        return deleteWithResponseAsync(resourceGroupName, resourceGuardsName, context).block();
    }

    /**
     * Deletes a ResourceGuard resource from the resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @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 resourceGroupName, String resourceGuardsName) {
        deleteWithResponse(resourceGroupName, resourceGuardsName, Context.NONE);
    }

    /**
     * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<ResourceGuardResourceInner>> patchWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (parameters == null) {
            return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
        } else {
            parameters.validate();
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .patch(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            parameters,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<ResourceGuardResourceInner>> patchWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters, Context context) {
        if (this.client.getEndpoint() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getEndpoint() is required and cannot be null."));
        }
        if (resourceGroupName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
        }
        if (this.client.getSubscriptionId() == null) {
            return Mono
                .error(
                    new IllegalArgumentException(
                        "Parameter this.client.getSubscriptionId() is required and cannot be null."));
        }
        if (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (parameters == null) {
            return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
        } else {
            parameters.validate();
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .patch(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                parameters,
                accept,
                context);
    }

    /**
     * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<ResourceGuardResourceInner> patchAsync(
        String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters) {
        return patchWithResponseAsync(resourceGroupName, resourceGuardsName, parameters)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response body along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<ResourceGuardResourceInner> patchWithResponse(
        String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters, Context context) {
        return patchWithResponseAsync(resourceGroupName, resourceGuardsName, parameters, context).block();
    }

    /**
     * Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The name of ResourceGuard.
     * @param parameters Request body for operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public ResourceGuardResourceInner patch(
        String resourceGroupName, String resourceGuardsName, PatchResourceGuardInput parameters) {
        return patchWithResponse(resourceGroupName, resourceGuardsName, parameters, Context.NONE).getValue();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDisableSoftDeleteRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDisableSoftDeleteRequestsObjects(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .<PagedResponse<DppBaseResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDisableSoftDeleteRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDisableSoftDeleteRequestsObjects(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getDisableSoftDeleteRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedFlux<>(
            () -> getDisableSoftDeleteRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName),
            nextLink -> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(nextLink));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getDisableSoftDeleteRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedFlux<>(
            () -> getDisableSoftDeleteRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context),
            nextLink -> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getDisableSoftDeleteRequestsObjects(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedIterable<>(getDisableSoftDeleteRequestsObjectsAsync(resourceGroupName, resourceGuardsName));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getDisableSoftDeleteRequestsObjects(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedIterable<>(
            getDisableSoftDeleteRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDeleteResourceGuardProxyRequestsObjects(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .<PagedResponse<DppBaseResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDeleteResourceGuardProxyRequestsObjects(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getDeleteResourceGuardProxyRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedFlux<>(
            () -> getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName),
            nextLink -> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(nextLink));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getDeleteResourceGuardProxyRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedFlux<>(
            () ->
                getDeleteResourceGuardProxyRequestsObjectsSinglePageAsync(
                    resourceGroupName, resourceGuardsName, context),
            nextLink -> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getDeleteResourceGuardProxyRequestsObjects(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedIterable<>(
            getDeleteResourceGuardProxyRequestsObjectsAsync(resourceGroupName, resourceGuardsName));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getDeleteResourceGuardProxyRequestsObjects(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedIterable<>(
            getDeleteResourceGuardProxyRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getBackupSecurityPinRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getBackupSecurityPinRequestsObjects(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .<PagedResponse<DppBaseResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getBackupSecurityPinRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getBackupSecurityPinRequestsObjects(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getBackupSecurityPinRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedFlux<>(
            () -> getBackupSecurityPinRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName),
            nextLink -> getBackupSecurityPinRequestsObjectsNextSinglePageAsync(nextLink));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getBackupSecurityPinRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedFlux<>(
            () -> getBackupSecurityPinRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context),
            nextLink -> getBackupSecurityPinRequestsObjectsNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getBackupSecurityPinRequestsObjects(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedIterable<>(getBackupSecurityPinRequestsObjectsAsync(resourceGroupName, resourceGuardsName));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getBackupSecurityPinRequestsObjects(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedIterable<>(
            getBackupSecurityPinRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteProtectedItemRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDeleteProtectedItemRequestsObjects(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .<PagedResponse<DppBaseResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteProtectedItemRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDeleteProtectedItemRequestsObjects(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getDeleteProtectedItemRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedFlux<>(
            () -> getDeleteProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName),
            nextLink -> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(nextLink));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getDeleteProtectedItemRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedFlux<>(
            () -> getDeleteProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context),
            nextLink -> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getDeleteProtectedItemRequestsObjects(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedIterable<>(getDeleteProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getDeleteProtectedItemRequestsObjects(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedIterable<>(
            getDeleteProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getUpdateProtectionPolicyRequestsObjects(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .<PagedResponse<DppBaseResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getUpdateProtectionPolicyRequestsObjects(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getUpdateProtectionPolicyRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedFlux<>(
            () -> getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName),
            nextLink -> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(nextLink));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getUpdateProtectionPolicyRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedFlux<>(
            () ->
                getUpdateProtectionPolicyRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context),
            nextLink -> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getUpdateProtectionPolicyRequestsObjects(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedIterable<>(
            getUpdateProtectionPolicyRequestsObjectsAsync(resourceGroupName, resourceGuardsName));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getUpdateProtectionPolicyRequestsObjects(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedIterable<>(
            getUpdateProtectionPolicyRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectedItemRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getUpdateProtectedItemRequestsObjects(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            accept,
                            context))
            .<PagedResponse<DppBaseResourceInner>>map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectedItemRequestsObjectsSinglePageAsync(
        String resourceGroupName, String resourceGuardsName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getUpdateProtectedItemRequestsObjects(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                accept,
                context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getUpdateProtectedItemRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedFlux<>(
            () -> getUpdateProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName),
            nextLink -> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(nextLink));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedFlux}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    private PagedFlux<DppBaseResourceInner> getUpdateProtectedItemRequestsObjectsAsync(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedFlux<>(
            () -> getUpdateProtectedItemRequestsObjectsSinglePageAsync(resourceGroupName, resourceGuardsName, context),
            nextLink -> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(nextLink, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getUpdateProtectedItemRequestsObjects(
        String resourceGroupName, String resourceGuardsName) {
        return new PagedIterable<>(getUpdateProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName 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 base for all lists of V2 resources as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<DppBaseResourceInner> getUpdateProtectedItemRequestsObjects(
        String resourceGroupName, String resourceGuardsName, Context context) {
        return new PagedIterable<>(
            getUpdateProtectedItemRequestsObjectsAsync(resourceGroupName, resourceGuardsName, context));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDefaultDisableSoftDeleteRequestsObject(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            requestName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDefaultDisableSoftDeleteRequestsObject(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                requestName,
                accept,
                context);
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<DppBaseResourceInner> getDefaultDisableSoftDeleteRequestsObjectAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<DppBaseResourceInner> getDefaultDisableSoftDeleteRequestsObjectWithResponse(
        String resourceGroupName, String resourceGuardsName, String requestName, Context context) {
        return getDefaultDisableSoftDeleteRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName, context)
            .block();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public DppBaseResourceInner getDefaultDisableSoftDeleteRequestsObject(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultDisableSoftDeleteRequestsObjectWithResponse(
                resourceGroupName, resourceGuardsName, requestName, Context.NONE)
            .getValue();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDefaultDeleteResourceGuardProxyRequestsObject(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            requestName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDefaultDeleteResourceGuardProxyRequestsObject(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                requestName,
                accept,
                context);
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<DppBaseResourceInner> getDefaultDeleteResourceGuardProxyRequestsObjectAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<DppBaseResourceInner> getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse(
        String resourceGroupName, String resourceGuardsName, String requestName, Context context) {
        return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName, context)
            .block();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public DppBaseResourceInner getDefaultDeleteResourceGuardProxyRequestsObject(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultDeleteResourceGuardProxyRequestsObjectWithResponse(
                resourceGroupName, resourceGuardsName, requestName, Context.NONE)
            .getValue();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultBackupSecurityPinRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDefaultBackupSecurityPinRequestsObject(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            requestName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultBackupSecurityPinRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDefaultBackupSecurityPinRequestsObject(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                requestName,
                accept,
                context);
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<DppBaseResourceInner> getDefaultBackupSecurityPinRequestsObjectAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultBackupSecurityPinRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<DppBaseResourceInner> getDefaultBackupSecurityPinRequestsObjectWithResponse(
        String resourceGroupName, String resourceGuardsName, String requestName, Context context) {
        return getDefaultBackupSecurityPinRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName, context)
            .block();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public DppBaseResourceInner getDefaultBackupSecurityPinRequestsObject(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultBackupSecurityPinRequestsObjectWithResponse(
                resourceGroupName, resourceGuardsName, requestName, Context.NONE)
            .getValue();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDefaultDeleteProtectedItemRequestsObject(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            requestName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDefaultDeleteProtectedItemRequestsObject(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                requestName,
                accept,
                context);
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<DppBaseResourceInner> getDefaultDeleteProtectedItemRequestsObjectAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<DppBaseResourceInner> getDefaultDeleteProtectedItemRequestsObjectWithResponse(
        String resourceGroupName, String resourceGuardsName, String requestName, Context context) {
        return getDefaultDeleteProtectedItemRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName, context)
            .block();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public DppBaseResourceInner getDefaultDeleteProtectedItemRequestsObject(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultDeleteProtectedItemRequestsObjectWithResponse(
                resourceGroupName, resourceGuardsName, requestName, Context.NONE)
            .getValue();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDefaultUpdateProtectionPolicyRequestsObject(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            requestName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDefaultUpdateProtectionPolicyRequestsObject(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                requestName,
                accept,
                context);
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<DppBaseResourceInner> getDefaultUpdateProtectionPolicyRequestsObjectAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<DppBaseResourceInner> getDefaultUpdateProtectionPolicyRequestsObjectWithResponse(
        String resourceGroupName, String resourceGuardsName, String requestName, Context context) {
        return getDefaultUpdateProtectionPolicyRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName, context)
            .block();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public DppBaseResourceInner getDefaultUpdateProtectionPolicyRequestsObject(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultUpdateProtectionPolicyRequestsObjectWithResponse(
                resourceGroupName, resourceGuardsName, requestName, Context.NONE)
            .getValue();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        return FluxUtil
            .withContext(
                context ->
                    service
                        .getDefaultUpdateProtectedItemRequestsObject(
                            this.client.getEndpoint(),
                            this.client.getApiVersion(),
                            resourceGroupName,
                            this.client.getSubscriptionId(),
                            resourceGuardsName,
                            requestName,
                            accept,
                            context))
            .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response} on successful
     *     completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<DppBaseResourceInner>> getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync(
        String resourceGroupName, String resourceGuardsName, String requestName, 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 (resourceGuardsName == null) {
            return Mono
                .error(new IllegalArgumentException("Parameter resourceGuardsName is required and cannot be null."));
        }
        if (requestName == null) {
            return Mono.error(new IllegalArgumentException("Parameter requestName is required and cannot be null."));
        }
        final String accept = "application/json";
        context = this.client.mergeContext(context);
        return service
            .getDefaultUpdateProtectedItemRequestsObject(
                this.client.getEndpoint(),
                this.client.getApiVersion(),
                resourceGroupName,
                this.client.getSubscriptionId(),
                resourceGuardsName,
                requestName,
                accept,
                context);
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<DppBaseResourceInner> getDefaultUpdateProtectedItemRequestsObjectAsync(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName)
            .flatMap(res -> Mono.justOrEmpty(res.getValue()));
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return base resource under Microsoft.DataProtection provider namespace along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<DppBaseResourceInner> getDefaultUpdateProtectedItemRequestsObjectWithResponse(
        String resourceGroupName, String resourceGuardsName, String requestName, Context context) {
        return getDefaultUpdateProtectedItemRequestsObjectWithResponseAsync(
                resourceGroupName, resourceGuardsName, requestName, context)
            .block();
    }

    /**
     * Returns collection of operation request objects for a critical operation protected by the given ResourceGuard
     * resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param resourceGuardsName The resourceGuardsName parameter.
     * @param requestName The requestName 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 base resource under Microsoft.DataProtection provider namespace.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public DppBaseResourceInner getDefaultUpdateProtectedItemRequestsObject(
        String resourceGroupName, String resourceGuardsName, String requestName) {
        return getDefaultUpdateProtectedItemRequestsObjectWithResponse(
                resourceGroupName, resourceGuardsName, requestName, Context.NONE)
            .getValue();
    }

    /**
     * Get the next page of items.
     *
     * @param nextLink The URL to get the next list of items
     *     <p>The nextLink parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> getResourcesInSubscriptionNextSinglePageAsync(
        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.getResourcesInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<ResourceGuardResourceInner>>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
     *     <p>The nextLink parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> getResourcesInSubscriptionNextSinglePageAsync(
        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
            .getResourcesInSubscriptionNext(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
     *     <p>The nextLink parameter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> getResourcesInResourceGroupNextSinglePageAsync(
        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.getResourcesInResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<ResourceGuardResourceInner>>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
     *     <p>The nextLink parameter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of ResourceGuard resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<ResourceGuardResourceInner>> getResourcesInResourceGroupNextSinglePageAsync(
        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
            .getResourcesInResourceGroupNext(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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(
        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
                        .getDisableSoftDeleteRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<DppBaseResourceInner>>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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDisableSoftDeleteRequestsObjectsNextSinglePageAsync(
        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
            .getDisableSoftDeleteRequestsObjectsNext(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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(
        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
                        .getDeleteResourceGuardProxyRequestsObjectsNext(
                            nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<DppBaseResourceInner>>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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteResourceGuardProxyRequestsObjectsNextSinglePageAsync(
        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
            .getDeleteResourceGuardProxyRequestsObjectsNext(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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getBackupSecurityPinRequestsObjectsNextSinglePageAsync(
        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
                        .getBackupSecurityPinRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<DppBaseResourceInner>>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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getBackupSecurityPinRequestsObjectsNextSinglePageAsync(
        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
            .getBackupSecurityPinRequestsObjectsNext(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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(
        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
                        .getDeleteProtectedItemRequestsObjectsNext(
                            nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<DppBaseResourceInner>>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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getDeleteProtectedItemRequestsObjectsNextSinglePageAsync(
        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
            .getDeleteProtectedItemRequestsObjectsNext(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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(
        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
                        .getUpdateProtectionPolicyRequestsObjectsNext(
                            nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<DppBaseResourceInner>>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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectionPolicyRequestsObjectsNextSinglePageAsync(
        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
            .getUpdateProtectionPolicyRequestsObjectsNext(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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(
        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
                        .getUpdateProtectedItemRequestsObjectsNext(
                            nextLink, this.client.getEndpoint(), accept, context))
            .<PagedResponse<DppBaseResourceInner>>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
     *     <p>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 base for all lists of V2 resources along with {@link PagedResponse} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<PagedResponse<DppBaseResourceInner>> getUpdateProtectedItemRequestsObjectsNextSinglePageAsync(
        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
            .getUpdateProtectedItemRequestsObjectsNext(nextLink, this.client.getEndpoint(), accept, context)
            .map(
                res ->
                    new PagedResponseBase<>(
                        res.getRequest(),
                        res.getStatusCode(),
                        res.getHeaders(),
                        res.getValue().value(),
                        res.getValue().nextLink(),
                        null));
    }
}
