public static class PullRequestSearchRequest.Builder extends BuilderSupport
NOT_BLANK
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PullRequestSearchRequest |
build()
Assembles a new
PullRequestSearchRequest from the provided values. |
PullRequestSearchRequest.Builder |
closedSince(Date value)
When set, limits the pull requests to search for pull requests in the closed state (i.e.
|
PullRequestSearchRequest.Builder |
filterText(String value)
Limits the search to pull requests where the title or description contains the
value . |
PullRequestSearchRequest.Builder |
fromRefId(String value)
Limits the pull requests to search for by the branch the changes are coming from.
|
PullRequestSearchRequest.Builder |
fromRefIds(Iterable<String> values)
Limits the pull requests to search for by the branches the changes are coming from.
|
PullRequestSearchRequest.Builder |
fromRepositoryId(Integer value)
Limits the pull requests to search for by the repository the changes are coming from.
|
PullRequestSearchRequest.Builder |
order(PullRequestOrder value)
The
order to return the search results in (defaults to
NEWEST first ). |
PullRequestSearchRequest.Builder |
participant(PullRequestParticipantRequest value)
Limits the pull requests to search for by the participants they have.
|
PullRequestSearchRequest.Builder |
participants(Iterable<PullRequestParticipantRequest> values)
Limits the pull requests to search for by the participants they have.
|
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.
|
PullRequestSearchRequest.Builder |
state(PullRequestState value)
Restricts the search to a specified
pull request state . |
PullRequestSearchRequest.Builder |
toRefId(String value)
Limits the pull requests to search for by the branches the changes are going to.
|
PullRequestSearchRequest.Builder |
toRefIds(Iterable<String> values)
Limits the pull requests to search for by the branches the changes are going to.
|
PullRequestSearchRequest.Builder |
toRepositoryId(Integer value)
Limits the pull requests to search for by the repository the changes are going to.
|
PullRequestSearchRequest.Builder |
updatedSince(Date value)
When set, limits the pull requests to search for pull requests where the updated timestamp is
more recent than the specified date.
|
PullRequestSearchRequest.Builder |
withDescription(boolean value) |
PullRequestSearchRequest.Builder |
withProperties(boolean value) |
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
@Nonnull public PullRequestSearchRequest build()
PullRequestSearchRequest
from the provided values.@Nonnull public PullRequestSearchRequest.Builder closedSince(@Nullable Date value)
PullRequestState.MERGED
or PullRequestState.DECLINED
) where the closed timestamp is
more recent than the specified date.value
- the closed since date@Nonnull public PullRequestSearchRequest.Builder repositoryAndBranch(@Nullable PullRequestDirection direction, @Nullable Integer repositoryId, @Nullable String branch)
If OUTGOING
is the direction the from repository and branch are set
otherwise the to repository and branch are set.
direction
- the pull request directionrepositoryId
- the repository to restrict bybranch
- the branch to restrict byIllegalStateException
- if the repositoryId has already been set to a different value@Nonnull public PullRequestSearchRequest.Builder filterText(@Nullable String value)
value
.value
- the filter string@Nonnull public PullRequestSearchRequest.Builder fromRepositoryId(@Nullable Integer value)
value
- the repository ID to look for@Nonnull public PullRequestSearchRequest.Builder fromRefId(@Nullable String value)
value
- the branch id@Nonnull public PullRequestSearchRequest.Builder fromRefIds(@Nullable Iterable<String> values)
values
- the branch ids@Nonnull public PullRequestSearchRequest.Builder order(@Nullable PullRequestOrder value)
order
to return the search results in (defaults to
NEWEST first
).value
- required order@Nonnull public PullRequestSearchRequest.Builder participant(@Nullable PullRequestParticipantRequest value)
value
- the participant@Nonnull public PullRequestSearchRequest.Builder participants(@Nullable Iterable<PullRequestParticipantRequest> values)
values
- the participants@Nonnull public PullRequestSearchRequest.Builder state(@Nullable PullRequestState value)
pull request state
.value
- the state to restrict to@Nonnull public PullRequestSearchRequest.Builder toRepositoryId(@Nullable Integer value)
value
- the repository ID to restrict the search by@Nonnull public PullRequestSearchRequest.Builder toRefId(@Nullable String value)
value
- the branch id@Nonnull public PullRequestSearchRequest.Builder toRefIds(@Nullable Iterable<String> values)
values
- the branch ids@Nonnull public PullRequestSearchRequest.Builder updatedSince(@Nullable Date value)
value
- the updated since date@Nonnull public PullRequestSearchRequest.Builder withDescription(boolean value)
value
- whether to fetch the description for
matching pull requests@Nonnull public PullRequestSearchRequest.Builder withProperties(boolean value)
value
- whether to fetch the properties
for
matching pull requestsCopyright © 2021 Atlassian. All rights reserved.