Class PullRequestLabelsRequestBuilder

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

public class PullRequestLabelsRequestBuilder extends BaseRequestBuilder
Request builder to manage pull request labels Api.
  • 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

      public Void delete(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.
    • 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

      public WebApiTagDefinitions list(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.