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

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of GitHubRepoes. */
public interface GitHubRepoes {
    /**
     * Returns a list of monitored GitHub repositories.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param gitHubConnectorName Name of the GitHub 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 paginated response with {@link PagedIterable}.
     */
    PagedIterable<GitHubRepo> listByConnector(String resourceGroupName, String gitHubConnectorName);

    /**
     * Returns a list of monitored GitHub repositories.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param gitHubConnectorName Name of the GitHub 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 paginated response with {@link PagedIterable}.
     */
    PagedIterable<GitHubRepo> listByConnector(String resourceGroupName, String gitHubConnectorName, Context context);

    /**
     * Returns a list of monitored GitHub repositories.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param gitHubConnectorName Name of the GitHub Connector.
     * @param gitHubOwnerName Name of the GitHub Owner.
     * @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}.
     */
    PagedIterable<GitHubRepo> list(String resourceGroupName, String gitHubConnectorName, String gitHubOwnerName);

    /**
     * Returns a list of monitored GitHub repositories.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param gitHubConnectorName Name of the GitHub Connector.
     * @param gitHubOwnerName Name of the GitHub Owner.
     * @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}.
     */
    PagedIterable<GitHubRepo> list(
        String resourceGroupName, String gitHubConnectorName, String gitHubOwnerName, Context context);

    /**
     * Returns a monitored GitHub repository.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param gitHubConnectorName Name of the GitHub Connector.
     * @param gitHubOwnerName Name of the GitHub Owner.
     * @param gitHubRepoName Name of the GitHub Repo.
     * @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 gitHub repo Proxy Resource along with {@link Response}.
     */
    Response<GitHubRepo> getWithResponse(
        String resourceGroupName,
        String gitHubConnectorName,
        String gitHubOwnerName,
        String gitHubRepoName,
        Context context);

    /**
     * Returns a monitored GitHub repository.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param gitHubConnectorName Name of the GitHub Connector.
     * @param gitHubOwnerName Name of the GitHub Owner.
     * @param gitHubRepoName Name of the GitHub Repo.
     * @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 gitHub repo Proxy Resource.
     */
    GitHubRepo get(String resourceGroupName, String gitHubConnectorName, String gitHubOwnerName, String gitHubRepoName);

    /**
     * Returns a monitored GitHub repository.
     *
     * @param id the resource ID.
     * @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 gitHub repo Proxy Resource along with {@link Response}.
     */
    GitHubRepo getById(String id);

    /**
     * Returns a monitored GitHub repository.
     *
     * @param id the resource ID.
     * @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 gitHub repo Proxy Resource along with {@link Response}.
     */
    Response<GitHubRepo> getByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new GitHubRepo resource.
     *
     * @param name resource name.
     * @return the first stage of the new GitHubRepo definition.
     */
    GitHubRepo.DefinitionStages.Blank define(String name);
}
