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

package com.azure.resourcemanager.securitydevops.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.securitydevops.fluent.models.AzureDevOpsConnectorInner;

/** An instance of this class provides access to all the operations defined in AzureDevOpsConnectorsClient. */
public interface AzureDevOpsConnectorsClient {
    /**
     * The listByResourceGroup operation.
     *
     * @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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AzureDevOpsConnectorInner> listByResourceGroup(String resourceGroupName);

    /**
     * The listByResourceGroup operation.
     *
     * @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 the paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<AzureDevOpsConnectorInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Returns a monitored AzureDevOps Connector resource for a given ID.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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<AzureDevOpsConnectorInner> getByResourceGroupWithResponse(
        String resourceGroupName, String azureDevOpsConnectorName, Context context);

    /**
     * Returns a monitored AzureDevOps Connector resource for a given ID.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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)
    AzureDevOpsConnectorInner getByResourceGroup(String resourceGroupName, String azureDevOpsConnectorName);

    /**
     * Creates or updates an Azure DevOps Connector.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsConnector Connector resource payload.
     * @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<AzureDevOpsConnectorInner>, AzureDevOpsConnectorInner> beginCreateOrUpdate(
        String resourceGroupName, String azureDevOpsConnectorName, AzureDevOpsConnectorInner azureDevOpsConnector);

    /**
     * Creates or updates an Azure DevOps Connector.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsConnector Connector resource payload.
     * @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<AzureDevOpsConnectorInner>, AzureDevOpsConnectorInner> beginCreateOrUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        AzureDevOpsConnectorInner azureDevOpsConnector,
        Context context);

    /**
     * Creates or updates an Azure DevOps Connector.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsConnector Connector resource payload.
     * @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)
    AzureDevOpsConnectorInner createOrUpdate(
        String resourceGroupName, String azureDevOpsConnectorName, AzureDevOpsConnectorInner azureDevOpsConnector);

    /**
     * Creates or updates an Azure DevOps Connector.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsConnector Connector resource payload.
     * @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)
    AzureDevOpsConnectorInner createOrUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        AzureDevOpsConnectorInner azureDevOpsConnector,
        Context context);

    /**
     * Update monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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<AzureDevOpsConnectorInner>, AzureDevOpsConnectorInner> beginUpdate(
        String resourceGroupName, String azureDevOpsConnectorName);

    /**
     * Update monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsConnector Connector resource payload.
     * @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<AzureDevOpsConnectorInner>, AzureDevOpsConnectorInner> beginUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        AzureDevOpsConnectorInner azureDevOpsConnector,
        Context context);

    /**
     * Update monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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)
    AzureDevOpsConnectorInner update(String resourceGroupName, String azureDevOpsConnectorName);

    /**
     * Update monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsConnector Connector resource payload.
     * @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)
    AzureDevOpsConnectorInner update(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        AzureDevOpsConnectorInner azureDevOpsConnector,
        Context context);

    /**
     * Delete monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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 azureDevOpsConnectorName);

    /**
     * Delete monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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 azureDevOpsConnectorName, Context context);

    /**
     * Delete monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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 azureDevOpsConnectorName);

    /**
     * Delete monitored AzureDevOps Connector details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @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 azureDevOpsConnectorName, Context context);

    /**
     * Returns a list of monitored AzureDevOps Connectors.
     *
     * @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<AzureDevOpsConnectorInner> list();

    /**
     * Returns a list of monitored AzureDevOps Connectors.
     *
     * @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<AzureDevOpsConnectorInner> list(Context context);
}
