Package com.spotify.github.v3.prs
Class ImmutablePullRequest
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutablePullRequest
-
- All Implemented Interfaces:
CloseTracking,UpdateTracking,PullRequest,PullRequestItem
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePullRequest extends Object implements PullRequest
Immutable implementation ofPullRequest.Use the builder to create immutable instances:
ImmutablePullRequest.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePullRequest.BuilderBuilds instances of typeImmutablePullRequest.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Integeradditions()Number of additions.Optional<User>assignee()Assignee.Optional<List<User>>assignees()Assignees.PullRequestRefbase()Base reference.Optional<String>body()The contents of the pull request.static ImmutablePullRequest.Builderbuilder()Creates a builder forImmutablePullRequest.IntegerchangedFiles()Number of changed files.Optional<GitHubInstant>closedAt()Closed date.Integercomments()Number of comments.URIcommentsUrl()Comments API URL.Integercommits()Number of commits.URIcommitsUrl()Commits URL.static ImmutablePullRequestcopyOf(PullRequest instance)Creates an immutable copy of aPullRequestvalue.GitHubInstantcreatedAt()Created dateIntegerdeletions()Number of deletions.URIdiffUrl()Diff URL.Optional<Boolean>draft()Is it a draft PR?booleanequals(Object another)This instance is equal to all instances ofImmutablePullRequestthat have equal attribute values.inthashCode()Computes a hash code from attributes:createdAt,updatedAt,closedAt,id,url,htmlUrl,diffUrl,patchUrl,issueUrl,commitsUrl,number,state,title,body,assignee,assignees,milestone,locked,mergedAt,head,base,user,statusesUrl,reviewCommentsUrl,reviewCommentUrl,commentsUrl,links,requestedReviewers,requestedTeams,mergeCommitSha,nodeId,merged,mergeable,mergedBy,comments,reviewComments,commits,additions,deletions,changedFiles,mergeableState,draft,labels.PullRequestRefhead()Head reference.URIhtmlUrl()HTML URL.Longid()ID.URIissueUrl()Issue URL.List<Label>labels()PullRequestLinkslinks()Link references.Booleanlocked()Is it locked.Optional<Boolean>mergeable()Is it mergeable.StringmergeableState()The mergeable state of this PR.Optional<String>mergeCommitSha()Booleanmerged()Is it merged.Optional<GitHubInstant>mergedAt()Merged date.Optional<User>mergedBy()Merged by user.Optional<Milestone>milestone()Milestone.StringnodeId()Integernumber()Number.URIpatchUrl()Patch URL.List<User>requestedReviewers()Requested reviewers (users)List<User>requestedTeams()Requested reviewers (teams)IntegerreviewComments()Number of review (commit) comments.URIreviewCommentsUrl()Review comments API URL.StringreviewCommentUrl()Review comment API URL template.Stringstate()Either open, closed, or all to filter by state.URIstatusesUrl()Statuses API URL.Stringtitle()The title of the pull request.StringtoString()Prints the immutable valuePullRequestwith attribute values.GitHubInstantupdatedAt()Updated dateURIurl()URL.Useruser()User.ImmutablePullRequestwithAdditions(Integer value)Copy the current immutable object by setting a value for theadditionsattribute.ImmutablePullRequestwithAssignee(User value)Copy the current immutable object by setting a present value for the optionalassigneeattribute.ImmutablePullRequestwithAssignee(Optional<? extends User> optional)Copy the current immutable object by setting an optional value for theassigneeattribute.ImmutablePullRequestwithAssignees(List<User> value)Copy the current immutable object by setting a present value for the optionalassigneesattribute.ImmutablePullRequestwithAssignees(Optional<? extends List<User>> optional)Copy the current immutable object by setting an optional value for theassigneesattribute.ImmutablePullRequestwithBase(PullRequestRef value)Copy the current immutable object by setting a value for thebaseattribute.ImmutablePullRequestwithBody(String value)Copy the current immutable object by setting a present value for the optionalbodyattribute.ImmutablePullRequestwithBody(Optional<String> optional)Copy the current immutable object by setting an optional value for thebodyattribute.ImmutablePullRequestwithChangedFiles(Integer value)Copy the current immutable object by setting a value for thechangedFilesattribute.ImmutablePullRequestwithClosedAt(GitHubInstant value)Copy the current immutable object by setting a present value for the optionalclosedAtattribute.ImmutablePullRequestwithClosedAt(Optional<? extends GitHubInstant> optional)Copy the current immutable object by setting an optional value for theclosedAtattribute.ImmutablePullRequestwithComments(Integer value)Copy the current immutable object by setting a value for thecommentsattribute.ImmutablePullRequestwithCommentsUrl(URI value)Copy the current immutable object by setting a value for thecommentsUrlattribute.ImmutablePullRequestwithCommits(Integer value)Copy the current immutable object by setting a value for thecommitsattribute.ImmutablePullRequestwithCommitsUrl(URI value)Copy the current immutable object by setting a value for thecommitsUrlattribute.ImmutablePullRequestwithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutablePullRequestwithDeletions(Integer value)Copy the current immutable object by setting a value for thedeletionsattribute.ImmutablePullRequestwithDiffUrl(URI value)Copy the current immutable object by setting a value for thediffUrlattribute.ImmutablePullRequestwithDraft(boolean value)Copy the current immutable object by setting a present value for the optionaldraftattribute.ImmutablePullRequestwithDraft(Optional<Boolean> optional)Copy the current immutable object by setting an optional value for thedraftattribute.ImmutablePullRequestwithHead(PullRequestRef value)Copy the current immutable object by setting a value for theheadattribute.ImmutablePullRequestwithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutablePullRequestwithId(Long value)Copy the current immutable object by setting a value for theidattribute.ImmutablePullRequestwithIssueUrl(URI value)Copy the current immutable object by setting a value for theissueUrlattribute.ImmutablePullRequestwithLabels(Label... elements)Copy the current immutable object with elements that replace the content oflabels.ImmutablePullRequestwithLabels(Iterable<? extends Label> elements)Copy the current immutable object with elements that replace the content oflabels.ImmutablePullRequestwithLinks(PullRequestLinks value)Copy the current immutable object by setting a value for thelinksattribute.ImmutablePullRequestwithLocked(Boolean value)Copy the current immutable object by setting a value for thelockedattribute.ImmutablePullRequestwithMergeable(boolean value)Copy the current immutable object by setting a present value for the optionalmergeableattribute.ImmutablePullRequestwithMergeable(Optional<Boolean> optional)Copy the current immutable object by setting an optional value for themergeableattribute.ImmutablePullRequestwithMergeableState(String value)Copy the current immutable object by setting a value for themergeableStateattribute.ImmutablePullRequestwithMergeCommitSha(String value)Copy the current immutable object by setting a present value for the optionalmergeCommitShaattribute.ImmutablePullRequestwithMergeCommitSha(Optional<String> optional)Copy the current immutable object by setting an optional value for themergeCommitShaattribute.ImmutablePullRequestwithMerged(Boolean value)Copy the current immutable object by setting a value for themergedattribute.ImmutablePullRequestwithMergedAt(GitHubInstant value)Copy the current immutable object by setting a present value for the optionalmergedAtattribute.ImmutablePullRequestwithMergedAt(Optional<? extends GitHubInstant> optional)Copy the current immutable object by setting an optional value for themergedAtattribute.ImmutablePullRequestwithMergedBy(User value)Copy the current immutable object by setting a present value for the optionalmergedByattribute.ImmutablePullRequestwithMergedBy(Optional<? extends User> optional)Copy the current immutable object by setting an optional value for themergedByattribute.ImmutablePullRequestwithMilestone(Milestone value)Copy the current immutable object by setting a present value for the optionalmilestoneattribute.ImmutablePullRequestwithMilestone(Optional<? extends Milestone> optional)Copy the current immutable object by setting an optional value for themilestoneattribute.ImmutablePullRequestwithNodeId(String value)Copy the current immutable object by setting a value for thenodeIdattribute.ImmutablePullRequestwithNumber(Integer value)Copy the current immutable object by setting a value for thenumberattribute.ImmutablePullRequestwithPatchUrl(URI value)Copy the current immutable object by setting a value for thepatchUrlattribute.ImmutablePullRequestwithRequestedReviewers(User... elements)Copy the current immutable object with elements that replace the content ofrequestedReviewers.ImmutablePullRequestwithRequestedReviewers(Iterable<? extends User> elements)Copy the current immutable object with elements that replace the content ofrequestedReviewers.ImmutablePullRequestwithRequestedTeams(User... elements)Copy the current immutable object with elements that replace the content ofrequestedTeams.ImmutablePullRequestwithRequestedTeams(Iterable<? extends User> elements)Copy the current immutable object with elements that replace the content ofrequestedTeams.ImmutablePullRequestwithReviewComments(Integer value)Copy the current immutable object by setting a value for thereviewCommentsattribute.ImmutablePullRequestwithReviewCommentsUrl(URI value)Copy the current immutable object by setting a value for thereviewCommentsUrlattribute.ImmutablePullRequestwithReviewCommentUrl(String value)Copy the current immutable object by setting a value for thereviewCommentUrlattribute.ImmutablePullRequestwithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutablePullRequestwithStatusesUrl(URI value)Copy the current immutable object by setting a value for thestatusesUrlattribute.ImmutablePullRequestwithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.ImmutablePullRequestwithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.ImmutablePullRequestwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.ImmutablePullRequestwithUser(User value)Copy the current immutable object by setting a value for theuserattribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAtin interfaceUpdateTracking- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAtin interfaceUpdateTracking- Returns:
- The date when the issue was updated
-
closedAt
public Optional<GitHubInstant> closedAt()
Closed date.- Specified by:
closedAtin interfaceCloseTracking- Returns:
- The date when the issue was closed
-
id
@Nullable public Long id()
ID.- Specified by:
idin interfacePullRequestItem
-
url
@Nullable public URI url()
URL.- Specified by:
urlin interfacePullRequestItem
-
htmlUrl
@Nullable public URI htmlUrl()
HTML URL.- Specified by:
htmlUrlin interfacePullRequestItem
-
diffUrl
@Nullable public URI diffUrl()
Diff URL.- Specified by:
diffUrlin interfacePullRequestItem
-
patchUrl
@Nullable public URI patchUrl()
Patch URL.- Specified by:
patchUrlin interfacePullRequestItem
-
issueUrl
@Nullable public URI issueUrl()
Issue URL.- Specified by:
issueUrlin interfacePullRequestItem
-
commitsUrl
@Nullable public URI commitsUrl()
Commits URL.- Specified by:
commitsUrlin interfacePullRequestItem
-
number
@Nullable public Integer number()
Number.- Specified by:
numberin interfacePullRequestItem
-
state
@Nullable public String state()
Either open, closed, or all to filter by state. Default: open.- Specified by:
statein interfacePullRequestItem
-
title
@Nullable public String title()
The title of the pull request.- Specified by:
titlein interfacePullRequestItem
-
body
public Optional<String> body()
The contents of the pull request.- Specified by:
bodyin interfacePullRequestItem
-
assignee
public Optional<User> assignee()
Assignee.- Specified by:
assigneein interfacePullRequestItem
-
assignees
public Optional<List<User>> assignees()
Assignees.- Specified by:
assigneesin interfacePullRequestItem
-
milestone
public Optional<Milestone> milestone()
Milestone.- Specified by:
milestonein interfacePullRequestItem
-
locked
@Nullable public Boolean locked()
Is it locked.- Specified by:
lockedin interfacePullRequestItem
-
mergedAt
public Optional<GitHubInstant> mergedAt()
Merged date.- Specified by:
mergedAtin interfacePullRequestItem
-
head
@Nullable public PullRequestRef head()
Head reference.- Specified by:
headin interfacePullRequestItem
-
base
@Nullable public PullRequestRef base()
Base reference.- Specified by:
basein interfacePullRequestItem
-
user
@Nullable public User user()
User.- Specified by:
userin interfacePullRequestItem
-
statusesUrl
@Nullable public URI statusesUrl()
Statuses API URL.- Specified by:
statusesUrlin interfacePullRequestItem
-
reviewCommentsUrl
@Nullable public URI reviewCommentsUrl()
Review comments API URL.- Specified by:
reviewCommentsUrlin interfacePullRequestItem
-
reviewCommentUrl
@Nullable public String reviewCommentUrl()
Review comment API URL template.- Specified by:
reviewCommentUrlin interfacePullRequestItem
-
commentsUrl
@Nullable public URI commentsUrl()
Comments API URL.- Specified by:
commentsUrlin interfacePullRequestItem
-
links
@Nullable public PullRequestLinks links()
Link references.- Specified by:
linksin interfacePullRequestItem
-
requestedReviewers
@Nullable public List<User> requestedReviewers()
Requested reviewers (users)- Specified by:
requestedReviewersin interfacePullRequestItem
-
requestedTeams
@Nullable public List<User> requestedTeams()
Requested reviewers (teams)- Specified by:
requestedTeamsin interfacePullRequestItem
-
mergeCommitSha
public Optional<String> mergeCommitSha()
- Specified by:
mergeCommitShain interfacePullRequestItem
-
nodeId
public String nodeId()
- Specified by:
nodeIdin interfacePullRequest- Returns:
- The value of the
nodeIdattribute
-
merged
@Nullable public Boolean merged()
Is it merged.- Specified by:
mergedin interfacePullRequest
-
mergeable
public Optional<Boolean> mergeable()
Is it mergeable.- Specified by:
mergeablein interfacePullRequest
-
mergedBy
public Optional<User> mergedBy()
Merged by user.- Specified by:
mergedByin interfacePullRequest
-
comments
@Nullable public Integer comments()
Number of comments.- Specified by:
commentsin interfacePullRequest
-
reviewComments
@Nullable public Integer reviewComments()
Number of review (commit) comments.- Specified by:
reviewCommentsin interfacePullRequest
-
commits
@Nullable public Integer commits()
Number of commits.- Specified by:
commitsin interfacePullRequest
-
additions
@Nullable public Integer additions()
Number of additions.- Specified by:
additionsin interfacePullRequest
-
deletions
@Nullable public Integer deletions()
Number of deletions.- Specified by:
deletionsin interfacePullRequest
-
changedFiles
@Nullable public Integer changedFiles()
Number of changed files.- Specified by:
changedFilesin interfacePullRequest
-
mergeableState
@Nullable public String mergeableState()
The mergeable state of this PR.- Specified by:
mergeableStatein interfacePullRequest
-
draft
public Optional<Boolean> draft()
Is it a draft PR?- Specified by:
draftin interfacePullRequest
-
labels
@Nullable public List<Label> labels()
- Specified by:
labelsin interfacePullRequest- Returns:
- The value of the
labelsattribute
-
withCreatedAt
public final ImmutablePullRequest withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createdAt (can benull)- Returns:
- A modified copy of the
thisobject
-
withUpdatedAt
public final ImmutablePullRequest withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for updatedAt (can benull)- Returns:
- A modified copy of the
thisobject
-
withClosedAt
public final ImmutablePullRequest withClosedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalclosedAtattribute.- Parameters:
value- The value for closedAt- Returns:
- A modified copy of
thisobject
-
withClosedAt
public final ImmutablePullRequest withClosedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for theclosedAtattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for closedAt- Returns:
- A modified copy of
thisobject
-
withId
public final ImmutablePullRequest withId(@Nullable Long value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id (can benull)- Returns:
- A modified copy of the
thisobject
-
withUrl
public final ImmutablePullRequest withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for url (can benull)- Returns:
- A modified copy of the
thisobject
-
withHtmlUrl
public final ImmutablePullRequest withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for htmlUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withDiffUrl
public final ImmutablePullRequest withDiffUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thediffUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for diffUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withPatchUrl
public final ImmutablePullRequest withPatchUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thepatchUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for patchUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withIssueUrl
public final ImmutablePullRequest withIssueUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theissueUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for issueUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withCommitsUrl
public final ImmutablePullRequest withCommitsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thecommitsUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commitsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withNumber
public final ImmutablePullRequest withNumber(@Nullable Integer value)
Copy the current immutable object by setting a value for thenumberattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for number (can benull)- Returns:
- A modified copy of the
thisobject
-
withState
public final ImmutablePullRequest withState(@Nullable String value)
Copy the current immutable object by setting a value for thestateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state (can benull)- Returns:
- A modified copy of the
thisobject
-
withTitle
public final ImmutablePullRequest withTitle(@Nullable String value)
Copy the current immutable object by setting a value for thetitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title (can benull)- Returns:
- A modified copy of the
thisobject
-
withBody
public final ImmutablePullRequest withBody(String value)
Copy the current immutable object by setting a present value for the optionalbodyattribute.- Parameters:
value- The value for body- Returns:
- A modified copy of
thisobject
-
withBody
public final ImmutablePullRequest withBody(Optional<String> optional)
Copy the current immutable object by setting an optional value for thebodyattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for body- Returns:
- A modified copy of
thisobject
-
withAssignee
public final ImmutablePullRequest withAssignee(User value)
Copy the current immutable object by setting a present value for the optionalassigneeattribute.- Parameters:
value- The value for assignee- Returns:
- A modified copy of
thisobject
-
withAssignee
public final ImmutablePullRequest withAssignee(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for theassigneeattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for assignee- Returns:
- A modified copy of
thisobject
-
withAssignees
public final ImmutablePullRequest withAssignees(List<User> value)
Copy the current immutable object by setting a present value for the optionalassigneesattribute.- Parameters:
value- The value for assignees- Returns:
- A modified copy of
thisobject
-
withAssignees
public final ImmutablePullRequest withAssignees(Optional<? extends List<User>> optional)
Copy the current immutable object by setting an optional value for theassigneesattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for assignees- Returns:
- A modified copy of
thisobject
-
withMilestone
public final ImmutablePullRequest withMilestone(Milestone value)
Copy the current immutable object by setting a present value for the optionalmilestoneattribute.- Parameters:
value- The value for milestone- Returns:
- A modified copy of
thisobject
-
withMilestone
public final ImmutablePullRequest withMilestone(Optional<? extends Milestone> optional)
Copy the current immutable object by setting an optional value for themilestoneattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for milestone- Returns:
- A modified copy of
thisobject
-
withLocked
public final ImmutablePullRequest withLocked(@Nullable Boolean value)
Copy the current immutable object by setting a value for thelockedattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for locked (can benull)- Returns:
- A modified copy of the
thisobject
-
withMergedAt
public final ImmutablePullRequest withMergedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalmergedAtattribute.- Parameters:
value- The value for mergedAt- Returns:
- A modified copy of
thisobject
-
withMergedAt
public final ImmutablePullRequest withMergedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for themergedAtattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for mergedAt- Returns:
- A modified copy of
thisobject
-
withHead
public final ImmutablePullRequest withHead(@Nullable PullRequestRef value)
Copy the current immutable object by setting a value for theheadattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for head (can benull)- Returns:
- A modified copy of the
thisobject
-
withBase
public final ImmutablePullRequest withBase(@Nullable PullRequestRef value)
Copy the current immutable object by setting a value for thebaseattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for base (can benull)- Returns:
- A modified copy of the
thisobject
-
withUser
public final ImmutablePullRequest withUser(@Nullable User value)
Copy the current immutable object by setting a value for theuserattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for user (can benull)- Returns:
- A modified copy of the
thisobject
-
withStatusesUrl
public final ImmutablePullRequest withStatusesUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thestatusesUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for statusesUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withReviewCommentsUrl
public final ImmutablePullRequest withReviewCommentsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thereviewCommentsUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reviewCommentsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withReviewCommentUrl
public final ImmutablePullRequest withReviewCommentUrl(@Nullable String value)
Copy the current immutable object by setting a value for thereviewCommentUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reviewCommentUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withCommentsUrl
public final ImmutablePullRequest withCommentsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thecommentsUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commentsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withLinks
public final ImmutablePullRequest withLinks(@Nullable PullRequestLinks value)
Copy the current immutable object by setting a value for thelinksattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for links (can benull)- Returns:
- A modified copy of the
thisobject
-
withRequestedReviewers
public final ImmutablePullRequest withRequestedReviewers(@Nullable User... elements)
Copy the current immutable object with elements that replace the content ofrequestedReviewers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRequestedReviewers
public final ImmutablePullRequest withRequestedReviewers(@Nullable Iterable<? extends User> elements)
Copy the current immutable object with elements that replace the content ofrequestedReviewers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of requestedReviewers elements to set- Returns:
- A modified copy of
thisobject
-
withRequestedTeams
public final ImmutablePullRequest withRequestedTeams(@Nullable User... elements)
Copy the current immutable object with elements that replace the content ofrequestedTeams.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRequestedTeams
public final ImmutablePullRequest withRequestedTeams(@Nullable Iterable<? extends User> elements)
Copy the current immutable object with elements that replace the content ofrequestedTeams. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of requestedTeams elements to set- Returns:
- A modified copy of
thisobject
-
withMergeCommitSha
public final ImmutablePullRequest withMergeCommitSha(String value)
Copy the current immutable object by setting a present value for the optionalmergeCommitShaattribute.- Parameters:
value- The value for mergeCommitSha- Returns:
- A modified copy of
thisobject
-
withMergeCommitSha
public final ImmutablePullRequest withMergeCommitSha(Optional<String> optional)
Copy the current immutable object by setting an optional value for themergeCommitShaattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for mergeCommitSha- Returns:
- A modified copy of
thisobject
-
withNodeId
public final ImmutablePullRequest withNodeId(String value)
Copy the current immutable object by setting a value for thenodeIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nodeId- Returns:
- A modified copy of the
thisobject
-
withMerged
public final ImmutablePullRequest withMerged(@Nullable Boolean value)
Copy the current immutable object by setting a value for themergedattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for merged (can benull)- Returns:
- A modified copy of the
thisobject
-
withMergeable
public final ImmutablePullRequest withMergeable(boolean value)
Copy the current immutable object by setting a present value for the optionalmergeableattribute.- Parameters:
value- The value for mergeable- Returns:
- A modified copy of
thisobject
-
withMergeable
public final ImmutablePullRequest withMergeable(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for themergeableattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for mergeable- Returns:
- A modified copy of
thisobject
-
withMergedBy
public final ImmutablePullRequest withMergedBy(User value)
Copy the current immutable object by setting a present value for the optionalmergedByattribute.- Parameters:
value- The value for mergedBy- Returns:
- A modified copy of
thisobject
-
withMergedBy
public final ImmutablePullRequest withMergedBy(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for themergedByattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for mergedBy- Returns:
- A modified copy of
thisobject
-
withComments
public final ImmutablePullRequest withComments(@Nullable Integer value)
Copy the current immutable object by setting a value for thecommentsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for comments (can benull)- Returns:
- A modified copy of the
thisobject
-
withReviewComments
public final ImmutablePullRequest withReviewComments(@Nullable Integer value)
Copy the current immutable object by setting a value for thereviewCommentsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reviewComments (can benull)- Returns:
- A modified copy of the
thisobject
-
withCommits
public final ImmutablePullRequest withCommits(@Nullable Integer value)
Copy the current immutable object by setting a value for thecommitsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commits (can benull)- Returns:
- A modified copy of the
thisobject
-
withAdditions
public final ImmutablePullRequest withAdditions(@Nullable Integer value)
Copy the current immutable object by setting a value for theadditionsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for additions (can benull)- Returns:
- A modified copy of the
thisobject
-
withDeletions
public final ImmutablePullRequest withDeletions(@Nullable Integer value)
Copy the current immutable object by setting a value for thedeletionsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deletions (can benull)- Returns:
- A modified copy of the
thisobject
-
withChangedFiles
public final ImmutablePullRequest withChangedFiles(@Nullable Integer value)
Copy the current immutable object by setting a value for thechangedFilesattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for changedFiles (can benull)- Returns:
- A modified copy of the
thisobject
-
withMergeableState
public final ImmutablePullRequest withMergeableState(@Nullable String value)
Copy the current immutable object by setting a value for themergeableStateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mergeableState (can benull)- Returns:
- A modified copy of the
thisobject
-
withDraft
public final ImmutablePullRequest withDraft(boolean value)
Copy the current immutable object by setting a present value for the optionaldraftattribute.- Parameters:
value- The value for draft- Returns:
- A modified copy of
thisobject
-
withDraft
public final ImmutablePullRequest withDraft(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for thedraftattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for draft- Returns:
- A modified copy of
thisobject
-
withLabels
public final ImmutablePullRequest withLabels(@Nullable Label... elements)
Copy the current immutable object with elements that replace the content oflabels.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLabels
public final ImmutablePullRequest withLabels(@Nullable Iterable<? extends Label> elements)
Copy the current immutable object with elements that replace the content oflabels. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of labels elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutablePullRequestthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:createdAt,updatedAt,closedAt,id,url,htmlUrl,diffUrl,patchUrl,issueUrl,commitsUrl,number,state,title,body,assignee,assignees,milestone,locked,mergedAt,head,base,user,statusesUrl,reviewCommentsUrl,reviewCommentUrl,commentsUrl,links,requestedReviewers,requestedTeams,mergeCommitSha,nodeId,merged,mergeable,mergedBy,comments,reviewComments,commits,additions,deletions,changedFiles,mergeableState,draft,labels.
-
toString
public String toString()
Prints the immutable valuePullRequestwith attribute values.
-
copyOf
public static ImmutablePullRequest copyOf(PullRequest instance)
Creates an immutable copy of aPullRequestvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable PullRequest instance
-
builder
public static ImmutablePullRequest.Builder builder()
Creates a builder forImmutablePullRequest.ImmutablePullRequest.builder() .createdAt(com.spotify.github.GitHubInstant | null) // nullablecreatedAt.updatedAt(com.spotify.github.GitHubInstant | null) // nullableupdatedAt.closedAt(com.spotify.github.GitHubInstant) // optionalclosedAt.id(Long | null) // nullableid.url(java.net.URI | null) // nullableurl.htmlUrl(java.net.URI | null) // nullablehtmlUrl.diffUrl(java.net.URI | null) // nullablediffUrl.patchUrl(java.net.URI | null) // nullablepatchUrl.issueUrl(java.net.URI | null) // nullableissueUrl.commitsUrl(java.net.URI | null) // nullablecommitsUrl.number(Integer | null) // nullablenumber.state(String | null) // nullablestate.title(String | null) // nullabletitle.body(String) // optionalbody.assignee(com.spotify.github.v3.User) // optionalassignee.assignees(List<com.spotify.github.v3.User>) // optionalassignees.milestone(com.spotify.github.v3.Milestone) // optionalmilestone.locked(Boolean | null) // nullablelocked.mergedAt(com.spotify.github.GitHubInstant) // optionalmergedAt.head(com.spotify.github.v3.prs.PullRequestRef | null) // nullablehead.base(com.spotify.github.v3.prs.PullRequestRef | null) // nullablebase.user(com.spotify.github.v3.User | null) // nullableuser.statusesUrl(java.net.URI | null) // nullablestatusesUrl.reviewCommentsUrl(java.net.URI | null) // nullablereviewCommentsUrl.reviewCommentUrl(String | null) // nullablereviewCommentUrl.commentsUrl(java.net.URI | null) // nullablecommentsUrl.links(com.spotify.github.v3.prs.PullRequestLinks | null) // nullablelinks.requestedReviewers(List<com.spotify.github.v3.User> | null) // nullablerequestedReviewers.requestedTeams(List<com.spotify.github.v3.User> | null) // nullablerequestedTeams.mergeCommitSha(String) // optionalmergeCommitSha.nodeId(String) // requirednodeId.merged(Boolean | null) // nullablemerged.mergeable(Boolean) // optionalmergeable.mergedBy(com.spotify.github.v3.User) // optionalmergedBy.comments(Integer | null) // nullablecomments.reviewComments(Integer | null) // nullablereviewComments.commits(Integer | null) // nullablecommits.additions(Integer | null) // nullableadditions.deletions(Integer | null) // nullabledeletions.changedFiles(Integer | null) // nullablechangedFiles.mergeableState(String | null) // nullablemergeableState.draft(Boolean) // optionaldraft.labels(List<com.spotify.github.v3.issues.Label> | null) // nullablelabels.build();- Returns:
- A new ImmutablePullRequest builder
-
-