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 class
ImmutableSearchIssue.Builder
Builds 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.Builder
builder()
Creates a builder forImmutableSearchIssue
.Optional<GitHubInstant>
closedAt()
Closed date.Integer
comments()
Number of comments.URI
commentsUrl()
Comments URL.static ImmutableSearchIssue
copyOf(SearchIssue instance)
Creates an immutable copy of aSearchIssue
value.GitHubInstant
createdAt()
Created dateboolean
equals(Object another)
This instance is equal to all instances ofImmutableSearchIssue
that have equal attribute values.Optional<URI>
eventsUrl()
Events URL.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
.URI
htmlUrl()
HTML URL.Integer
id()
ID.List<Label>
labels()
A list of comma separated label names.String
labelsUrl()
Labels URL template.Boolean
locked()
Is locked.Optional<Milestone>
milestone()
The milestone associated this issue with.Integer
number()
Number.Optional<PullRequest>
pullRequest()
Pull request.Optional<URI>
repositoryUrl()
Repository URL.Float
score()
Score of itemString
state()
Indicates the state of the issues to return.String
title()
The title of the issue.String
toString()
Prints the immutable valueSearchIssue
with attribute values.GitHubInstant
updatedAt()
Updated dateURI
url()
URL.User
user()
User.ImmutableSearchIssue
withAssignee(User value)
Copy the current immutable object by setting a present value for the optionalassignee
attribute.ImmutableSearchIssue
withAssignee(Optional<? extends User> optional)
Copy the current immutable object by setting an optional value for theassignee
attribute.ImmutableSearchIssue
withBody(Optional<String> value)
Copy the current immutable object by setting a value for thebody
attribute.ImmutableSearchIssue
withClosedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalclosedAt
attribute.ImmutableSearchIssue
withClosedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for theclosedAt
attribute.ImmutableSearchIssue
withComments(Integer value)
Copy the current immutable object by setting a value for thecomments
attribute.ImmutableSearchIssue
withCommentsUrl(URI value)
Copy the current immutable object by setting a value for thecommentsUrl
attribute.ImmutableSearchIssue
withCreatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutableSearchIssue
withEventsUrl(Optional<URI> value)
Copy the current immutable object by setting a value for theeventsUrl
attribute.ImmutableSearchIssue
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableSearchIssue
withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableSearchIssue
withLabels(Label... elements)
Copy the current immutable object with elements that replace the content oflabels
.ImmutableSearchIssue
withLabels(Iterable<? extends Label> elements)
Copy the current immutable object with elements that replace the content oflabels
.ImmutableSearchIssue
withLabelsUrl(String value)
Copy the current immutable object by setting a value for thelabelsUrl
attribute.ImmutableSearchIssue
withLocked(Boolean value)
Copy the current immutable object by setting a value for thelocked
attribute.ImmutableSearchIssue
withMilestone(Milestone value)
Copy the current immutable object by setting a present value for the optionalmilestone
attribute.ImmutableSearchIssue
withMilestone(Optional<? extends Milestone> optional)
Copy the current immutable object by setting an optional value for themilestone
attribute.ImmutableSearchIssue
withNumber(Integer value)
Copy the current immutable object by setting a value for thenumber
attribute.ImmutableSearchIssue
withPullRequest(PullRequest value)
Copy the current immutable object by setting a present value for the optionalpullRequest
attribute.ImmutableSearchIssue
withPullRequest(Optional<? extends PullRequest> optional)
Copy the current immutable object by setting an optional value for thepullRequest
attribute.ImmutableSearchIssue
withRepositoryUrl(Optional<URI> value)
Copy the current immutable object by setting a value for therepositoryUrl
attribute.ImmutableSearchIssue
withScore(Float value)
Copy the current immutable object by setting a value for thescore
attribute.ImmutableSearchIssue
withState(String value)
Copy the current immutable object by setting a value for thestate
attribute.ImmutableSearchIssue
withTitle(String value)
Copy the current immutable object by setting a value for thetitle
attribute.ImmutableSearchIssue
withUpdatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute.ImmutableSearchIssue
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.ImmutableSearchIssue
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
-
repositoryUrl
@Nullable public Optional<URI> repositoryUrl()
Repository URL.- Specified by:
repositoryUrl
in interfaceIssue
-
labelsUrl
@Nullable public String labelsUrl()
Labels URL template.
-
commentsUrl
@Nullable public URI commentsUrl()
Comments URL.- Specified by:
commentsUrl
in 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:
pullRequest
in interfaceIssue
-
score
@Nullable public Float score()
Score of item- Specified by:
score
in interfaceSearchIssue
- Returns:
- float
-
withCreatedAt
public final ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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
-
withEventsUrl
public final ImmutableSearchIssue withEventsUrl(@Nullable Optional<URI> value)
Copy the current immutable object by setting a value for theeventsUrl
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for eventsUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withRepositoryUrl
public final ImmutableSearchIssue withRepositoryUrl(@Nullable Optional<URI> value)
Copy the current immutable object by setting a value for therepositoryUrl
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for repositoryUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withLabelsUrl
public final ImmutableSearchIssue withLabelsUrl(@Nullable String value)
Copy the current immutable object by setting a value for thelabelsUrl
attribute. 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
this
object
-
withCommentsUrl
public final ImmutableSearchIssue 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
-
withHtmlUrl
public final ImmutableSearchIssue 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
-
withNumber
public final ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue withBody(@Nullable Optional<String> value)
Copy the current immutable object by setting a value for thebody
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for body (can benull
)- Returns:
- A modified copy of the
this
object
-
withUser
public final ImmutableSearchIssue 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
-
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
this
object
-
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
this
object
-
withAssignee
public final ImmutableSearchIssue 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 ImmutableSearchIssue 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
-
withMilestone
public final ImmutableSearchIssue 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 ImmutableSearchIssue 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 ImmutableSearchIssue 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
-
withComments
public final ImmutableSearchIssue 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
-
withPullRequest
public final ImmutableSearchIssue withPullRequest(PullRequest value)
Copy the current immutable object by setting a present value for the optionalpullRequest
attribute.- Parameters:
value
- The value for pullRequest- Returns:
- A modified copy of
this
object
-
withPullRequest
public final ImmutableSearchIssue withPullRequest(Optional<? extends PullRequest> optional)
Copy the current immutable object by setting an optional value for thepullRequest
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 pullRequest- Returns:
- A modified copy of
this
object
-
withScore
public final ImmutableSearchIssue withScore(@Nullable Float value)
Copy the current immutable object by setting a value for thescore
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableSearchIssue
that 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 valueSearchIssue
with attribute values.
-
copyOf
public static ImmutableSearchIssue copyOf(SearchIssue instance)
Creates an immutable copy of aSearchIssue
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 SearchIssue instance
-
builder
public static ImmutableSearchIssue.Builder builder()
Creates a builder forImmutableSearchIssue
.ImmutableSearchIssue.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
.eventsUrl(Optional<java.net.URI> | null) // nullableeventsUrl
.repositoryUrl(Optional<java.net.URI> | null) // nullablerepositoryUrl
.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(Optional<String> | null) // nullablebody
.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
-
-