Package com.spotify.github.v3.prs
Class ImmutablePullRequest.Builder
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutablePullRequest.Builder
-
- Enclosing class:
- ImmutablePullRequest
@NotThreadSafe public static final class ImmutablePullRequest.Builder extends Object
Builds instances of typeImmutablePullRequest. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis 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 ImmutablePullRequest.BuilderaddAllLabels(Iterable<? extends Label> elements)Adds elements tolabelslist.ImmutablePullRequest.BuilderaddAllRequestedReviewers(Iterable<? extends User> elements)Adds elements torequestedReviewerslist.ImmutablePullRequest.BuilderaddAllRequestedTeams(Iterable<? extends User> elements)Adds elements torequestedTeamslist.ImmutablePullRequest.Builderadditions(Integer additions)Initializes the value for theadditionsattribute.ImmutablePullRequest.BuilderaddLabels(Label element)Adds one element tolabelslist.ImmutablePullRequest.BuilderaddLabels(Label... elements)Adds elements tolabelslist.ImmutablePullRequest.BuilderaddRequestedReviewers(User element)Adds one element torequestedReviewerslist.ImmutablePullRequest.BuilderaddRequestedReviewers(User... elements)Adds elements torequestedReviewerslist.ImmutablePullRequest.BuilderaddRequestedTeams(User element)Adds one element torequestedTeamslist.ImmutablePullRequest.BuilderaddRequestedTeams(User... elements)Adds elements torequestedTeamslist.ImmutablePullRequest.Builderassignee(User assignee)Initializes the optional valueassigneeto assignee.ImmutablePullRequest.Builderassignee(Optional<? extends User> assignee)Initializes the optional valueassigneeto assignee.ImmutablePullRequest.Builderassignees(List<User> assignees)Initializes the optional valueassigneesto assignees.ImmutablePullRequest.Builderassignees(Optional<? extends List<User>> assignees)Initializes the optional valueassigneesto assignees.ImmutablePullRequest.Builderbase(PullRequestRef base)Initializes the value for thebaseattribute.ImmutablePullRequest.Builderbody(String body)Initializes the optional valuebodyto body.ImmutablePullRequest.Builderbody(Optional<String> body)Initializes the optional valuebodyto body.ImmutablePullRequestbuild()Builds a newImmutablePullRequest.ImmutablePullRequest.BuilderchangedFiles(Integer changedFiles)Initializes the value for thechangedFilesattribute.ImmutablePullRequest.BuilderclosedAt(GitHubInstant closedAt)Initializes the optional valueclosedAtto closedAt.ImmutablePullRequest.BuilderclosedAt(Optional<? extends GitHubInstant> closedAt)Initializes the optional valueclosedAtto closedAt.ImmutablePullRequest.Buildercomments(Integer comments)Initializes the value for thecommentsattribute.ImmutablePullRequest.BuildercommentsUrl(URI commentsUrl)Initializes the value for thecommentsUrlattribute.ImmutablePullRequest.Buildercommits(Integer commits)Initializes the value for thecommitsattribute.ImmutablePullRequest.BuildercommitsUrl(URI commitsUrl)Initializes the value for thecommitsUrlattribute.ImmutablePullRequest.BuildercreatedAt(GitHubInstant createdAt)Initializes the value for thecreatedAtattribute.ImmutablePullRequest.Builderdeletions(Integer deletions)Initializes the value for thedeletionsattribute.ImmutablePullRequest.BuilderdiffUrl(URI diffUrl)Initializes the value for thediffUrlattribute.ImmutablePullRequest.Builderdraft(boolean draft)Initializes the optional valuedraftto draft.ImmutablePullRequest.Builderdraft(Optional<Boolean> draft)Initializes the optional valuedraftto draft.ImmutablePullRequest.Builderfrom(CloseTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.CloseTrackinginstance.ImmutablePullRequest.Builderfrom(UpdateTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.ImmutablePullRequest.Builderfrom(PullRequest instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestinstance.ImmutablePullRequest.Builderfrom(PullRequestItem instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestIteminstance.ImmutablePullRequest.Builderhead(PullRequestRef head)Initializes the value for theheadattribute.ImmutablePullRequest.BuilderhtmlUrl(URI htmlUrl)Initializes the value for thehtmlUrlattribute.ImmutablePullRequest.Builderid(Long id)Initializes the value for theidattribute.ImmutablePullRequest.BuilderissueUrl(URI issueUrl)Initializes the value for theissueUrlattribute.ImmutablePullRequest.Builderlabels(Iterable<? extends Label> elements)Sets or replaces all elements forlabelslist.ImmutablePullRequest.Builderlinks(PullRequestLinks links)Initializes the value for thelinksattribute.ImmutablePullRequest.Builderlocked(Boolean locked)Initializes the value for thelockedattribute.ImmutablePullRequest.Buildermergeable(boolean mergeable)Initializes the optional valuemergeableto mergeable.ImmutablePullRequest.Buildermergeable(Optional<Boolean> mergeable)Initializes the optional valuemergeableto mergeable.ImmutablePullRequest.BuildermergeableState(String mergeableState)Initializes the value for themergeableStateattribute.ImmutablePullRequest.BuildermergeCommitSha(String mergeCommitSha)Initializes the optional valuemergeCommitShato mergeCommitSha.ImmutablePullRequest.BuildermergeCommitSha(Optional<String> mergeCommitSha)Initializes the optional valuemergeCommitShato mergeCommitSha.ImmutablePullRequest.Buildermerged(Boolean merged)Initializes the value for themergedattribute.ImmutablePullRequest.BuildermergedAt(GitHubInstant mergedAt)Initializes the optional valuemergedAtto mergedAt.ImmutablePullRequest.BuildermergedAt(Optional<? extends GitHubInstant> mergedAt)Initializes the optional valuemergedAtto mergedAt.ImmutablePullRequest.BuildermergedBy(User mergedBy)Initializes the optional valuemergedByto mergedBy.ImmutablePullRequest.BuildermergedBy(Optional<? extends User> mergedBy)Initializes the optional valuemergedByto mergedBy.ImmutablePullRequest.Buildermilestone(Milestone milestone)Initializes the optional valuemilestoneto milestone.ImmutablePullRequest.Buildermilestone(Optional<? extends Milestone> milestone)Initializes the optional valuemilestoneto milestone.ImmutablePullRequest.BuildernodeId(String nodeId)Initializes the value for thenodeIdattribute.ImmutablePullRequest.Buildernumber(Integer number)Initializes the value for thenumberattribute.ImmutablePullRequest.BuilderpatchUrl(URI patchUrl)Initializes the value for thepatchUrlattribute.ImmutablePullRequest.BuilderrequestedReviewers(Iterable<? extends User> elements)Sets or replaces all elements forrequestedReviewerslist.ImmutablePullRequest.BuilderrequestedTeams(Iterable<? extends User> elements)Sets or replaces all elements forrequestedTeamslist.ImmutablePullRequest.BuilderreviewComments(Integer reviewComments)Initializes the value for thereviewCommentsattribute.ImmutablePullRequest.BuilderreviewCommentsUrl(URI reviewCommentsUrl)Initializes the value for thereviewCommentsUrlattribute.ImmutablePullRequest.BuilderreviewCommentUrl(String reviewCommentUrl)Initializes the value for thereviewCommentUrlattribute.ImmutablePullRequest.Builderstate(String state)Initializes the value for thestateattribute.ImmutablePullRequest.BuilderstatusesUrl(URI statusesUrl)Initializes the value for thestatusesUrlattribute.ImmutablePullRequest.Buildertitle(String title)Initializes the value for thetitleattribute.ImmutablePullRequest.BuilderupdatedAt(GitHubInstant updatedAt)Initializes the value for theupdatedAtattribute.ImmutablePullRequest.Builderurl(URI url)Initializes the value for theurlattribute.ImmutablePullRequest.Builderuser(User user)Initializes the value for theuserattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder from(PullRequestItem instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestIteminstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder from(CloseTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.CloseTrackinginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder from(PullRequest instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAtattribute.- Parameters:
createdAt- The value for createdAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAtattribute.- Parameters:
updatedAt- The value for updatedAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAtto closedAt.- Parameters:
closedAt- The value for closedAt- Returns:
thisbuilder for chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder closedAt(Optional<? extends GitHubInstant> closedAt)
Initializes the optional valueclosedAtto closedAt.- Parameters:
closedAt- The value for closedAt- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder id(@Nullable Long id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder url(@Nullable URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrlattribute.- Parameters:
htmlUrl- The value for htmlUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
diffUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder diffUrl(@Nullable URI diffUrl)
Initializes the value for thediffUrlattribute.- Parameters:
diffUrl- The value for diffUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
patchUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder patchUrl(@Nullable URI patchUrl)
Initializes the value for thepatchUrlattribute.- Parameters:
patchUrl- The value for patchUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
issueUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder issueUrl(@Nullable URI issueUrl)
Initializes the value for theissueUrlattribute.- Parameters:
issueUrl- The value for issueUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
commitsUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder commitsUrl(@Nullable URI commitsUrl)
Initializes the value for thecommitsUrlattribute.- Parameters:
commitsUrl- The value for commitsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
number
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder number(@Nullable Integer number)
Initializes the value for thenumberattribute.- Parameters:
number- The value for number (can benull)- Returns:
thisbuilder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder state(@Nullable String state)
Initializes the value for thestateattribute.- Parameters:
state- The value for state (can benull)- Returns:
thisbuilder for use in a chained invocation
-
title
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder title(@Nullable String title)
Initializes the value for thetitleattribute.- Parameters:
title- The value for title (can benull)- Returns:
thisbuilder for use in a chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder body(String body)
Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder body(Optional<String> body)
Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for use in a chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder assignee(User assignee)
Initializes the optional valueassigneeto assignee.- Parameters:
assignee- The value for assignee- Returns:
thisbuilder for chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder assignee(Optional<? extends User> assignee)
Initializes the optional valueassigneeto assignee.- Parameters:
assignee- The value for assignee- Returns:
thisbuilder for use in a chained invocation
-
assignees
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder assignees(List<User> assignees)
Initializes the optional valueassigneesto assignees.- Parameters:
assignees- The value for assignees- Returns:
thisbuilder for chained invocation
-
assignees
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder assignees(Optional<? extends List<User>> assignees)
Initializes the optional valueassigneesto assignees.- Parameters:
assignees- The value for assignees- Returns:
thisbuilder for use in a chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder milestone(Milestone milestone)
Initializes the optional valuemilestoneto milestone.- Parameters:
milestone- The value for milestone- Returns:
thisbuilder for chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder milestone(Optional<? extends Milestone> milestone)
Initializes the optional valuemilestoneto milestone.- Parameters:
milestone- The value for milestone- Returns:
thisbuilder for use in a chained invocation
-
locked
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder locked(@Nullable Boolean locked)
Initializes the value for thelockedattribute.- Parameters:
locked- The value for locked (can benull)- Returns:
thisbuilder for use in a chained invocation
-
mergedAt
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergedAt(GitHubInstant mergedAt)
Initializes the optional valuemergedAtto mergedAt.- Parameters:
mergedAt- The value for mergedAt- Returns:
thisbuilder for chained invocation
-
mergedAt
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergedAt(Optional<? extends GitHubInstant> mergedAt)
Initializes the optional valuemergedAtto mergedAt.- Parameters:
mergedAt- The value for mergedAt- Returns:
thisbuilder for use in a chained invocation
-
head
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder head(@Nullable PullRequestRef head)
Initializes the value for theheadattribute.- Parameters:
head- The value for head (can benull)- Returns:
thisbuilder for use in a chained invocation
-
base
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder base(@Nullable PullRequestRef base)
Initializes the value for thebaseattribute.- Parameters:
base- The value for base (can benull)- Returns:
thisbuilder for use in a chained invocation
-
user
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder user(@Nullable User user)
Initializes the value for theuserattribute.- Parameters:
user- The value for user (can benull)- Returns:
thisbuilder for use in a chained invocation
-
statusesUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder statusesUrl(@Nullable URI statusesUrl)
Initializes the value for thestatusesUrlattribute.- Parameters:
statusesUrl- The value for statusesUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
reviewCommentsUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder reviewCommentsUrl(@Nullable URI reviewCommentsUrl)
Initializes the value for thereviewCommentsUrlattribute.- Parameters:
reviewCommentsUrl- The value for reviewCommentsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
reviewCommentUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder reviewCommentUrl(@Nullable String reviewCommentUrl)
Initializes the value for thereviewCommentUrlattribute.- Parameters:
reviewCommentUrl- The value for reviewCommentUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
commentsUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder commentsUrl(@Nullable URI commentsUrl)
Initializes the value for thecommentsUrlattribute.- Parameters:
commentsUrl- The value for commentsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
links
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder links(@Nullable PullRequestLinks links)
Initializes the value for thelinksattribute.- Parameters:
links- The value for links (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addRequestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addRequestedReviewers(User element)
Adds one element torequestedReviewerslist.- Parameters:
element- A requestedReviewers element- Returns:
thisbuilder for use in a chained invocation
-
addRequestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addRequestedReviewers(User... elements)
Adds elements torequestedReviewerslist.- Parameters:
elements- An array of requestedReviewers elements- Returns:
thisbuilder for use in a chained invocation
-
requestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder requestedReviewers(@Nullable Iterable<? extends User> elements)
Sets or replaces all elements forrequestedReviewerslist.- Parameters:
elements- An iterable of requestedReviewers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRequestedReviewers
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addAllRequestedReviewers(Iterable<? extends User> elements)
Adds elements torequestedReviewerslist.- Parameters:
elements- An iterable of requestedReviewers elements- Returns:
thisbuilder for use in a chained invocation
-
addRequestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addRequestedTeams(User element)
Adds one element torequestedTeamslist.- Parameters:
element- A requestedTeams element- Returns:
thisbuilder for use in a chained invocation
-
addRequestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addRequestedTeams(User... elements)
Adds elements torequestedTeamslist.- Parameters:
elements- An array of requestedTeams elements- Returns:
thisbuilder for use in a chained invocation
-
requestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder requestedTeams(@Nullable Iterable<? extends User> elements)
Sets or replaces all elements forrequestedTeamslist.- Parameters:
elements- An iterable of requestedTeams elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRequestedTeams
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addAllRequestedTeams(Iterable<? extends User> elements)
Adds elements torequestedTeamslist.- Parameters:
elements- An iterable of requestedTeams elements- Returns:
thisbuilder for use in a chained invocation
-
mergeCommitSha
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergeCommitSha(String mergeCommitSha)
Initializes the optional valuemergeCommitShato mergeCommitSha.- Parameters:
mergeCommitSha- The value for mergeCommitSha- Returns:
thisbuilder for chained invocation
-
mergeCommitSha
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergeCommitSha(Optional<String> mergeCommitSha)
Initializes the optional valuemergeCommitShato mergeCommitSha.- Parameters:
mergeCommitSha- The value for mergeCommitSha- Returns:
thisbuilder for use in a chained invocation
-
nodeId
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder nodeId(String nodeId)
Initializes the value for thenodeIdattribute.- Parameters:
nodeId- The value for nodeId- Returns:
thisbuilder for use in a chained invocation
-
merged
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder merged(@Nullable Boolean merged)
Initializes the value for themergedattribute.- Parameters:
merged- The value for merged (can benull)- Returns:
thisbuilder for use in a chained invocation
-
mergeable
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergeable(boolean mergeable)
Initializes the optional valuemergeableto mergeable.- Parameters:
mergeable- The value for mergeable- Returns:
thisbuilder for chained invocation
-
mergeable
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergeable(Optional<Boolean> mergeable)
Initializes the optional valuemergeableto mergeable.- Parameters:
mergeable- The value for mergeable- Returns:
thisbuilder for use in a chained invocation
-
mergedBy
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergedBy(User mergedBy)
Initializes the optional valuemergedByto mergedBy.- Parameters:
mergedBy- The value for mergedBy- Returns:
thisbuilder for chained invocation
-
mergedBy
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergedBy(Optional<? extends User> mergedBy)
Initializes the optional valuemergedByto mergedBy.- Parameters:
mergedBy- The value for mergedBy- Returns:
thisbuilder for use in a chained invocation
-
comments
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder comments(@Nullable Integer comments)
Initializes the value for thecommentsattribute.- Parameters:
comments- The value for comments (can benull)- Returns:
thisbuilder for use in a chained invocation
-
reviewComments
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder reviewComments(@Nullable Integer reviewComments)
Initializes the value for thereviewCommentsattribute.- Parameters:
reviewComments- The value for reviewComments (can benull)- Returns:
thisbuilder for use in a chained invocation
-
commits
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder commits(@Nullable Integer commits)
Initializes the value for thecommitsattribute.- Parameters:
commits- The value for commits (can benull)- Returns:
thisbuilder for use in a chained invocation
-
additions
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder additions(@Nullable Integer additions)
Initializes the value for theadditionsattribute.- Parameters:
additions- The value for additions (can benull)- Returns:
thisbuilder for use in a chained invocation
-
deletions
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder deletions(@Nullable Integer deletions)
Initializes the value for thedeletionsattribute.- Parameters:
deletions- The value for deletions (can benull)- Returns:
thisbuilder for use in a chained invocation
-
changedFiles
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder changedFiles(@Nullable Integer changedFiles)
Initializes the value for thechangedFilesattribute.- Parameters:
changedFiles- The value for changedFiles (can benull)- Returns:
thisbuilder for use in a chained invocation
-
mergeableState
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder mergeableState(@Nullable String mergeableState)
Initializes the value for themergeableStateattribute.- Parameters:
mergeableState- The value for mergeableState (can benull)- Returns:
thisbuilder for use in a chained invocation
-
draft
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder draft(boolean draft)
Initializes the optional valuedraftto draft.- Parameters:
draft- The value for draft- Returns:
thisbuilder for chained invocation
-
draft
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder draft(Optional<Boolean> draft)
Initializes the optional valuedraftto draft.- Parameters:
draft- The value for draft- Returns:
thisbuilder for use in a chained invocation
-
addLabels
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addLabels(Label element)
Adds one element tolabelslist.- Parameters:
element- A labels element- Returns:
thisbuilder for use in a chained invocation
-
addLabels
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addLabels(Label... elements)
Adds elements tolabelslist.- Parameters:
elements- An array of labels elements- Returns:
thisbuilder for use in a chained invocation
-
labels
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder labels(@Nullable Iterable<? extends Label> elements)
Sets or replaces all elements forlabelslist.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLabels
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder addAllLabels(Iterable<? extends Label> elements)
Adds elements tolabelslist.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutablePullRequest build()
Builds a newImmutablePullRequest.- Returns:
- An immutable instance of PullRequest
- Throws:
IllegalStateException- if any required attributes are missing
-
-