Class PullRequestReviewersRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.pullrequest.PullRequestReviewersRequestBuilder

public class PullRequestReviewersRequestBuilder extends BaseRequestBuilder
Request builder to manage pull request reviewers Api.
  • Constructor Details

    • PullRequestReviewersRequestBuilder

      public PullRequestReviewersRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • createAsync

      public CompletableFuture<IdentityRefWithVote> createAsync(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) throws AzDException
      Add a reviewer to a pull request or cast a vote.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      identityRefWithVote - Identity reference object to add a reviewer or cast a vote to the pull request.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • createAsync

      public CompletableFuture<PullRequestReviewers> createAsync(int pullRequestId, String repositoryId, List<Author> reviewers) throws AzDException
      Add reviewers to a pull request.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewers - Reviewers to add to the pull request.
      Returns:
      PullRequestReviewers PullRequestReviewers
      Throws:
      AzDException - Default Api Exception handler.
    • createAsync

      public CompletableFuture<IdentityRefWithVote> createAsync(int pullRequestId, String repositoryId, IdentityRefWithVote identityRefWithVote) throws AzDException
      Add an un-materialized identity to the reviewers of a pull request.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      identityRefWithVote - Identity reference object to add a reviewer or cast a vote to the pull request.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • deleteAsync

      public CompletableFuture<Void> deleteAsync(int pullRequestId, String repositoryId, String reviewerId) throws AzDException
      Remove a reviewer from a pull request.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      Throws:
      AzDException - Default Api Exception handler.
    • getAsync

      public CompletableFuture<IdentityRefWithVote> getAsync(int pullRequestId, String repositoryId, String reviewerId) throws AzDException
      Retrieve information about a particular reviewer on a pull request
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • listAsync

      public CompletableFuture<PullRequestReviewers> listAsync(int pullRequestId, String repositoryId) throws AzDException
      Retrieve the reviewers for a pull request
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      Returns:
      List of PullRequestReviewer PullRequestReviewers
      Throws:
      AzDException - Default Api Exception handler.
    • updateAsync

      public CompletableFuture<IdentityRefWithVote> updateAsync(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) throws AzDException
      Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      identityRefWithVote - Identity reference object to update.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • updateAsync

      public CompletableFuture<Void> updateAsync(int pullRequestId, String repositoryId, List<IdentityRefWithVote> identityRefWithVotes) throws AzDException
      Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      identityRefWithVotes - Identity reference collection to update.
      Throws:
      AzDException - Default Api Exception handler.
    • create

      public IdentityRefWithVote create(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) throws AzDException
      Add a reviewer to a pull request or cast a vote.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      identityRefWithVote - Identity reference object to add a reviewer or cast a vote to the pull request.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • create

      public PullRequestReviewers create(int pullRequestId, String repositoryId, List<Author> reviewers) throws AzDException
      Add reviewers to a pull request.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewers - Reviewers to add to the pull request.
      Returns:
      PullRequestReviewers PullRequestReviewers
      Throws:
      AzDException - Default Api Exception handler.
    • create

      public IdentityRefWithVote create(int pullRequestId, String repositoryId, IdentityRefWithVote identityRefWithVote) throws AzDException
      Add an un-materialized identity to the reviewers of a pull request.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      identityRefWithVote - Identity reference object to add a reviewer or cast a vote to the pull request.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • delete

      public Void delete(int pullRequestId, String repositoryId, String reviewerId) throws AzDException
      Remove a reviewer from a pull request.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      Throws:
      AzDException - Default Api Exception handler.
    • get

      public IdentityRefWithVote get(int pullRequestId, String repositoryId, String reviewerId) throws AzDException
      Retrieve information about a particular reviewer on a pull request
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • list

      public PullRequestReviewers list(int pullRequestId, String repositoryId) throws AzDException
      Retrieve the reviewers for a pull request
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      Returns:
      List of PullRequestReviewer PullRequestReviewers
      Throws:
      AzDException - Default Api Exception handler.
    • update

      public IdentityRefWithVote update(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) throws AzDException
      Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      reviewerId - ID of the reviewer.
      identityRefWithVote - Identity reference object to update.
      Returns:
      PullRequestReviewer IdentityRefWithVote
      Throws:
      AzDException - Default Api Exception handler.
    • update

      public Void update(int pullRequestId, String repositoryId, List<IdentityRefWithVote> identityRefWithVotes) throws AzDException
      Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names.
      Parameters:
      pullRequestId - ID of the pull request.
      repositoryId - The repository id of the pull request's target branch.
      identityRefWithVotes - Identity reference collection to update.
      Throws:
      AzDException - Default Api Exception handler.