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

package com.azure.resourcemanager.apimanagement.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.apimanagement.fluent.models.DeletedServiceContractInner;

/** An instance of this class provides access to all the operations defined in DeletedServicesClient. */
public interface DeletedServicesClient {
    /**
     * Lists all soft-deleted services available for undelete for the given subscription.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return paged deleted API Management Services List Representation as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DeletedServiceContractInner> list();

    /**
     * Lists all soft-deleted services available for undelete for the given subscription.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return paged deleted API Management Services List Representation as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<DeletedServiceContractInner> list(Context context);

    /**
     * Get soft-deleted Api Management Service by name.
     *
     * @param serviceName The name of the API Management service.
     * @param location The location of the deleted API Management service.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return soft-deleted Api Management Service by name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DeletedServiceContractInner getByName(String serviceName, String location);

    /**
     * Get soft-deleted Api Management Service by name.
     *
     * @param serviceName The name of the API Management service.
     * @param location The location of the deleted API Management service.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return soft-deleted Api Management Service by name along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<DeletedServiceContractInner> getByNameWithResponse(String serviceName, String location, Context context);

    /**
     * Purges Api Management Service (deletes it with no option to undelete).
     *
     * @param serviceName The name of the API Management service.
     * @param location The location of the deleted API Management service.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DeletedServiceContractInner>, DeletedServiceContractInner> beginPurge(
        String serviceName, String location);

    /**
     * Purges Api Management Service (deletes it with no option to undelete).
     *
     * @param serviceName The name of the API Management service.
     * @param location The location of the deleted API Management service.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DeletedServiceContractInner>, DeletedServiceContractInner> beginPurge(
        String serviceName, String location, Context context);

    /**
     * Purges Api Management Service (deletes it with no option to undelete).
     *
     * @param serviceName The name of the API Management service.
     * @param location The location of the deleted API Management service.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DeletedServiceContractInner purge(String serviceName, String location);

    /**
     * Purges Api Management Service (deletes it with no option to undelete).
     *
     * @param serviceName The name of the API Management service.
     * @param location The location of the deleted API Management service.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DeletedServiceContractInner purge(String serviceName, String location, Context context);
}
