Package com.spotify.github.v3.prs
Class ImmutablePullRequestItem.Builder
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutablePullRequestItem.Builder
-
- Enclosing class:
- ImmutablePullRequestItem
@NotThreadSafe public static final class ImmutablePullRequestItem.Builder extends Object
Builds instances of typeImmutablePullRequestItem
. Initialize attributes and then invoke thebuild()
method to create an immutable instance.Builder
is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePullRequestItem.Builder
addAllRequestedReviewers(Iterable<? extends User> elements)
Adds elements torequestedReviewers
list.ImmutablePullRequestItem.Builder
addAllRequestedTeams(Iterable<? extends User> elements)
Adds elements torequestedTeams
list.ImmutablePullRequestItem.Builder
addRequestedReviewers(User element)
Adds one element torequestedReviewers
list.ImmutablePullRequestItem.Builder
addRequestedReviewers(User... elements)
Adds elements torequestedReviewers
list.ImmutablePullRequestItem.Builder
addRequestedTeams(User element)
Adds one element torequestedTeams
list.ImmutablePullRequestItem.Builder
addRequestedTeams(User... elements)
Adds elements torequestedTeams
list.ImmutablePullRequestItem.Builder
assignee(User assignee)
Initializes the optional valueassignee
to assignee.ImmutablePullRequestItem.Builder
assignee(Optional<? extends User> assignee)
Initializes the optional valueassignee
to assignee.ImmutablePullRequestItem.Builder
assignees(List<User> assignees)
Initializes the optional valueassignees
to assignees.ImmutablePullRequestItem.Builder
assignees(Optional<? extends List<User>> assignees)
Initializes the optional valueassignees
to assignees.ImmutablePullRequestItem.Builder
base(PullRequestRef base)
Initializes the value for thebase
attribute.ImmutablePullRequestItem.Builder
body(String body)
Initializes the optional valuebody
to body.ImmutablePullRequestItem.Builder
body(Optional<String> body)
Initializes the optional valuebody
to body.ImmutablePullRequestItem
build()
Builds a newImmutablePullRequestItem
.ImmutablePullRequestItem.Builder
closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAt
to closedAt.ImmutablePullRequestItem.Builder
closedAt(Optional<? extends GitHubInstant> closedAt)
Initializes the optional valueclosedAt
to closedAt.ImmutablePullRequestItem.Builder
commentsUrl(URI commentsUrl)
Initializes the value for thecommentsUrl
attribute.ImmutablePullRequestItem.Builder
commitsUrl(URI commitsUrl)
Initializes the value for thecommitsUrl
attribute.ImmutablePullRequestItem.Builder
createdAt(GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.ImmutablePullRequestItem.Builder
diffUrl(URI diffUrl)
Initializes the value for thediffUrl
attribute.ImmutablePullRequestItem.Builder
from(CloseTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.CloseTracking
instance.ImmutablePullRequestItem.Builder
from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTracking
instance.ImmutablePullRequestItem.Builder
from(PullRequestItem instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestItem
instance.ImmutablePullRequestItem.Builder
head(PullRequestRef head)
Initializes the value for thehead
attribute.ImmutablePullRequestItem.Builder
htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.ImmutablePullRequestItem.Builder
id(Integer id)
Initializes the value for theid
attribute.ImmutablePullRequestItem.Builder
issueUrl(URI issueUrl)
Initializes the value for theissueUrl
attribute.ImmutablePullRequestItem.Builder
links(PullRequestLinks links)
Initializes the value for thelinks
attribute.ImmutablePullRequestItem.Builder
locked(Boolean locked)
Initializes the value for thelocked
attribute.ImmutablePullRequestItem.Builder
mergeCommitSha(String mergeCommitSha)
Initializes the optional valuemergeCommitSha
to mergeCommitSha.ImmutablePullRequestItem.Builder
mergeCommitSha(Optional<String> mergeCommitSha)
Initializes the optional valuemergeCommitSha
to mergeCommitSha.ImmutablePullRequestItem.Builder
mergedAt(GitHubInstant mergedAt)
Initializes the optional valuemergedAt
to mergedAt.ImmutablePullRequestItem.Builder
mergedAt(Optional<? extends GitHubInstant> mergedAt)
Initializes the optional valuemergedAt
to mergedAt.ImmutablePullRequestItem.Builder
milestone(Milestone milestone)
Initializes the optional valuemilestone
to milestone.ImmutablePullRequestItem.Builder
milestone(Optional<? extends Milestone> milestone)
Initializes the optional valuemilestone
to milestone.ImmutablePullRequestItem.Builder
number(Integer number)
Initializes the value for thenumber
attribute.ImmutablePullRequestItem.Builder
patchUrl(URI patchUrl)
Initializes the value for thepatchUrl
attribute.ImmutablePullRequestItem.Builder
requestedReviewers(Iterable<? extends User> elements)
Sets or replaces all elements forrequestedReviewers
list.ImmutablePullRequestItem.Builder
requestedTeams(Iterable<? extends User> elements)
Sets or replaces all elements forrequestedTeams
list.ImmutablePullRequestItem.Builder
reviewCommentsUrl(URI reviewCommentsUrl)
Initializes the value for thereviewCommentsUrl
attribute.ImmutablePullRequestItem.Builder
reviewCommentUrl(String reviewCommentUrl)
Initializes the value for thereviewCommentUrl
attribute.ImmutablePullRequestItem.Builder
state(String state)
Initializes the value for thestate
attribute.ImmutablePullRequestItem.Builder
statusesUrl(URI statusesUrl)
Initializes the value for thestatusesUrl
attribute.ImmutablePullRequestItem.Builder
title(String title)
Initializes the value for thetitle
attribute.ImmutablePullRequestItem.Builder
updatedAt(GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.ImmutablePullRequestItem.Builder
url(URI url)
Initializes the value for theurl
attribute.ImmutablePullRequestItem.Builder
user(User user)
Initializes the value for theuser
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder from(PullRequestItem instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestItem
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder from(CloseTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.CloseTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.- Parameters:
createdAt
- The value for createdAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.- Parameters:
updatedAt
- The value for updatedAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAt
to closedAt.- Parameters:
closedAt
- The value for closedAt- Returns:
this
builder for chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder closedAt(Optional<? extends GitHubInstant> closedAt)
Initializes the optional valueclosedAt
to closedAt.- Parameters:
closedAt
- The value for closedAt- Returns:
this
builder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder id(@Nullable Integer id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder url(@Nullable URI url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url (can benull
)- Returns:
this
builder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.- Parameters:
htmlUrl
- The value for htmlUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
diffUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder diffUrl(@Nullable URI diffUrl)
Initializes the value for thediffUrl
attribute.- Parameters:
diffUrl
- The value for diffUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
patchUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder patchUrl(@Nullable URI patchUrl)
Initializes the value for thepatchUrl
attribute.- Parameters:
patchUrl
- The value for patchUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
issueUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder issueUrl(@Nullable URI issueUrl)
Initializes the value for theissueUrl
attribute.- Parameters:
issueUrl
- The value for issueUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
commitsUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder commitsUrl(@Nullable URI commitsUrl)
Initializes the value for thecommitsUrl
attribute.- Parameters:
commitsUrl
- The value for commitsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
number
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder number(@Nullable Integer number)
Initializes the value for thenumber
attribute.- Parameters:
number
- The value for number (can benull
)- Returns:
this
builder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder state(@Nullable String state)
Initializes the value for thestate
attribute.- Parameters:
state
- The value for state (can benull
)- Returns:
this
builder for use in a chained invocation
-
title
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder title(@Nullable String title)
Initializes the value for thetitle
attribute.- Parameters:
title
- The value for title (can benull
)- Returns:
this
builder for use in a chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder body(String body)
Initializes the optional valuebody
to body.- Parameters:
body
- The value for body- Returns:
this
builder for chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder body(Optional<String> body)
Initializes the optional valuebody
to body.- Parameters:
body
- The value for body- Returns:
this
builder for use in a chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder assignee(User assignee)
Initializes the optional valueassignee
to assignee.- Parameters:
assignee
- The value for assignee- Returns:
this
builder for chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder assignee(Optional<? extends User> assignee)
Initializes the optional valueassignee
to assignee.- Parameters:
assignee
- The value for assignee- Returns:
this
builder for use in a chained invocation
-
assignees
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder assignees(List<User> assignees)
Initializes the optional valueassignees
to assignees.- Parameters:
assignees
- The value for assignees- Returns:
this
builder for chained invocation
-
assignees
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder assignees(Optional<? extends List<User>> assignees)
Initializes the optional valueassignees
to assignees.- Parameters:
assignees
- The value for assignees- Returns:
this
builder for use in a chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder milestone(Milestone milestone)
Initializes the optional valuemilestone
to milestone.- Parameters:
milestone
- The value for milestone- Returns:
this
builder for chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder milestone(Optional<? extends Milestone> milestone)
Initializes the optional valuemilestone
to milestone.- Parameters:
milestone
- The value for milestone- Returns:
this
builder for use in a chained invocation
-
locked
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder locked(@Nullable Boolean locked)
Initializes the value for thelocked
attribute.- Parameters:
locked
- The value for locked (can benull
)- Returns:
this
builder for use in a chained invocation
-
mergedAt
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder mergedAt(GitHubInstant mergedAt)
Initializes the optional valuemergedAt
to mergedAt.- Parameters:
mergedAt
- The value for mergedAt- Returns:
this
builder for chained invocation
-
mergedAt
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder mergedAt(Optional<? extends GitHubInstant> mergedAt)
Initializes the optional valuemergedAt
to mergedAt.- Parameters:
mergedAt
- The value for mergedAt- Returns:
this
builder for use in a chained invocation
-
head
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder head(@Nullable PullRequestRef head)
Initializes the value for thehead
attribute.- Parameters:
head
- The value for head (can benull
)- Returns:
this
builder for use in a chained invocation
-
base
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder base(@Nullable PullRequestRef base)
Initializes the value for thebase
attribute.- Parameters:
base
- The value for base (can benull
)- Returns:
this
builder for use in a chained invocation
-
user
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder user(@Nullable User user)
Initializes the value for theuser
attribute.- Parameters:
user
- The value for user (can benull
)- Returns:
this
builder for use in a chained invocation
-
statusesUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder statusesUrl(@Nullable URI statusesUrl)
Initializes the value for thestatusesUrl
attribute.- Parameters:
statusesUrl
- The value for statusesUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
reviewCommentsUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder reviewCommentsUrl(@Nullable URI reviewCommentsUrl)
Initializes the value for thereviewCommentsUrl
attribute.- Parameters:
reviewCommentsUrl
- The value for reviewCommentsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
reviewCommentUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder reviewCommentUrl(@Nullable String reviewCommentUrl)
Initializes the value for thereviewCommentUrl
attribute.- Parameters:
reviewCommentUrl
- The value for reviewCommentUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
commentsUrl
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder commentsUrl(@Nullable URI commentsUrl)
Initializes the value for thecommentsUrl
attribute.- Parameters:
commentsUrl
- The value for commentsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
links
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder links(@Nullable PullRequestLinks links)
Initializes the value for thelinks
attribute.- Parameters:
links
- The value for links (can benull
)- Returns:
this
builder for use in a chained invocation
-
addRequestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder addRequestedReviewers(User element)
Adds one element torequestedReviewers
list.- Parameters:
element
- A requestedReviewers element- Returns:
this
builder for use in a chained invocation
-
addRequestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder addRequestedReviewers(User... elements)
Adds elements torequestedReviewers
list.- Parameters:
elements
- An array of requestedReviewers elements- Returns:
this
builder for use in a chained invocation
-
requestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder requestedReviewers(@Nullable Iterable<? extends User> elements)
Sets or replaces all elements forrequestedReviewers
list.- Parameters:
elements
- An iterable of requestedReviewers elements- Returns:
this
builder for use in a chained invocation
-
addAllRequestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder addAllRequestedReviewers(Iterable<? extends User> elements)
Adds elements torequestedReviewers
list.- Parameters:
elements
- An iterable of requestedReviewers elements- Returns:
this
builder for use in a chained invocation
-
addRequestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder addRequestedTeams(User element)
Adds one element torequestedTeams
list.- Parameters:
element
- A requestedTeams element- Returns:
this
builder for use in a chained invocation
-
addRequestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder addRequestedTeams(User... elements)
Adds elements torequestedTeams
list.- Parameters:
elements
- An array of requestedTeams elements- Returns:
this
builder for use in a chained invocation
-
requestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder requestedTeams(@Nullable Iterable<? extends User> elements)
Sets or replaces all elements forrequestedTeams
list.- Parameters:
elements
- An iterable of requestedTeams elements- Returns:
this
builder for use in a chained invocation
-
addAllRequestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder addAllRequestedTeams(Iterable<? extends User> elements)
Adds elements torequestedTeams
list.- Parameters:
elements
- An iterable of requestedTeams elements- Returns:
this
builder for use in a chained invocation
-
mergeCommitSha
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder mergeCommitSha(String mergeCommitSha)
Initializes the optional valuemergeCommitSha
to mergeCommitSha.- Parameters:
mergeCommitSha
- The value for mergeCommitSha- Returns:
this
builder for chained invocation
-
mergeCommitSha
@CanIgnoreReturnValue public final ImmutablePullRequestItem.Builder mergeCommitSha(Optional<String> mergeCommitSha)
Initializes the optional valuemergeCommitSha
to mergeCommitSha.- Parameters:
mergeCommitSha
- The value for mergeCommitSha- Returns:
this
builder for use in a chained invocation
-
build
public ImmutablePullRequestItem build()
Builds a newImmutablePullRequestItem
.- Returns:
- An immutable instance of PullRequestItem
- Throws:
IllegalStateException
- if any required attributes are missing
-
-