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

package com.azure.resourcemanager.networkcloud.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.networkcloud.fluent.models.ClusterManagerInner;
import com.azure.resourcemanager.networkcloud.models.ClusterManagerPatchParameters;

/** An instance of this class provides access to all the operations defined in ClusterManagersClient. */
public interface ClusterManagersClient {
    /**
     * List cluster managers in the subscription.
     *
     * <p>Get a list of cluster managers in the provided 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 a list of cluster managers in the provided subscription as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ClusterManagerInner> list();

    /**
     * List cluster managers in the subscription.
     *
     * <p>Get a list of cluster managers in the provided 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 a list of cluster managers in the provided subscription as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ClusterManagerInner> list(Context context);

    /**
     * List cluster managers in the resource group.
     *
     * <p>Get a list of cluster managers in the provided resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 cluster managers in the provided resource group as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ClusterManagerInner> listByResourceGroup(String resourceGroupName);

    /**
     * List cluster managers in the resource group.
     *
     * <p>Get a list of cluster managers in the provided resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 cluster managers in the provided resource group as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ClusterManagerInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Retrieve the cluster manager.
     *
     * <p>Get the properties of the provided cluster manager.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @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 properties of the provided cluster manager along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ClusterManagerInner> getByResourceGroupWithResponse(
        String resourceGroupName, String clusterManagerName, Context context);

    /**
     * Retrieve the cluster manager.
     *
     * <p>Get the properties of the provided cluster manager.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @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 properties of the provided cluster manager.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterManagerInner getByResourceGroup(String resourceGroupName, String clusterManagerName);

    /**
     * Create or update the cluster manager.
     *
     * <p>Create a new cluster manager or update properties of the cluster manager if it exists.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @param clusterManagerParameters The request body.
     * @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 clusterManager represents a control-plane to manage one or more
     *     on-premises clusters.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ClusterManagerInner>, ClusterManagerInner> beginCreateOrUpdate(
        String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters);

    /**
     * Create or update the cluster manager.
     *
     * <p>Create a new cluster manager or update properties of the cluster manager if it exists.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @param clusterManagerParameters The request body.
     * @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 clusterManager represents a control-plane to manage one or more
     *     on-premises clusters.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ClusterManagerInner>, ClusterManagerInner> beginCreateOrUpdate(
        String resourceGroupName,
        String clusterManagerName,
        ClusterManagerInner clusterManagerParameters,
        Context context);

    /**
     * Create or update the cluster manager.
     *
     * <p>Create a new cluster manager or update properties of the cluster manager if it exists.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @param clusterManagerParameters The request body.
     * @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 clusterManager represents a control-plane to manage one or more on-premises clusters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterManagerInner createOrUpdate(
        String resourceGroupName, String clusterManagerName, ClusterManagerInner clusterManagerParameters);

    /**
     * Create or update the cluster manager.
     *
     * <p>Create a new cluster manager or update properties of the cluster manager if it exists.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @param clusterManagerParameters The request body.
     * @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 clusterManager represents a control-plane to manage one or more on-premises clusters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterManagerInner createOrUpdate(
        String resourceGroupName,
        String clusterManagerName,
        ClusterManagerInner clusterManagerParameters,
        Context context);

    /**
     * Delete the cluster manager.
     *
     * <p>Delete the provided cluster manager.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @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 clusterManagerName);

    /**
     * Delete the cluster manager.
     *
     * <p>Delete the provided cluster manager.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @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 clusterManagerName, Context context);

    /**
     * Delete the cluster manager.
     *
     * <p>Delete the provided cluster manager.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @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 clusterManagerName);

    /**
     * Delete the cluster manager.
     *
     * <p>Delete the provided cluster manager.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @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 clusterManagerName, Context context);

    /**
     * Patch the cluster manager.
     *
     * <p>Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager.
     * Properties and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @param clusterManagerUpdateParameters The request body.
     * @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 clusterManager represents a control-plane to manage one or more on-premises clusters along with {@link
     *     Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ClusterManagerInner> updateWithResponse(
        String resourceGroupName,
        String clusterManagerName,
        ClusterManagerPatchParameters clusterManagerUpdateParameters,
        Context context);

    /**
     * Patch the cluster manager.
     *
     * <p>Patch properties of the provided cluster manager, or update the tags assigned to the cluster manager.
     * Properties and tag updates can be done independently.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param clusterManagerName The name of the cluster manager.
     * @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 clusterManager represents a control-plane to manage one or more on-premises clusters.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ClusterManagerInner update(String resourceGroupName, String clusterManagerName);
}
