Package com.spotify.github.v3.search
Class ImmutableSearchIssue
- java.lang.Object
-
- com.spotify.github.v3.search.ImmutableSearchIssue
-
- All Implemented Interfaces:
CloseTracking,UpdateTracking,Issue,SearchIssue
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSearchIssue extends Object implements SearchIssue
Immutable implementation ofSearchIssue.Use the builder to create immutable instances:
ImmutableSearchIssue.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSearchIssue.BuilderBuilds instances of typeImmutableSearchIssue.
-
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 ImmutableSearchIssue.Builderbuilder()Creates a builder forImmutableSearchIssue.Optional<GitHubInstant>closedAt()Closed date.Integercomments()Number of comments.URIcommentsUrl()Comments URL.static ImmutableSearchIssuecopyOf(SearchIssue instance)Creates an immutable copy of aSearchIssuevalue.GitHubInstantcreatedAt()Created datebooleanequals(Object another)This instance is equal to all instances ofImmutableSearchIssuethat 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,score.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.Floatscore()Score of itemStringstate()Indicates the state of the issues to return.Stringtitle()The title of the issue.StringtoString()Prints the immutable valueSearchIssuewith attribute values.GitHubInstantupdatedAt()Updated dateURIurl()URL.Useruser()User.ImmutableSearchIssuewithAssignee(User value)Copy the current immutable object by setting a present value for the optionalassigneeattribute.ImmutableSearchIssuewithAssignee(Optional<? extends User> optional)Copy the current immutable object by setting an optional value for theassigneeattribute.ImmutableSearchIssuewithBody(String value)Copy the current immutable object by setting a present value for the optionalbodyattribute.ImmutableSearchIssuewithBody(Optional<String> optional)Copy the current immutable object by setting an optional value for thebodyattribute.ImmutableSearchIssuewithClosedAt(GitHubInstant value)Copy the current immutable object by setting a present value for the optionalclosedAtattribute.ImmutableSearchIssuewithClosedAt(Optional<? extends GitHubInstant> optional)Copy the current immutable object by setting an optional value for theclosedAtattribute.ImmutableSearchIssuewithComments(Integer value)Copy the current immutable object by setting a value for thecommentsattribute.ImmutableSearchIssuewithCommentsUrl(URI value)Copy the current immutable object by setting a value for thecommentsUrlattribute.ImmutableSearchIssuewithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableSearchIssuewithEventsUrl(URI value)Copy the current immutable object by setting a present value for the optionaleventsUrlattribute.ImmutableSearchIssuewithEventsUrl(Optional<? extends URI> optional)Copy the current immutable object by setting an optional value for theeventsUrlattribute.ImmutableSearchIssuewithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableSearchIssuewithId(Long value)Copy the current immutable object by setting a value for theidattribute.ImmutableSearchIssuewithLabels(Label... elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableSearchIssuewithLabels(Iterable<? extends Label> elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableSearchIssuewithLabelsUrl(String value)Copy the current immutable object by setting a value for thelabelsUrlattribute.ImmutableSearchIssuewithLocked(Boolean value)Copy the current immutable object by setting a value for thelockedattribute.ImmutableSearchIssuewithMilestone(Milestone value)Copy the current immutable object by setting a present value for the optionalmilestoneattribute.ImmutableSearchIssuewithMilestone(Optional<? extends Milestone> optional)Copy the current immutable object by setting an optional value for themilestoneattribute.ImmutableSearchIssuewithNumber(Integer value)Copy the current immutable object by setting a value for thenumberattribute.ImmutableSearchIssuewithPullRequest(PullRequest value)Copy the current immutable object by setting a present value for the optionalpullRequestattribute.ImmutableSearchIssuewithPullRequest(Optional<? extends PullRequest> optional)Copy the current immutable object by setting an optional value for thepullRequestattribute.ImmutableSearchIssuewithRepositoryUrl(URI value)Copy the current immutable object by setting a present value for the optionalrepositoryUrlattribute.ImmutableSearchIssuewithRepositoryUrl(Optional<? extends URI> optional)Copy the current immutable object by setting an optional value for therepositoryUrlattribute.ImmutableSearchIssuewithScore(Float value)Copy the current immutable object by setting a value for thescoreattribute.ImmutableSearchIssuewithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableSearchIssuewithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.ImmutableSearchIssuewithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.ImmutableSearchIssuewithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.ImmutableSearchIssuewithUser(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
-
score
@Nullable public Float score()
Score of item- Specified by:
scorein interfaceSearchIssue- Returns:
- float
-
withCreatedAt
public final ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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
-
withScore
public final ImmutableSearchIssue withScore(@Nullable Float value)
Copy the current immutable object by setting a value for thescoreattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for score (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSearchIssuethat 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,score.
-
toString
public String toString()
Prints the immutable valueSearchIssuewith attribute values.
-
copyOf
public static ImmutableSearchIssue copyOf(SearchIssue instance)
Creates an immutable copy of aSearchIssuevalue. 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 SearchIssue instance
-
builder
public static ImmutableSearchIssue.Builder builder()
Creates a builder forImmutableSearchIssue.ImmutableSearchIssue.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.score(Float | null) // nullablescore.build();- Returns:
- A new ImmutableSearchIssue builder
-
-