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

package com.azure.resourcemanager.batchai.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.batchai.fluent.models.FileServerInner;
import com.azure.resourcemanager.batchai.models.FileServerCreateParameters;

/** An instance of this class provides access to all the operations defined in FileServersClient. */
public interface FileServersClient {
    /**
     * Creates a File Server in the given workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @param parameters The parameters to provide for File Server creation.
     * @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 file Server information.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<FileServerInner>, FileServerInner> beginCreate(
        String resourceGroupName, String workspaceName, String fileServerName, FileServerCreateParameters parameters);

    /**
     * Creates a File Server in the given workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @param parameters The parameters to provide for File Server creation.
     * @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 file Server information.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<FileServerInner>, FileServerInner> beginCreate(
        String resourceGroupName,
        String workspaceName,
        String fileServerName,
        FileServerCreateParameters parameters,
        Context context);

    /**
     * Creates a File Server in the given workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @param parameters The parameters to provide for File Server creation.
     * @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 file Server information.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    FileServerInner create(
        String resourceGroupName, String workspaceName, String fileServerName, FileServerCreateParameters parameters);

    /**
     * Creates a File Server in the given workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @param parameters The parameters to provide for File Server creation.
     * @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 file Server information.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    FileServerInner create(
        String resourceGroupName,
        String workspaceName,
        String fileServerName,
        FileServerCreateParameters parameters,
        Context context);

    /**
     * Deletes a File Server.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @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 completion.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String workspaceName, String fileServerName);

    /**
     * Deletes a File Server.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @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 completion.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String workspaceName, String fileServerName, Context context);

    /**
     * Deletes a File Server.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @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 workspaceName, String fileServerName);

    /**
     * Deletes a File Server.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @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 workspaceName, String fileServerName, Context context);

    /**
     * Gets information about a File Server.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @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 information about a File Server.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    FileServerInner get(String resourceGroupName, String workspaceName, String fileServerName);

    /**
     * Gets information about a File Server.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param fileServerName The name of the file server within the specified resource group. File server names can only
     *     contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be
     *     from 1 through 64 characters long.
     * @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 information about a File Server.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<FileServerInner> getWithResponse(
        String resourceGroupName, String workspaceName, String fileServerName, Context context);

    /**
     * Gets a list of File Servers associated with the specified workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @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 list of File Servers associated with the specified workspace.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<FileServerInner> listByWorkspace(String resourceGroupName, String workspaceName);

    /**
     * Gets a list of File Servers associated with the specified workspace.
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
     *     characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long.
     * @param maxResults The maximum number of items to return in the response. A maximum of 1000 files can be returned.
     * @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 list of File Servers associated with the specified workspace.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<FileServerInner> listByWorkspace(
        String resourceGroupName, String workspaceName, Integer maxResults, Context context);
}
