public static class

PullRequestSearchRequest.Builder

extends BuilderSupport
java.lang.Object
   ↳ com.atlassian.bitbucket.util.BuilderSupport
     ↳ com.atlassian.bitbucket.pull.PullRequestSearchRequest.Builder

Summary

[Expand]
Inherited Fields
From class com.atlassian.bitbucket.util.BuilderSupport
Public Constructors
Builder()
Public Methods
@Nonnull PullRequestSearchRequest build()
Assembles a new PullRequestSearchRequest from the provided values.
@Nonnull PullRequestSearchRequest.Builder closedSince(Date value)
When set, limits the pull requests to search for pull requests in the closed state (i.e.
@Nonnull PullRequestSearchRequest.Builder fromRefId(String value)
Limits the pull requests to search for by the branch the changes are coming from.
@Nonnull PullRequestSearchRequest.Builder fromRefIds(Iterable<String> values)
Limits the pull requests to search for by the branches the changes are coming from.
@Nonnull PullRequestSearchRequest.Builder fromRepositoryId(Integer value)
Limits the pull requests to search for by the repository the changes are coming from.
@Nonnull PullRequestSearchRequest.Builder order(PullRequestOrder value)
The order to return the search results in (defaults to NEWEST first).
@Nonnull PullRequestSearchRequest.Builder participant(PullRequestParticipantRequest value)
Limits the pull requests to search for by the participants they have.
@Nonnull PullRequestSearchRequest.Builder participants(Iterable<PullRequestParticipantRequest> values)
Limits the pull requests to search for by the participants they have.
@Nonnull PullRequestSearchRequest.Builder repositoryAndBranch(PullRequestDirection direction, Integer repositoryId, String branch)
Sets the repository and branches fields based on direction, added here as the use case is so common.
@Nonnull PullRequestSearchRequest.Builder state(PullRequestState value)
Restricts the search to a specified pull request state.
@Nonnull PullRequestSearchRequest.Builder toRefId(String value)
Limits the pull requests to search for by the branches the changes are going to.
@Nonnull PullRequestSearchRequest.Builder toRefIds(Iterable<String> values)
Limits the pull requests to search for by the branches the changes are going to.
@Nonnull PullRequestSearchRequest.Builder toRepositoryId(Integer value)
Limits the pull requests to search for by the repository the changes are going to.
@Nonnull PullRequestSearchRequest.Builder withProperties(boolean value)
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.util.BuilderSupport
From class java.lang.Object

Public Constructors

public Builder ()

Public Methods

@Nonnull public PullRequestSearchRequest build ()

Assembles a new PullRequestSearchRequest from the provided values.

Returns
  • a new pull request search request instance

@Nonnull public PullRequestSearchRequest.Builder closedSince (Date value)

When set, limits the pull requests to search for pull requests in the closed state (i.e. MERGED or DECLINED) where the closed timestamp is more recent than the specified date.

Parameters
value the closed since date
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder fromRefId (String value)

Limits the pull requests to search for by the branch the changes are coming from.

Parameters
value the branch id
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder fromRefIds (Iterable<String> values)

Limits the pull requests to search for by the branches the changes are coming from.

Parameters
values the branch ids
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder fromRepositoryId (Integer value)

Limits the pull requests to search for by the repository the changes are coming from.

Parameters
value the repository id to look for
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder order (PullRequestOrder value)

The order to return the search results in (defaults to NEWEST first).

Parameters
value required order
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder participant (PullRequestParticipantRequest value)

Limits the pull requests to search for by the participants they have.

Parameters
value the participant
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder participants (Iterable<PullRequestParticipantRequest> values)

Limits the pull requests to search for by the participants they have.

Parameters
values the participants
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder repositoryAndBranch (PullRequestDirection direction, Integer repositoryId, String branch)

Sets the repository and branches fields based on direction, added here as the use case is so common.

If OUTGOING is the direction the from repository and branch are set otherwise the to repository and branch are set.

Parameters
direction the pull request direction
repositoryId the repository to restrict by
branch the branch to restrict by
Returns
  • the current builder
Throws
IllegalStateException if the repositoryId has already been set to a different value

@Nonnull public PullRequestSearchRequest.Builder state (PullRequestState value)

Restricts the search to a specified pull request state.

Parameters
value the state to restrict to
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder toRefId (String value)

Limits the pull requests to search for by the branches the changes are going to.

Parameters
value the branch id
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder toRefIds (Iterable<String> values)

Limits the pull requests to search for by the branches the changes are going to.

Parameters
values the branch ids
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder toRepositoryId (Integer value)

Limits the pull requests to search for by the repository the changes are going to.

Parameters
value the repository id to restrict the search by
Returns
  • the current builder

@Nonnull public PullRequestSearchRequest.Builder withProperties (boolean value)

Parameters
value whether to fetch the properties for matching pull requests
Returns
  • the current builder