// 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.ClusterInner;
import com.azure.resourcemanager.batchai.fluent.models.RemoteLoginInformationInner;
import com.azure.resourcemanager.batchai.models.ClusterCreateParameters;
import com.azure.resourcemanager.batchai.models.ClusterUpdateParameters;

/** An instance of this class provides access to all the operations defined in ClustersClient. */
public interface ClustersClient {
    /**
     * Creates a Cluster 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 clusterName The name of the cluster within the specified resource group. Cluster 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 the Cluster 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 information about a Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreate(
        String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters);

    /**
     * Creates a Cluster 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 clusterName The name of the cluster within the specified resource group. Cluster 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 the Cluster 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 information about a Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SyncPoller<PollResult<ClusterInner>, ClusterInner> beginCreate(
        String resourceGroupName,
        String workspaceName,
        String clusterName,
        ClusterCreateParameters parameters,
        Context context);

    /**
     * Creates a Cluster 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 clusterName The name of the cluster within the specified resource group. Cluster 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 the Cluster 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 information about a Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterInner create(
        String resourceGroupName, String workspaceName, String clusterName, ClusterCreateParameters parameters);

    /**
     * Creates a Cluster 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 clusterName The name of the cluster within the specified resource group. Cluster 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 the Cluster 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 information about a Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterInner create(
        String resourceGroupName,
        String workspaceName,
        String clusterName,
        ClusterCreateParameters parameters,
        Context context);

    /**
     * Updates properties of a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 Additional parameters for cluster update.
     * @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 Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterInner update(
        String resourceGroupName, String workspaceName, String clusterName, ClusterUpdateParameters parameters);

    /**
     * Updates properties of a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 Additional parameters for cluster update.
     * @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 Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ClusterInner> updateWithResponse(
        String resourceGroupName,
        String workspaceName,
        String clusterName,
        ClusterUpdateParameters parameters,
        Context context);

    /**
     * Deletes a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 clusterName);

    /**
     * Deletes a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 clusterName, Context context);

    /**
     * Deletes a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 clusterName);

    /**
     * Deletes a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 clusterName, Context context);

    /**
     * Gets information about a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterInner get(String resourceGroupName, String workspaceName, String clusterName);

    /**
     * Gets information about a Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 Cluster.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ClusterInner> getWithResponse(
        String resourceGroupName, String workspaceName, String clusterName, Context context);

    /**
     * Get the IP address, port of all the compute nodes in the Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 IP address, port of all the compute nodes in the Cluster.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RemoteLoginInformationInner> listRemoteLoginInformation(
        String resourceGroupName, String workspaceName, String clusterName);

    /**
     * Get the IP address, port of all the compute nodes in the Cluster.
     *
     * @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 clusterName The name of the cluster within the specified resource group. Cluster 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 IP address, port of all the compute nodes in the Cluster.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<RemoteLoginInformationInner> listRemoteLoginInformation(
        String resourceGroupName, String workspaceName, String clusterName, Context context);

    /**
     * Gets information about Clusters associated with 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.
     * @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 Clusters associated with the given Workspace.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ClusterInner> listByWorkspace(String resourceGroupName, String workspaceName);

    /**
     * Gets information about Clusters associated with 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 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 information about Clusters associated with the given Workspace.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ClusterInner> listByWorkspace(
        String resourceGroupName, String workspaceName, Integer maxResults, Context context);
}
