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

package com.azure.resourcemanager.devhub.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.util.Context;
import com.azure.resourcemanager.devhub.fluent.models.DeleteWorkflowResponseInner;
import com.azure.resourcemanager.devhub.fluent.models.WorkflowInner;
import com.azure.resourcemanager.devhub.models.TagsObject;

/** An instance of this class provides access to all the operations defined in WorkflowsClient. */
public interface WorkflowsClient {
    /**
     * Gets a list of workflows associated with the specified 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 workflows associated with the specified subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<WorkflowInner> list();

    /**
     * Gets a list of workflows associated with the specified 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 workflows associated with the specified subscription as paginated response with {@link
     *     PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<WorkflowInner> list(Context context);

    /**
     * Gets a list of workflows within a 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 workflows within a resource group as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<WorkflowInner> listByResourceGroup(String resourceGroupName);

    /**
     * Gets a list of workflows within a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param managedClusterResource The ManagedCluster resource associated with the workflows.
     * @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 workflows within a resource group as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<WorkflowInner> listByResourceGroup(
        String resourceGroupName, String managedClusterResource, Context context);

    /**
     * Gets a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow 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 a workflow along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<WorkflowInner> getByResourceGroupWithResponse(
        String resourceGroupName, String workflowName, Context context);

    /**
     * Gets a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow 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 a workflow.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    WorkflowInner getByResourceGroup(String resourceGroupName, String workflowName);

    /**
     * Creates or updates a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow resource.
     * @param parameters Resource representation of a workflow.
     * @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 workflow along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<WorkflowInner> createOrUpdateWithResponse(
        String resourceGroupName, String workflowName, WorkflowInner parameters, Context context);

    /**
     * Creates or updates a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow resource.
     * @param parameters Resource representation of a workflow.
     * @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 workflow.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    WorkflowInner createOrUpdate(String resourceGroupName, String workflowName, WorkflowInner parameters);

    /**
     * Deletes a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow 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 delete response if content must be provided on delete operation along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<DeleteWorkflowResponseInner> deleteWithResponse(
        String resourceGroupName, String workflowName, Context context);

    /**
     * Deletes a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow 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 delete response if content must be provided on delete operation.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DeleteWorkflowResponseInner delete(String resourceGroupName, String workflowName);

    /**
     * Updates tags on a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow resource.
     * @param parameters Parameters supplied to the Update Workflow Tags operation.
     * @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 workflow along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<WorkflowInner> updateTagsWithResponse(
        String resourceGroupName, String workflowName, TagsObject parameters, Context context);

    /**
     * Updates tags on a workflow.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param workflowName The name of the workflow resource.
     * @param parameters Parameters supplied to the Update Workflow Tags 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 workflow.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    WorkflowInner updateTags(String resourceGroupName, String workflowName, TagsObject parameters);
}
