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

package com.azure.resourcemanager.fluidrelay.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of FluidRelayServers. */
public interface FluidRelayServers {
    /**
     * Get a Fluid Relay server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @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 a Fluid Relay server.
     */
    FluidRelayServer getByResourceGroup(String resourceGroup, String fluidRelayServerName);

    /**
     * Get a Fluid Relay server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @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 a Fluid Relay server along with {@link Response}.
     */
    Response<FluidRelayServer> getByResourceGroupWithResponse(
        String resourceGroup, String fluidRelayServerName, Context context);

    /**
     * Delete a Fluid Relay server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @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.
     */
    void deleteByResourceGroup(String resourceGroup, String fluidRelayServerName);

    /**
     * Delete a Fluid Relay server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @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 Response}.
     */
    Response<Void> deleteWithResponse(String resourceGroup, String fluidRelayServerName, Context context);

    /**
     * Regenerate the primary or secondary key for this server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @param parameters The details of which keys to generate.
     * @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 set of available keys for this server.
     */
    FluidRelayServerKeys regenerateKey(
        String resourceGroup, String fluidRelayServerName, RegenerateKeyRequest parameters);

    /**
     * Regenerate the primary or secondary key for this server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @param parameters The details of which keys to generate.
     * @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 set of available keys for this server along with {@link Response}.
     */
    Response<FluidRelayServerKeys> regenerateKeyWithResponse(
        String resourceGroup, String fluidRelayServerName, RegenerateKeyRequest parameters, Context context);

    /**
     * Get primary and secondary key for this server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @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 primary and secondary key for this server.
     */
    FluidRelayServerKeys listKeys(String resourceGroup, String fluidRelayServerName);

    /**
     * Get primary and secondary key for this server.
     *
     * @param resourceGroup The resource group containing the resource.
     * @param fluidRelayServerName The Fluid Relay server resource name.
     * @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 primary and secondary key for this server along with {@link Response}.
     */
    Response<FluidRelayServerKeys> listKeysWithResponse(
        String resourceGroup, String fluidRelayServerName, Context context);

    /**
     * List all Fluid Relay servers in a 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 response as paginated response with {@link PagedIterable}.
     */
    PagedIterable<FluidRelayServer> list();

    /**
     * List all Fluid Relay servers in a 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 response as paginated response with {@link PagedIterable}.
     */
    PagedIterable<FluidRelayServer> list(Context context);

    /**
     * List all Fluid Relay servers in a resource group.
     *
     * @param resourceGroup The resource group containing the resource.
     * @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 response as paginated response with {@link PagedIterable}.
     */
    PagedIterable<FluidRelayServer> listByResourceGroup(String resourceGroup);

    /**
     * List all Fluid Relay servers in a resource group.
     *
     * @param resourceGroup The resource group containing the resource.
     * @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 response as paginated response with {@link PagedIterable}.
     */
    PagedIterable<FluidRelayServer> listByResourceGroup(String resourceGroup, Context context);

    /**
     * Get a Fluid Relay server.
     *
     * @param id the resource ID.
     * @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 a Fluid Relay server along with {@link Response}.
     */
    FluidRelayServer getById(String id);

    /**
     * Get a Fluid Relay server.
     *
     * @param id the resource ID.
     * @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 a Fluid Relay server along with {@link Response}.
     */
    Response<FluidRelayServer> getByIdWithResponse(String id, Context context);

    /**
     * Delete a Fluid Relay server.
     *
     * @param id the resource ID.
     * @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.
     */
    void deleteById(String id);

    /**
     * Delete a Fluid Relay server.
     *
     * @param id the resource ID.
     * @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 Response}.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new FluidRelayServer resource.
     *
     * @param name resource name.
     * @return the first stage of the new FluidRelayServer definition.
     */
    FluidRelayServer.DefinitionStages.Blank define(String name);
}
