// 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.AzureDevOpsProjectInner;

/** An instance of this class provides access to all the operations defined in AzureDevOpsProjectsClient. */
public interface AzureDevOpsProjectsClient {
    /**
     * The list operation.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @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<AzureDevOpsProjectInner> list(
        String resourceGroupName, String azureDevOpsConnectorName, String azureDevOpsOrgName);

    /**
     * The list operation.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @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<AzureDevOpsProjectInner> list(
        String resourceGroupName, String azureDevOpsConnectorName, String azureDevOpsOrgName, Context context);

    /**
     * Returns a monitored AzureDevOps Project 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 azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @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 azure DevOps Project Proxy Resource along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<AzureDevOpsProjectInner> getWithResponse(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName,
        Context context);

    /**
     * Returns a monitored AzureDevOps Project 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 azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AzureDevOpsProjectInner get(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName);

    /**
     * Creates or updates an Azure DevOps Project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @param azureDevOpsProject Azure DevOps Org 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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<AzureDevOpsProjectInner>, AzureDevOpsProjectInner> beginCreateOrUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName,
        AzureDevOpsProjectInner azureDevOpsProject);

    /**
     * Creates or updates an Azure DevOps Project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @param azureDevOpsProject Azure DevOps Org 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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<AzureDevOpsProjectInner>, AzureDevOpsProjectInner> beginCreateOrUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName,
        AzureDevOpsProjectInner azureDevOpsProject,
        Context context);

    /**
     * Creates or updates an Azure DevOps Project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @param azureDevOpsProject Azure DevOps Org 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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AzureDevOpsProjectInner createOrUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName,
        AzureDevOpsProjectInner azureDevOpsProject);

    /**
     * Creates or updates an Azure DevOps Project.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @param azureDevOpsProject Azure DevOps Org 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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AzureDevOpsProjectInner createOrUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName,
        AzureDevOpsProjectInner azureDevOpsProject,
        Context context);

    /**
     * Update monitored AzureDevOps Project details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<AzureDevOpsProjectInner>, AzureDevOpsProjectInner> beginUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName);

    /**
     * Update monitored AzureDevOps Project details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @param azureDevOpsProject Azure DevOps Org 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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<AzureDevOpsProjectInner>, AzureDevOpsProjectInner> beginUpdate(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName,
        AzureDevOpsProjectInner azureDevOpsProject,
        Context context);

    /**
     * Update monitored AzureDevOps Project details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AzureDevOpsProjectInner update(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName);

    /**
     * Update monitored AzureDevOps Project details.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param azureDevOpsConnectorName Name of the AzureDevOps Connector.
     * @param azureDevOpsOrgName Name of the AzureDevOps Org.
     * @param azureDevOpsProjectName Name of the AzureDevOps Project.
     * @param azureDevOpsProject Azure DevOps Org 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 azure DevOps Project Proxy Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    AzureDevOpsProjectInner update(
        String resourceGroupName,
        String azureDevOpsConnectorName,
        String azureDevOpsOrgName,
        String azureDevOpsProjectName,
        AzureDevOpsProjectInner azureDevOpsProject,
        Context context);
}
