using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
namespace Octokit
{
///
/// A client for GitHub's Pull Requests API.
///
///
/// See the Pull Requests API documentation for more information.
///
public interface IPullRequestsClient
{
///
/// Client for managing reviews.
///
IPullRequestReviewsClient Review { get; }
///
/// Client for managing review comments.
///
IPullRequestReviewCommentsClient ReviewComment { get; }
///
/// Client for managing review requests.
///
IPullRequestReviewRequestsClient ReviewRequest { get; }
///
/// Get a pull request by number.
///
///
/// http://developer.github.com/v3/pulls/#get-a-single-pull-request
///
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
Task Get(string owner, string name, int number);
///
/// Get a pull request by number.
///
///
/// http://developer.github.com/v3/pulls/#get-a-single-pull-request
///
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
Task Get(long repositoryId, int number);
///
/// Get all open pull requests for the repository.
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The owner of the repository
/// The name of the repository
Task> GetAllForRepository(string owner, string name);
///
/// Get all open pull requests for the repository.
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The Id of the repository
Task> GetAllForRepository(long repositoryId);
///
/// Get all open pull requests for the repository.
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The owner of the repository
/// The name of the repository
/// Options for changing the API response
Task> GetAllForRepository(string owner, string name, ApiOptions options);
///
/// Get all open pull requests for the repository.
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The Id of the repository
/// Options for changing the API response
Task> GetAllForRepository(long repositoryId, ApiOptions options);
///
/// Query pull requests for the repository based on criteria
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The owner of the repository
/// The name of the repository
/// Used to filter and sort the list of pull requests returned
Task> GetAllForRepository(string owner, string name, PullRequestRequest request);
///
/// Query pull requests for the repository based on criteria
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The Id of the repository
/// Used to filter and sort the list of pull requests returned
Task> GetAllForRepository(long repositoryId, PullRequestRequest request);
///
/// Query pull requests for the repository based on criteria
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The owner of the repository
/// The name of the repository
/// Used to filter and sort the list of pull requests returned
/// Options for changing the API response
Task> GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options);
///
/// Query pull requests for the repository based on criteria
///
///
/// http://developer.github.com/v3/pulls/#list-pull-requests
///
/// The Id of the repository
/// Used to filter and sort the list of pull requests returned
/// Options for changing the API response
Task> GetAllForRepository(long repositoryId, PullRequestRequest request, ApiOptions options);
///
/// Create a pull request for the specified repository.
///
/// http://developer.github.com/v3/pulls/#create-a-pull-request
/// The owner of the repository
/// The name of the repository
/// A instance describing the new PullRequest to create
Task Create(string owner, string name, NewPullRequest newPullRequest);
///
/// Create a pull request for the specified repository.
///
/// http://developer.github.com/v3/pulls/#create-a-pull-request
/// The Id of the repository
/// A instance describing the new PullRequest to create
Task Create(long repositoryId, NewPullRequest newPullRequest);
///
/// Create a pull request for the specified repository.
///
/// http://developer.github.com/v3/pulls/#update-a-pull-request
/// The owner of the repository
/// The name of the repository
/// The PullRequest number
/// An instance describing the changes to make to the PullRequest
///
Task Update(string owner, string name, int number, PullRequestUpdate pullRequestUpdate);
///
/// Create a pull request for the specified repository.
///
/// http://developer.github.com/v3/pulls/#update-a-pull-request
/// The Id of the repository
/// The PullRequest number
/// An instance describing the changes to make to the PullRequest
///
Task Update(long repositoryId, int number, PullRequestUpdate pullRequestUpdate);
///
/// Merge a pull request.
///
/// http://developer.github.com/v3/pulls/#merge-a-pull-request-merge-buttontrade
/// The owner of the repository
/// The name of the repository
/// The pull request number
/// A instance describing a pull request merge
Task Merge(string owner, string name, int number, MergePullRequest mergePullRequest);
///
/// Merge a pull request.
///
/// http://developer.github.com/v3/pulls/#merge-a-pull-request-merge-buttontrade
/// The Id of the repository
/// The pull request number
/// A instance describing a pull request merge
Task Merge(long repositoryId, int number, MergePullRequest mergePullRequest);
///
/// Get the pull request merge status.
///
/// http://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged
/// The owner of the repository
/// The name of the repository
/// The pull request number
Task Merged(string owner, string name, int number);
///
/// Get the pull request merge status.
///
/// http://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged
/// The Id of the repository
/// The pull request number
Task Merged(long repositoryId, int number);
///
/// Get the list of commits on a pull request.
///
/// http://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
/// The owner of the repository
/// The name of the repository
/// The pull request number
Task> Commits(string owner, string name, int number);
///
/// Get the list of commits on a pull request.
///
/// http://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
/// The Id of the repository
/// The pull request number
Task> Commits(long repositoryId, int number);
///
/// Get the list of files on a pull request.
///
/// https://developer.github.com/v3/pulls/#list-pull-requests-files
/// The owner of the repository
/// The name of the repository
/// The pull request number
Task> Files(string owner, string name, int number);
///
/// Get the list of files on a pull request.
///
/// https://developer.github.com/v3/pulls/#list-pull-requests-files
/// The Id of the repository
/// The pull request number
Task> Files(long repositoryId, int number);
}
}