Package org.azd.git.pullrequest
Class PullRequestLabelsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.pullrequest.PullRequestLabelsRequestBuilder
Request builder to manage pull request labels 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
ConstructorDescriptionPullRequestLabelsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionCreate a label for a specified pull request.createAsync
(String repositoryName, int pullRequestId, String labelName) Create a label for a specified pull request.Removes a label from the set of those assigned to the pull request.deleteAsync
(String repositoryName, int pullRequestId, String labelName) Removes a label from the set of those assigned to the pull request.Retrieves a single label that has been assigned to a pull request.Retrieves a single label that has been assigned to a pull request.Get all the labels assigned to a pull request.Get all the labels assigned to a pull request.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
PullRequestLabelsRequestBuilder
public PullRequestLabelsRequestBuilder(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<WebApiTagDefinition> createAsync(String repositoryName, int pullRequestId, String labelName) throws AzDException Create a label for a specified pull request. The only required field is the name of the new label.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.labelName
- tag/label name- Returns:
- WebApi tag object
WebApiTagDefinition
- Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
public CompletableFuture<Void> deleteAsync(String repositoryName, int pullRequestId, String labelName) throws AzDException Removes a label from the set of those assigned to the pull request.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.labelName
- tag/label name- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<WebApiTagDefinition> getAsync(String repositoryName, int pullRequestId, String labelName) throws AzDException Retrieves a single label that has been assigned to a pull request.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.labelName
- tag/label name- Returns:
- WebApi tag object
WebApiTagDefinition
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<WebApiTagDefinitions> listAsync(String repositoryName, int pullRequestId) throws AzDException Get all the labels assigned to a pull request.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.- Returns:
- List of WebApi tag object
WebApiTagDefinitions
- Throws:
AzDException
- Default Api Exception handler.
-
create
public WebApiTagDefinition create(String repositoryName, int pullRequestId, String labelName) throws AzDException Create a label for a specified pull request. The only required field is the name of the new label.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.labelName
- tag/label name- Returns:
- WebApi tag object
WebApiTagDefinition
- Throws:
AzDException
- Default Api Exception handler.
-
delete
Removes a label from the set of those assigned to the pull request.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.labelName
- tag/label name- Throws:
AzDException
- Default Api Exception handler.
-
get
public WebApiTagDefinition get(String repositoryName, int pullRequestId, String labelName) throws AzDException Retrieves a single label that has been assigned to a pull request.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.labelName
- tag/label name- Returns:
- WebApi tag object
WebApiTagDefinition
- Throws:
AzDException
- Default Api Exception handler.
-
list
Get all the labels assigned to a pull request.- Parameters:
repositoryName
- The repository name of the pull request’s target branch.pullRequestId
- ID of the pull request.- Returns:
- List of WebApi tag object
WebApiTagDefinitions
- Throws:
AzDException
- Default Api Exception handler.
-