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

package com.azure.resourcemanager.appconfiguration.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.appconfiguration.fluent.models.NameAvailabilityStatusInner;
import com.azure.resourcemanager.appconfiguration.fluent.models.OperationDefinitionInner;
import com.azure.resourcemanager.appconfiguration.models.CheckNameAvailabilityParameters;

/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
    /**
     * Checks whether the configuration store name is available for use.
     *
     * @param checkNameAvailabilityParameters The object containing information for the availability request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the result of a request to check the availability of a resource name along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NameAvailabilityStatusInner> checkNameAvailabilityWithResponse(
        CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context);

    /**
     * Checks whether the configuration store name is available for use.
     *
     * @param checkNameAvailabilityParameters The object containing information for the availability request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the result of a request to check the availability of a resource name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NameAvailabilityStatusInner checkNameAvailability(CheckNameAvailabilityParameters checkNameAvailabilityParameters);

    /**
     * Lists the operations available from this provider.
     *
     * @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 result of a request to list configuration store operations as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<OperationDefinitionInner> list();

    /**
     * Lists the operations available from this provider.
     *
     * @param skipToken A skip token is used to continue retrieving items after an operation returns a partial result.
     *     If a previous response contains a nextLink element, the value of the nextLink element will include a
     *     skipToken parameter that specifies a starting point to use for subsequent calls.
     * @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 result of a request to list configuration store operations as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<OperationDefinitionInner> list(String skipToken, Context context);

    /**
     * Checks whether the configuration store name is available for use.
     *
     * @param location The location in which uniqueness will be verified.
     * @param checkNameAvailabilityParameters The object containing information for the availability request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the result of a request to check the availability of a resource name along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NameAvailabilityStatusInner> regionalCheckNameAvailabilityWithResponse(
        String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context);

    /**
     * Checks whether the configuration store name is available for use.
     *
     * @param location The location in which uniqueness will be verified.
     * @param checkNameAvailabilityParameters The object containing information for the availability request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the result of a request to check the availability of a resource name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NameAvailabilityStatusInner regionalCheckNameAvailability(
        String location, CheckNameAvailabilityParameters checkNameAvailabilityParameters);
}
