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

package com.azure.resourcemanager.nginx.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.nginx.fluent.models.NginxConfigurationInner;

/** An instance of this class provides access to all the operations defined in ConfigurationsClient. */
public interface ConfigurationsClient {
    /**
     * List the Nginx configuration of given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @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 response of a list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NginxConfigurationInner> list(String resourceGroupName, String deploymentName);

    /**
     * List the Nginx configuration of given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @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 response of a list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NginxConfigurationInner> list(String resourceGroupName, String deploymentName, Context context);

    /**
     * Get the Nginx configuration of given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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 Nginx configuration of given Nginx deployment along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NginxConfigurationInner> getWithResponse(
        String resourceGroupName, String deploymentName, String configurationName, Context context);

    /**
     * Get the Nginx configuration of given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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 Nginx configuration of given Nginx deployment.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NginxConfigurationInner get(String resourceGroupName, String deploymentName, String configurationName);

    /**
     * Create or update the Nginx configuration for given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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<NginxConfigurationInner>, NginxConfigurationInner> beginCreateOrUpdate(
        String resourceGroupName, String deploymentName, String configurationName);

    /**
     * Create or update the Nginx configuration for given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @param body The Nginx configuration.
     * @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<NginxConfigurationInner>, NginxConfigurationInner> beginCreateOrUpdate(
        String resourceGroupName,
        String deploymentName,
        String configurationName,
        NginxConfigurationInner body,
        Context context);

    /**
     * Create or update the Nginx configuration for given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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)
    NginxConfigurationInner createOrUpdate(String resourceGroupName, String deploymentName, String configurationName);

    /**
     * Create or update the Nginx configuration for given Nginx deployment.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @param body The Nginx configuration.
     * @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)
    NginxConfigurationInner createOrUpdate(
        String resourceGroupName,
        String deploymentName,
        String configurationName,
        NginxConfigurationInner body,
        Context context);

    /**
     * Reset the Nginx configuration of given Nginx deployment to default.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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<Void>, Void> beginDelete(
        String resourceGroupName, String deploymentName, String configurationName);

    /**
     * Reset the Nginx configuration of given Nginx deployment to default.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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<Void>, Void> beginDelete(
        String resourceGroupName, String deploymentName, String configurationName, Context context);

    /**
     * Reset the Nginx configuration of given Nginx deployment to default.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String deploymentName, String configurationName);

    /**
     * Reset the Nginx configuration of given Nginx deployment to default.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param deploymentName The name of targeted Nginx deployment.
     * @param configurationName The name of configuration, only 'default' is supported value due to the singleton of
     *     Nginx conf.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String deploymentName, String configurationName, Context context);
}
