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

package com.azure.resourcemanager.devspaces.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.devspaces.fluent.models.ControllerConnectionDetailsListInner;
import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner;
import com.azure.resourcemanager.devspaces.models.ControllerUpdateParameters;
import com.azure.resourcemanager.devspaces.models.ListConnectionDetailsParameters;

/** An instance of this class provides access to all the operations defined in ControllersClient. */
public interface ControllersClient {
    /**
     * Gets an Azure Dev Spaces Controller.
     *
     * <p>Gets the properties for an Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of 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 the properties for an Azure Dev Spaces Controller along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ControllerInner> getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);

    /**
     * Gets an Azure Dev Spaces Controller.
     *
     * <p>Gets the properties for an Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of 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 the properties for an Azure Dev Spaces Controller.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ControllerInner getByResourceGroup(String resourceGroupName, String name);

    /**
     * Creates an Azure Dev Spaces Controller.
     *
     * <p>Creates an Azure Dev Spaces Controller with the specified create parameters.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param controller Controller create parameters.
     * @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<ControllerInner>, ControllerInner> beginCreate(
        String resourceGroupName, String name, ControllerInner controller);

    /**
     * Creates an Azure Dev Spaces Controller.
     *
     * <p>Creates an Azure Dev Spaces Controller with the specified create parameters.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param controller Controller create parameters.
     * @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<ControllerInner>, ControllerInner> beginCreate(
        String resourceGroupName, String name, ControllerInner controller, Context context);

    /**
     * Creates an Azure Dev Spaces Controller.
     *
     * <p>Creates an Azure Dev Spaces Controller with the specified create parameters.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param controller Controller create parameters.
     * @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)
    ControllerInner create(String resourceGroupName, String name, ControllerInner controller);

    /**
     * Creates an Azure Dev Spaces Controller.
     *
     * <p>Creates an Azure Dev Spaces Controller with the specified create parameters.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param controller Controller create parameters.
     * @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)
    ControllerInner create(String resourceGroupName, String name, ControllerInner controller, Context context);

    /**
     * Deletes an Azure Dev Spaces Controller.
     *
     * <p>Deletes an existing Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name);

    /**
     * Deletes an Azure Dev Spaces Controller.
     *
     * <p>Deletes an existing Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of 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 the {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String name, Context context);

    /**
     * Deletes an Azure Dev Spaces Controller.
     *
     * <p>Deletes an existing Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String name);

    /**
     * Deletes an Azure Dev Spaces Controller.
     *
     * <p>Deletes an existing Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String name, Context context);

    /**
     * Updates an Azure Dev Spaces Controller.
     *
     * <p>Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller.
     * @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 body along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ControllerInner> updateWithResponse(
        String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters, Context context);

    /**
     * Updates an Azure Dev Spaces Controller.
     *
     * <p>Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller.
     * @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)
    ControllerInner update(
        String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters);

    /**
     * Lists the Azure Dev Spaces Controllers in a resource group.
     *
     * <p>Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
     * subscription.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @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 paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ControllerInner> listByResourceGroup(String resourceGroupName);

    /**
     * Lists the Azure Dev Spaces Controllers in a resource group.
     *
     * <p>Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
     * subscription.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @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 paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ControllerInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Lists the Azure Dev Spaces Controllers in a subscription.
     *
     * <p>Lists all the Azure Dev Spaces Controllers with their properties in the 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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ControllerInner> list();

    /**
     * Lists the Azure Dev Spaces Controllers in a subscription.
     *
     * <p>Lists all the Azure Dev Spaces Controllers with their properties in the 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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ControllerInner> list(Context context);

    /**
     * Lists connection details for an Azure Dev Spaces Controller.
     *
     * <p>Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller.
     * @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 body along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ControllerConnectionDetailsListInner> listConnectionDetailsWithResponse(
        String resourceGroupName,
        String name,
        ListConnectionDetailsParameters listConnectionDetailsParameters,
        Context context);

    /**
     * Lists connection details for an Azure Dev Spaces Controller.
     *
     * <p>Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
     *
     * @param resourceGroupName Resource group to which the resource belongs.
     * @param name Name of the resource.
     * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller.
     * @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)
    ControllerConnectionDetailsListInner listConnectionDetails(
        String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters);
}
