Package org.azd.git.pullrequest
Class PullRequestReviewersRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.pullrequest.PullRequestReviewersRequestBuilder
Request builder to manage pull request reviewers Api.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionPullRequestReviewersRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) Add a reviewer to a pull request or cast a vote.Add reviewers to a pull request.create
(int pullRequestId, String repositoryId, IdentityRefWithVote identityRefWithVote) Add an un-materialized identity to the reviewers of a pull request.createAsync
(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) Add a reviewer to a pull request or cast a vote.createAsync
(int pullRequestId, String repositoryId, List<Author> reviewers) Add reviewers to a pull request.createAsync
(int pullRequestId, String repositoryId, IdentityRefWithVote identityRefWithVote) Add an un-materialized identity to the reviewers of a pull request.Remove a reviewer from a pull request.deleteAsync
(int pullRequestId, String repositoryId, String reviewerId) Remove a reviewer from a pull request.Retrieve information about a particular reviewer on a pull requestRetrieve information about a particular reviewer on a pull requestRetrieve the reviewers for a pull requestRetrieve the reviewers for a pull requestupdate
(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) Edit a reviewer entry.update
(int pullRequestId, String repositoryId, List<IdentityRefWithVote> identityRefWithVotes) Reset the votes of multiple reviewers on a pull request.updateAsync
(int pullRequestId, String repositoryId, String reviewerId, IdentityRefWithVote identityRefWithVote) Edit a reviewer entry.updateAsync
(int pullRequestId, String repositoryId, List<IdentityRefWithVote> identityRefWithVotes) Reset the votes of multiple reviewers on a pull request.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
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
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
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.
-