Package com.spotify.github.v3.issues
Class ImmutableIssue
- java.lang.Object
-
- com.spotify.github.v3.issues.ImmutableIssue
-
- All Implemented Interfaces:
CloseTracking,UpdateTracking,Issue
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableIssue extends Object implements Issue
Immutable implementation ofIssue.Use the builder to create immutable instances:
ImmutableIssue.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableIssue.BuilderBuilds instances of typeImmutableIssue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<User>assignee()Login for the user that this issue should be assigned to.Optional<String>body()The contents of the issue.static ImmutableIssue.Builderbuilder()Creates a builder forImmutableIssue.Optional<GitHubInstant>closedAt()Closed date.Integercomments()Number of comments.URIcommentsUrl()Comments URL.static ImmutableIssuecopyOf(Issue instance)Creates an immutable copy of aIssuevalue.GitHubInstantcreatedAt()Created datebooleanequals(Object another)This instance is equal to all instances ofImmutableIssuethat have equal attribute values.Optional<URI>eventsUrl()Events URL.inthashCode()Computes a hash code from attributes:createdAt,updatedAt,closedAt,id,url,eventsUrl,repositoryUrl,labelsUrl,commentsUrl,htmlUrl,number,state,title,body,user,labels,assignee,milestone,locked,comments,pullRequest.URIhtmlUrl()HTML URL.Longid()ID.List<Label>labels()A list of comma separated label names.StringlabelsUrl()Labels URL template.Booleanlocked()Is locked.Optional<Milestone>milestone()The milestone associated this issue with.Integernumber()Number.Optional<PullRequest>pullRequest()Pull request.Optional<URI>repositoryUrl()Repository URL.Stringstate()Indicates the state of the issues to return.Stringtitle()The title of the issue.StringtoString()Prints the immutable valueIssuewith attribute values.GitHubInstantupdatedAt()Updated dateURIurl()URL.Useruser()User.ImmutableIssuewithAssignee(User value)Copy the current immutable object by setting a present value for the optionalassigneeattribute.ImmutableIssuewithAssignee(Optional<? extends User> optional)Copy the current immutable object by setting an optional value for theassigneeattribute.ImmutableIssuewithBody(String value)Copy the current immutable object by setting a present value for the optionalbodyattribute.ImmutableIssuewithBody(Optional<String> optional)Copy the current immutable object by setting an optional value for thebodyattribute.ImmutableIssuewithClosedAt(GitHubInstant value)Copy the current immutable object by setting a present value for the optionalclosedAtattribute.ImmutableIssuewithClosedAt(Optional<? extends GitHubInstant> optional)Copy the current immutable object by setting an optional value for theclosedAtattribute.ImmutableIssuewithComments(Integer value)Copy the current immutable object by setting a value for thecommentsattribute.ImmutableIssuewithCommentsUrl(URI value)Copy the current immutable object by setting a value for thecommentsUrlattribute.ImmutableIssuewithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableIssuewithEventsUrl(URI value)Copy the current immutable object by setting a present value for the optionaleventsUrlattribute.ImmutableIssuewithEventsUrl(Optional<? extends URI> optional)Copy the current immutable object by setting an optional value for theeventsUrlattribute.ImmutableIssuewithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableIssuewithId(Long value)Copy the current immutable object by setting a value for theidattribute.ImmutableIssuewithLabels(Label... elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableIssuewithLabels(Iterable<? extends Label> elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableIssuewithLabelsUrl(String value)Copy the current immutable object by setting a value for thelabelsUrlattribute.ImmutableIssuewithLocked(Boolean value)Copy the current immutable object by setting a value for thelockedattribute.ImmutableIssuewithMilestone(Milestone value)Copy the current immutable object by setting a present value for the optionalmilestoneattribute.ImmutableIssuewithMilestone(Optional<? extends Milestone> optional)Copy the current immutable object by setting an optional value for themilestoneattribute.ImmutableIssuewithNumber(Integer value)Copy the current immutable object by setting a value for thenumberattribute.ImmutableIssuewithPullRequest(PullRequest value)Copy the current immutable object by setting a present value for the optionalpullRequestattribute.ImmutableIssuewithPullRequest(Optional<? extends PullRequest> optional)Copy the current immutable object by setting an optional value for thepullRequestattribute.ImmutableIssuewithRepositoryUrl(URI value)Copy the current immutable object by setting a present value for the optionalrepositoryUrlattribute.ImmutableIssuewithRepositoryUrl(Optional<? extends URI> optional)Copy the current immutable object by setting an optional value for therepositoryUrlattribute.ImmutableIssuewithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableIssuewithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.ImmutableIssuewithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.ImmutableIssuewithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.ImmutableIssuewithUser(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
-
repositoryUrl
public Optional<URI> repositoryUrl()
Repository URL.- Specified by:
repositoryUrlin interfaceIssue
-
labelsUrl
@Nullable public String labelsUrl()
Labels URL template.
-
commentsUrl
@Nullable public URI commentsUrl()
Comments URL.- Specified by:
commentsUrlin interfaceIssue
-
state
@Nullable public String state()
Indicates the state of the issues to return. Can be either open, closed, or all.
-
title
@Nullable public String title()
The title of the issue.
-
labels
@Nullable public List<Label> labels()
A list of comma separated label names. Example: bug,ui,@highl.
-
comments
@Nullable public Integer comments()
Number of comments.
-
pullRequest
public Optional<PullRequest> pullRequest()
Pull request.- Specified by:
pullRequestin interfaceIssue
-
withCreatedAt
public final ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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
-
withEventsUrl
public final ImmutableIssue withEventsUrl(URI value)
Copy the current immutable object by setting a present value for the optionaleventsUrlattribute.- Parameters:
value- The value for eventsUrl- Returns:
- A modified copy of
thisobject
-
withEventsUrl
public final ImmutableIssue withEventsUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for theeventsUrlattribute. 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 eventsUrl- Returns:
- A modified copy of
thisobject
-
withRepositoryUrl
public final ImmutableIssue withRepositoryUrl(URI value)
Copy the current immutable object by setting a present value for the optionalrepositoryUrlattribute.- Parameters:
value- The value for repositoryUrl- Returns:
- A modified copy of
thisobject
-
withRepositoryUrl
public final ImmutableIssue withRepositoryUrl(Optional<? extends URI> optional)
Copy the current immutable object by setting an optional value for therepositoryUrlattribute. 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 repositoryUrl- Returns:
- A modified copy of
thisobject
-
withLabelsUrl
public final ImmutableIssue withLabelsUrl(@Nullable String value)
Copy the current immutable object by setting a value for thelabelsUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for labelsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withCommentsUrl
public final ImmutableIssue 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
-
withHtmlUrl
public final ImmutableIssue 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
-
withNumber
public final ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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
-
withUser
public final ImmutableIssue 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
-
withLabels
public final ImmutableIssue 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 ImmutableIssue 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
-
withAssignee
public final ImmutableIssue 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 ImmutableIssue 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
-
withMilestone
public final ImmutableIssue 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 ImmutableIssue 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 ImmutableIssue 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
-
withComments
public final ImmutableIssue 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
-
withPullRequest
public final ImmutableIssue withPullRequest(PullRequest value)
Copy the current immutable object by setting a present value for the optionalpullRequestattribute.- Parameters:
value- The value for pullRequest- Returns:
- A modified copy of
thisobject
-
withPullRequest
public final ImmutableIssue withPullRequest(Optional<? extends PullRequest> optional)
Copy the current immutable object by setting an optional value for thepullRequestattribute. 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 pullRequest- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableIssuethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:createdAt,updatedAt,closedAt,id,url,eventsUrl,repositoryUrl,labelsUrl,commentsUrl,htmlUrl,number,state,title,body,user,labels,assignee,milestone,locked,comments,pullRequest.
-
toString
public String toString()
Prints the immutable valueIssuewith attribute values.
-
copyOf
public static ImmutableIssue copyOf(Issue instance)
Creates an immutable copy of aIssuevalue. 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 Issue instance
-
builder
public static ImmutableIssue.Builder builder()
Creates a builder forImmutableIssue.ImmutableIssue.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.eventsUrl(java.net.URI) // optionaleventsUrl.repositoryUrl(java.net.URI) // optionalrepositoryUrl.labelsUrl(String | null) // nullablelabelsUrl.commentsUrl(java.net.URI | null) // nullablecommentsUrl.htmlUrl(java.net.URI | null) // nullablehtmlUrl.number(Integer | null) // nullablenumber.state(String | null) // nullablestate.title(String | null) // nullabletitle.body(String) // optionalbody.user(com.spotify.github.v3.User | null) // nullableuser.labels(List<com.spotify.github.v3.issues.Label> | null) // nullablelabels.assignee(com.spotify.github.v3.User) // optionalassignee.milestone(com.spotify.github.v3.Milestone) // optionalmilestone.locked(Boolean | null) // nullablelocked.comments(Integer | null) // nullablecomments.pullRequest(com.spotify.github.v3.issues.PullRequest) // optionalpullRequest.build();- Returns:
- A new ImmutableIssue builder
-
-