Package com.spotify.github.v3.comment
Class ImmutableCommentReaction
- java.lang.Object
-
- com.spotify.github.v3.comment.ImmutableCommentReaction
-
- All Implemented Interfaces:
UpdateTracking
,CommentReaction
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCommentReaction extends Object implements CommentReaction
Immutable implementation ofCommentReaction
.Use the builder to create immutable instances:
ImmutableCommentReaction.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableCommentReaction.Builder
Builds instances of typeImmutableCommentReaction
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCommentReaction.Builder
builder()
Creates a builder forImmutableCommentReaction
.CommentReactionContent
content()
Reaction content.static ImmutableCommentReaction
copyOf(CommentReaction instance)
Creates an immutable copy of aCommentReaction
value.GitHubInstant
createdAt()
Created dateboolean
equals(Object another)
This instance is equal to all instances ofImmutableCommentReaction
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:createdAt
,updatedAt
,id
,user
,content
.long
id()
Reaction ID.String
toString()
Prints the immutable valueCommentReaction
with attribute values.GitHubInstant
updatedAt()
Updated dateUser
user()
Reaction user.ImmutableCommentReaction
withContent(CommentReactionContent value)
Copy the current immutable object by setting a value for thecontent
attribute.ImmutableCommentReaction
withCreatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutableCommentReaction
withId(long value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableCommentReaction
withUpdatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute.ImmutableCommentReaction
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
-
id
public long id()
Reaction ID.- Specified by:
id
in interfaceCommentReaction
-
user
public User user()
Reaction user.- Specified by:
user
in interfaceCommentReaction
-
content
public CommentReactionContent content()
Reaction content.- Specified by:
content
in interfaceCommentReaction
-
withCreatedAt
public final ImmutableCommentReaction 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 ImmutableCommentReaction 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
-
withId
public final ImmutableCommentReaction withId(long value)
Copy the current immutable object by setting a value for theid
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id- Returns:
- A modified copy of the
this
object
-
withUser
public final ImmutableCommentReaction withUser(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- Returns:
- A modified copy of the
this
object
-
withContent
public final ImmutableCommentReaction withContent(CommentReactionContent value)
Copy the current immutable object by setting a value for thecontent
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for content- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCommentReaction
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:createdAt
,updatedAt
,id
,user
,content
.
-
toString
public String toString()
Prints the immutable valueCommentReaction
with attribute values.
-
copyOf
public static ImmutableCommentReaction copyOf(CommentReaction instance)
Creates an immutable copy of aCommentReaction
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 CommentReaction instance
-
builder
public static ImmutableCommentReaction.Builder builder()
Creates a builder forImmutableCommentReaction
.ImmutableCommentReaction.builder() .createdAt(com.spotify.github.GitHubInstant | null) // nullable
createdAt
.updatedAt(com.spotify.github.GitHubInstant | null) // nullableupdatedAt
.id(long) // requiredid
.user(com.spotify.github.v3.User) // requireduser
.content(com.spotify.github.v3.comment.CommentReactionContent) // requiredcontent
.build();- Returns:
- A new ImmutableCommentReaction builder
-
-