Class PullRequestsRequestBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Represents the query parameters.static class
Request configuration object for the query parameters.static class
Request configuration object for the query parameters.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
ConstructorDescriptionPullRequestsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(String repositoryId, GitPullRequest gitPullRequest, Boolean supportsIterations) Create a pull request.createAsync
(String repositoryId, GitPullRequest gitPullRequest, Boolean supportsIterations) Create a pull request.Retrieve a pull request.get
(String repositoryName, int pullRequestId, Consumer<PullRequestsRequestBuilder.RequestConfiguration> requestConfiguration) Retrieve a pull request.Retrieve a pull request.getAsync
(String repositoryName, int pullRequestId, Consumer<PullRequestsRequestBuilder.RequestConfiguration> requestConfiguration) Retrieve a pull request.getById
(int pullRequestId) Retrieve a pull request.getByIdAsync
(int pullRequestId) Retrieve a pull request.list()
Gets all pull requests from a project.Retrieve all pull requests from a repositorylist
(String repositoryName, Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) Retrieve all pull requests from a repositorylist
(Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) Gets all pull requests from a project.Gets all pull requests from a project.Retrieve all pull requests from a repositorylistAsync
(String repositoryName, Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) Retrieve all pull requests from a repositorylistAsync
(Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) Gets all pull requests from a project.update
(String repositoryId, int pullRequestId, GitPullRequest gitPullRequest) Update a pull requestupdateAsync
(String repositoryId, int pullRequestId, GitPullRequest gitPullRequest) Update a pull requestMethods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
PullRequestsRequestBuilder
public PullRequestsRequestBuilder(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<GitPullRequest> createAsync(String repositoryId, GitPullRequest gitPullRequest, Boolean supportsIterations) throws AzDException Create a pull request.- Parameters:
repositoryId
- id of the repository.gitPullRequest
- aGitPullRequest
object.supportsIterations
- If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed.- Returns:
- Git pull request object
GitPullRequest
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<GitPullRequest> getAsync(String repositoryName, int pullRequestId) throws AzDException Retrieve a pull request.- Parameters:
repositoryName
- The repository name of the pull request's target branch.pullRequestId
- The ID of the pull request to retrieve.- Returns:
GitPullRequest
object- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<GitPullRequest> getAsync(String repositoryName, int pullRequestId, Consumer<PullRequestsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieve a pull request.- Parameters:
repositoryName
- The repository name of the pull request's target branch.pullRequestId
- The ID of the pull request to retrieve.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
GitPullRequest
object- Throws:
AzDException
- Default Api Exception handler.
-
getByIdAsync
Retrieve a pull request.- Parameters:
pullRequestId
- The ID of the pull request to retrieve.- Returns:
GitPullRequest
object- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
Retrieve all pull requests from a repository- Parameters:
repositoryName
- specify the repository name- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<PullRequests> listAsync(String repositoryName, Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Retrieve all pull requests from a repository- Parameters:
repositoryName
- specify the repository namerequestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
Gets all pull requests from a project.- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<PullRequests> listAsync(Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Gets all pull requests from a project.- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<GitPullRequest> updateAsync(String repositoryId, int pullRequestId, GitPullRequest gitPullRequest) throws AzDException Update a pull requestThese are the properties that can be updated with the API: Status Title Description (up to 4000 characters) CompletionOptions MergeOptions AutoCompleteSetBy.Id TargetRefName (when the PR retargeting feature is enabled) Attempting to update other properties outside of this list will either cause the server to throw an InvalidArgumentValueException, or to silently ignore the update.
- Parameters:
repositoryId
- The repository ID of the pull request's target branch.pullRequestId
- ID of the pull request to update.gitPullRequest
- Git pull request object to update.- Returns:
- GitPullRequest Object
GitPullRequest
- Throws:
AzDException
- Default Api Exception handler.
-
create
public GitPullRequest create(String repositoryId, GitPullRequest gitPullRequest, Boolean supportsIterations) throws AzDException Create a pull request.- Parameters:
repositoryId
- id of the repository.gitPullRequest
- aGitPullRequest
object.supportsIterations
- If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed.- Returns:
- Git pull request object
GitPullRequest
- Throws:
AzDException
- Default Api Exception handler.
-
get
Retrieve a pull request.- Parameters:
repositoryName
- The repository name of the pull request's target branch.pullRequestId
- The ID of the pull request to retrieve.- Returns:
GitPullRequest
object- Throws:
AzDException
- Default Api Exception handler.
-
get
public GitPullRequest get(String repositoryName, int pullRequestId, Consumer<PullRequestsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieve a pull request.- Parameters:
repositoryName
- The repository name of the pull request's target branch.pullRequestId
- The ID of the pull request to retrieve.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
GitPullRequest
object- Throws:
AzDException
- Default Api Exception handler.
-
getById
Retrieve a pull request.- Parameters:
pullRequestId
- The ID of the pull request to retrieve.- Returns:
GitPullRequest
object- Throws:
AzDException
- Default Api Exception handler.
-
list
Retrieve all pull requests from a repository- Parameters:
repositoryName
- specify the repository name- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
list
public PullRequests list(String repositoryName, Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Retrieve all pull requests from a repository- Parameters:
repositoryName
- specify the repository namerequestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
list
Gets all pull requests from a project.- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
list
public PullRequests list(Consumer<PullRequestsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Gets all pull requests from a project.- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
PullRequests
object- Throws:
AzDException
- Default Api Exception handler.
-
update
public GitPullRequest update(String repositoryId, int pullRequestId, GitPullRequest gitPullRequest) throws AzDException Update a pull requestThese are the properties that can be updated with the API: Status Title Description (up to 4000 characters) CompletionOptions MergeOptions AutoCompleteSetBy.Id TargetRefName (when the PR retargeting feature is enabled) Attempting to update other properties outside of this list will either cause the server to throw an InvalidArgumentValueException, or to silently ignore the update.
- Parameters:
repositoryId
- The repository ID of the pull request's target branch.pullRequestId
- ID of the pull request to update.gitPullRequest
- Git pull request object to update.- Returns:
- GitPullRequest Object
GitPullRequest
- Throws:
AzDException
- Default Api Exception handler.
-