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 class
ImmutablePullRequest.Builder
Builds instances of typeImmutablePullRequest
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
additions()
Number of additions.Optional<User>
assignee()
Assignee.Optional<List<User>>
assignees()
Assignees.PullRequestRef
base()
Base reference.Optional<String>
body()
The contents of the pull request.static ImmutablePullRequest.Builder
builder()
Creates a builder forImmutablePullRequest
.Integer
changedFiles()
Number of changed files.Optional<GitHubInstant>
closedAt()
Closed date.Integer
comments()
Number of comments.URI
commentsUrl()
Comments API URL.Integer
commits()
Number of commits.URI
commitsUrl()
Commits URL.static ImmutablePullRequest
copyOf(PullRequest instance)
Creates an immutable copy of aPullRequest
value.GitHubInstant
createdAt()
Created dateInteger
deletions()
Number of deletions.URI
diffUrl()
Diff URL.boolean
equals(Object another)
This instance is equal to all instances ofImmutablePullRequest
that have equal attribute values.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
,mergeCommitSha
,merged
,mergeable
,mergedBy
,comments
,reviewComments
,commits
,additions
,deletions
,changedFiles
,mergeableState
.PullRequestRef
head()
Head reference.URI
htmlUrl()
HTML URL.Integer
id()
ID.URI
issueUrl()
Issue URL.PullRequestLinks
links()
Link references.Boolean
locked()
Is it locked.Optional<Boolean>
mergeable()
Is it mergeable.String
mergeableState()
The mergeable state of this PR.Optional<String>
mergeCommitSha()
Boolean
merged()
Is it merged.Optional<GitHubInstant>
mergedAt()
Merged date.Optional<User>
mergedBy()
Merged by user.Optional<Milestone>
milestone()
Milestone.Integer
number()
Number.URI
patchUrl()
Patch URL.Integer
reviewComments()
Number of review (commit) comments.URI
reviewCommentsUrl()
Review comments API URL.String
reviewCommentUrl()
Review comment API URL template.String
state()
Either open, closed, or all to filter by state.URI
statusesUrl()
Statuses API URL.String
title()
The title of the pull request.String
toString()
Prints the immutable valuePullRequest
with attribute values.GitHubInstant
updatedAt()
Updated dateURI
url()
URL.User
user()
User.ImmutablePullRequest
withAdditions(Integer value)
Copy the current immutable object by setting a value for theadditions
attribute.ImmutablePullRequest
withAssignee(User value)
Copy the current immutable object by setting a present value for the optionalassignee
attribute.ImmutablePullRequest
withAssignee(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for theassignee
attribute.ImmutablePullRequest
withAssignees(List<User> value)
Copy the current immutable object by setting a present value for the optionalassignees
attribute.ImmutablePullRequest
withAssignees(Optional<? extends List<User>> optional)
Copy the current immutable object by setting an optional value for theassignees
attribute.ImmutablePullRequest
withBase(PullRequestRef value)
Copy the current immutable object by setting a value for thebase
attribute.ImmutablePullRequest
withBody(String value)
Copy the current immutable object by setting a present value for the optionalbody
attribute.ImmutablePullRequest
withBody(Optional<String> optional)
Copy the current immutable object by setting an optional value for thebody
attribute.ImmutablePullRequest
withChangedFiles(Integer value)
Copy the current immutable object by setting a value for thechangedFiles
attribute.ImmutablePullRequest
withClosedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalclosedAt
attribute.ImmutablePullRequest
withClosedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for theclosedAt
attribute.ImmutablePullRequest
withComments(Integer value)
Copy the current immutable object by setting a value for thecomments
attribute.ImmutablePullRequest
withCommentsUrl(URI value)
Copy the current immutable object by setting a value for thecommentsUrl
attribute.ImmutablePullRequest
withCommits(Integer value)
Copy the current immutable object by setting a value for thecommits
attribute.ImmutablePullRequest
withCommitsUrl(URI value)
Copy the current immutable object by setting a value for thecommitsUrl
attribute.ImmutablePullRequest
withCreatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutablePullRequest
withDeletions(Integer value)
Copy the current immutable object by setting a value for thedeletions
attribute.ImmutablePullRequest
withDiffUrl(URI value)
Copy the current immutable object by setting a value for thediffUrl
attribute.ImmutablePullRequest
withHead(PullRequestRef value)
Copy the current immutable object by setting a value for thehead
attribute.ImmutablePullRequest
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutablePullRequest
withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute.ImmutablePullRequest
withIssueUrl(URI value)
Copy the current immutable object by setting a value for theissueUrl
attribute.ImmutablePullRequest
withLinks(PullRequestLinks value)
Copy the current immutable object by setting a value for thelinks
attribute.ImmutablePullRequest
withLocked(Boolean value)
Copy the current immutable object by setting a value for thelocked
attribute.ImmutablePullRequest
withMergeable(boolean value)
Copy the current immutable object by setting a present value for the optionalmergeable
attribute.ImmutablePullRequest
withMergeable(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for themergeable
attribute.ImmutablePullRequest
withMergeableState(String value)
Copy the current immutable object by setting a value for themergeableState
attribute.ImmutablePullRequest
withMergeCommitSha(String value)
Copy the current immutable object by setting a present value for the optionalmergeCommitSha
attribute.ImmutablePullRequest
withMergeCommitSha(Optional<String> optional)
Copy the current immutable object by setting an optional value for themergeCommitSha
attribute.ImmutablePullRequest
withMerged(Boolean value)
Copy the current immutable object by setting a value for themerged
attribute.ImmutablePullRequest
withMergedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalmergedAt
attribute.ImmutablePullRequest
withMergedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for themergedAt
attribute.ImmutablePullRequest
withMergedBy(User value)
Copy the current immutable object by setting a present value for the optionalmergedBy
attribute.ImmutablePullRequest
withMergedBy(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for themergedBy
attribute.ImmutablePullRequest
withMilestone(Milestone value)
Copy the current immutable object by setting a present value for the optionalmilestone
attribute.ImmutablePullRequest
withMilestone(Optional<? extends Milestone> optional)
Copy the current immutable object by setting an optional value for themilestone
attribute.ImmutablePullRequest
withNumber(Integer value)
Copy the current immutable object by setting a value for thenumber
attribute.ImmutablePullRequest
withPatchUrl(URI value)
Copy the current immutable object by setting a value for thepatchUrl
attribute.ImmutablePullRequest
withReviewComments(Integer value)
Copy the current immutable object by setting a value for thereviewComments
attribute.ImmutablePullRequest
withReviewCommentsUrl(URI value)
Copy the current immutable object by setting a value for thereviewCommentsUrl
attribute.ImmutablePullRequest
withReviewCommentUrl(String value)
Copy the current immutable object by setting a value for thereviewCommentUrl
attribute.ImmutablePullRequest
withState(String value)
Copy the current immutable object by setting a value for thestate
attribute.ImmutablePullRequest
withStatusesUrl(URI value)
Copy the current immutable object by setting a value for thestatusesUrl
attribute.ImmutablePullRequest
withTitle(String value)
Copy the current immutable object by setting a value for thetitle
attribute.ImmutablePullRequest
withUpdatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute.ImmutablePullRequest
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.ImmutablePullRequest
withUser(User value)
Copy the current immutable object by setting a value for theuser
attribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was updated
-
closedAt
public Optional<GitHubInstant> closedAt()
Closed date.- Specified by:
closedAt
in interfaceCloseTracking
- Returns:
- The date when the issue was closed
-
id
@Nullable public Integer id()
ID.- Specified by:
id
in interfacePullRequestItem
-
url
@Nullable public URI url()
URL.- Specified by:
url
in interfacePullRequestItem
-
htmlUrl
@Nullable public URI htmlUrl()
HTML URL.- Specified by:
htmlUrl
in interfacePullRequestItem
-
diffUrl
@Nullable public URI diffUrl()
Diff URL.- Specified by:
diffUrl
in interfacePullRequestItem
-
patchUrl
@Nullable public URI patchUrl()
Patch URL.- Specified by:
patchUrl
in interfacePullRequestItem
-
issueUrl
@Nullable public URI issueUrl()
Issue URL.- Specified by:
issueUrl
in interfacePullRequestItem
-
commitsUrl
@Nullable public URI commitsUrl()
Commits URL.- Specified by:
commitsUrl
in interfacePullRequestItem
-
number
@Nullable public Integer number()
Number.- Specified by:
number
in interfacePullRequestItem
-
state
@Nullable public String state()
Either open, closed, or all to filter by state. Default: open.- Specified by:
state
in interfacePullRequestItem
-
title
@Nullable public String title()
The title of the pull request.- Specified by:
title
in interfacePullRequestItem
-
body
public Optional<String> body()
The contents of the pull request.- Specified by:
body
in interfacePullRequestItem
-
assignee
public Optional<User> assignee()
Assignee.- Specified by:
assignee
in interfacePullRequestItem
-
assignees
public Optional<List<User>> assignees()
Assignees.- Specified by:
assignees
in interfacePullRequestItem
-
milestone
public Optional<Milestone> milestone()
Milestone.- Specified by:
milestone
in interfacePullRequestItem
-
locked
@Nullable public Boolean locked()
Is it locked.- Specified by:
locked
in interfacePullRequestItem
-
mergedAt
public Optional<GitHubInstant> mergedAt()
Merged date.- Specified by:
mergedAt
in interfacePullRequestItem
-
head
@Nullable public PullRequestRef head()
Head reference.- Specified by:
head
in interfacePullRequestItem
-
base
@Nullable public PullRequestRef base()
Base reference.- Specified by:
base
in interfacePullRequestItem
-
user
@Nullable public User user()
User.- Specified by:
user
in interfacePullRequestItem
-
statusesUrl
@Nullable public URI statusesUrl()
Statuses API URL.- Specified by:
statusesUrl
in interfacePullRequestItem
-
reviewCommentsUrl
@Nullable public URI reviewCommentsUrl()
Review comments API URL.- Specified by:
reviewCommentsUrl
in interfacePullRequestItem
-
reviewCommentUrl
@Nullable public String reviewCommentUrl()
Review comment API URL template.- Specified by:
reviewCommentUrl
in interfacePullRequestItem
-
commentsUrl
@Nullable public URI commentsUrl()
Comments API URL.- Specified by:
commentsUrl
in interfacePullRequestItem
-
links
@Nullable public PullRequestLinks links()
Link references.- Specified by:
links
in interfacePullRequestItem
-
mergeCommitSha
public Optional<String> mergeCommitSha()
- Specified by:
mergeCommitSha
in interfacePullRequestItem
-
merged
@Nullable public Boolean merged()
Is it merged.- Specified by:
merged
in interfacePullRequest
-
mergeable
public Optional<Boolean> mergeable()
Is it mergeable.- Specified by:
mergeable
in interfacePullRequest
-
mergedBy
public Optional<User> mergedBy()
Merged by user.- Specified by:
mergedBy
in interfacePullRequest
-
comments
@Nullable public Integer comments()
Number of comments.- Specified by:
comments
in interfacePullRequest
-
reviewComments
@Nullable public Integer reviewComments()
Number of review (commit) comments.- Specified by:
reviewComments
in interfacePullRequest
-
commits
@Nullable public Integer commits()
Number of commits.- Specified by:
commits
in interfacePullRequest
-
additions
@Nullable public Integer additions()
Number of additions.- Specified by:
additions
in interfacePullRequest
-
deletions
@Nullable public Integer deletions()
Number of deletions.- Specified by:
deletions
in interfacePullRequest
-
changedFiles
@Nullable public Integer changedFiles()
Number of changed files.- Specified by:
changedFiles
in interfacePullRequest
-
mergeableState
@Nullable public String mergeableState()
The mergeable state of this PR.- Specified by:
mergeableState
in interfacePullRequest
-
withCreatedAt
public final ImmutablePullRequest withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute. 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
this
object
-
withUpdatedAt
public final ImmutablePullRequest withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute. 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
this
object
-
withClosedAt
public final ImmutablePullRequest withClosedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalclosedAt
attribute.- Parameters:
value
- The value for closedAt- Returns:
- A modified copy of
this
object
-
withClosedAt
public final ImmutablePullRequest withClosedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for theclosedAt
attribute. 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
this
object
-
withId
public final ImmutablePullRequest withId(@Nullable Integer value)
Copy the current immutable object by setting a value for theid
attribute. 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
this
object
-
withUrl
public final ImmutablePullRequest withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurl
attribute. 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
this
object
-
withHtmlUrl
public final ImmutablePullRequest withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute. 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
this
object
-
withDiffUrl
public final ImmutablePullRequest withDiffUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thediffUrl
attribute. 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
this
object
-
withPatchUrl
public final ImmutablePullRequest withPatchUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thepatchUrl
attribute. 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
this
object
-
withIssueUrl
public final ImmutablePullRequest withIssueUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theissueUrl
attribute. 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
this
object
-
withCommitsUrl
public final ImmutablePullRequest withCommitsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thecommitsUrl
attribute. 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
this
object
-
withNumber
public final ImmutablePullRequest withNumber(@Nullable Integer value)
Copy the current immutable object by setting a value for thenumber
attribute. 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
this
object
-
withState
public final ImmutablePullRequest withState(@Nullable String value)
Copy the current immutable object by setting a value for thestate
attribute. 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
this
object
-
withTitle
public final ImmutablePullRequest withTitle(@Nullable String value)
Copy the current immutable object by setting a value for thetitle
attribute. 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
this
object
-
withBody
public final ImmutablePullRequest withBody(String value)
Copy the current immutable object by setting a present value for the optionalbody
attribute.- Parameters:
value
- The value for body- Returns:
- A modified copy of
this
object
-
withBody
public final ImmutablePullRequest withBody(Optional<String> optional)
Copy the current immutable object by setting an optional value for thebody
attribute. 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
this
object
-
withAssignee
public final ImmutablePullRequest withAssignee(User value)
Copy the current immutable object by setting a present value for the optionalassignee
attribute.- Parameters:
value
- The value for assignee- Returns:
- A modified copy of
this
object
-
withAssignee
public final ImmutablePullRequest withAssignee(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for theassignee
attribute. 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
this
object
-
withAssignees
public final ImmutablePullRequest withAssignees(List<User> value)
Copy the current immutable object by setting a present value for the optionalassignees
attribute.- Parameters:
value
- The value for assignees- Returns:
- A modified copy of
this
object
-
withAssignees
public final ImmutablePullRequest withAssignees(Optional<? extends List<User>> optional)
Copy the current immutable object by setting an optional value for theassignees
attribute. 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
this
object
-
withMilestone
public final ImmutablePullRequest withMilestone(Milestone value)
Copy the current immutable object by setting a present value for the optionalmilestone
attribute.- Parameters:
value
- The value for milestone- Returns:
- A modified copy of
this
object
-
withMilestone
public final ImmutablePullRequest withMilestone(Optional<? extends Milestone> optional)
Copy the current immutable object by setting an optional value for themilestone
attribute. 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
this
object
-
withLocked
public final ImmutablePullRequest withLocked(@Nullable Boolean value)
Copy the current immutable object by setting a value for thelocked
attribute. 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
this
object
-
withMergedAt
public final ImmutablePullRequest withMergedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalmergedAt
attribute.- Parameters:
value
- The value for mergedAt- Returns:
- A modified copy of
this
object
-
withMergedAt
public final ImmutablePullRequest withMergedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for themergedAt
attribute. 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
this
object
-
withHead
public final ImmutablePullRequest withHead(@Nullable PullRequestRef value)
Copy the current immutable object by setting a value for thehead
attribute. 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
this
object
-
withBase
public final ImmutablePullRequest withBase(@Nullable PullRequestRef value)
Copy the current immutable object by setting a value for thebase
attribute. 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
this
object
-
withUser
public final ImmutablePullRequest withUser(@Nullable User value)
Copy the current immutable object by setting a value for theuser
attribute. 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
this
object
-
withStatusesUrl
public final ImmutablePullRequest withStatusesUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thestatusesUrl
attribute. 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
this
object
-
withReviewCommentsUrl
public final ImmutablePullRequest withReviewCommentsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thereviewCommentsUrl
attribute. 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
this
object
-
withReviewCommentUrl
public final ImmutablePullRequest withReviewCommentUrl(@Nullable String value)
Copy the current immutable object by setting a value for thereviewCommentUrl
attribute. 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
this
object
-
withCommentsUrl
public final ImmutablePullRequest withCommentsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thecommentsUrl
attribute. 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
this
object
-
withLinks
public final ImmutablePullRequest withLinks(@Nullable PullRequestLinks value)
Copy the current immutable object by setting a value for thelinks
attribute. 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
this
object
-
withMergeCommitSha
public final ImmutablePullRequest withMergeCommitSha(String value)
Copy the current immutable object by setting a present value for the optionalmergeCommitSha
attribute.- Parameters:
value
- The value for mergeCommitSha- Returns:
- A modified copy of
this
object
-
withMergeCommitSha
public final ImmutablePullRequest withMergeCommitSha(Optional<String> optional)
Copy the current immutable object by setting an optional value for themergeCommitSha
attribute. 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
this
object
-
withMerged
public final ImmutablePullRequest withMerged(@Nullable Boolean value)
Copy the current immutable object by setting a value for themerged
attribute. 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
this
object
-
withMergeable
public final ImmutablePullRequest withMergeable(boolean value)
Copy the current immutable object by setting a present value for the optionalmergeable
attribute.- Parameters:
value
- The value for mergeable- Returns:
- A modified copy of
this
object
-
withMergeable
public final ImmutablePullRequest withMergeable(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for themergeable
attribute. 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
this
object
-
withMergedBy
public final ImmutablePullRequest withMergedBy(User value)
Copy the current immutable object by setting a present value for the optionalmergedBy
attribute.- Parameters:
value
- The value for mergedBy- Returns:
- A modified copy of
this
object
-
withMergedBy
public final ImmutablePullRequest withMergedBy(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for themergedBy
attribute. 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
this
object
-
withComments
public final ImmutablePullRequest withComments(@Nullable Integer value)
Copy the current immutable object by setting a value for thecomments
attribute. 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
this
object
-
withReviewComments
public final ImmutablePullRequest withReviewComments(@Nullable Integer value)
Copy the current immutable object by setting a value for thereviewComments
attribute. 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
this
object
-
withCommits
public final ImmutablePullRequest withCommits(@Nullable Integer value)
Copy the current immutable object by setting a value for thecommits
attribute. 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
this
object
-
withAdditions
public final ImmutablePullRequest withAdditions(@Nullable Integer value)
Copy the current immutable object by setting a value for theadditions
attribute. 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
this
object
-
withDeletions
public final ImmutablePullRequest withDeletions(@Nullable Integer value)
Copy the current immutable object by setting a value for thedeletions
attribute. 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
this
object
-
withChangedFiles
public final ImmutablePullRequest withChangedFiles(@Nullable Integer value)
Copy the current immutable object by setting a value for thechangedFiles
attribute. 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
this
object
-
withMergeableState
public final ImmutablePullRequest withMergeableState(@Nullable String value)
Copy the current immutable object by setting a value for themergeableState
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutablePullRequest
that 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
,mergeCommitSha
,merged
,mergeable
,mergedBy
,comments
,reviewComments
,commits
,additions
,deletions
,changedFiles
,mergeableState
.
-
toString
public String toString()
Prints the immutable valuePullRequest
with attribute values.
-
copyOf
public static ImmutablePullRequest copyOf(PullRequest instance)
Creates an immutable copy of aPullRequest
value. 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) // nullable
createdAt
.updatedAt(com.spotify.github.GitHubInstant | null) // nullableupdatedAt
.closedAt(com.spotify.github.GitHubInstant) // optionalclosedAt
.id(Integer | 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
.mergeCommitSha(String) // optionalmergeCommitSha
.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
.build();- Returns:
- A new ImmutablePullRequest builder
-
-