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 classImmutableCommentReaction.BuilderBuilds instances of typeImmutableCommentReaction.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCommentReaction.Builderbuilder()Creates a builder forImmutableCommentReaction.CommentReactionContentcontent()Reaction content.static ImmutableCommentReactioncopyOf(CommentReaction instance)Creates an immutable copy of aCommentReactionvalue.GitHubInstantcreatedAt()Created datebooleanequals(Object another)This instance is equal to all instances ofImmutableCommentReactionthat have equal attribute values.inthashCode()Computes a hash code from attributes:createdAt,updatedAt,id,user,content.longid()Reaction ID.StringtoString()Prints the immutable valueCommentReactionwith attribute values.GitHubInstantupdatedAt()Updated dateUseruser()Reaction user.ImmutableCommentReactionwithContent(CommentReactionContent value)Copy the current immutable object by setting a value for thecontentattribute.ImmutableCommentReactionwithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableCommentReactionwithId(long value)Copy the current immutable object by setting a value for theidattribute.ImmutableCommentReactionwithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.ImmutableCommentReactionwithUser(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
-
id
public long id()
Reaction ID.- Specified by:
idin interfaceCommentReaction
-
user
public User user()
Reaction user.- Specified by:
userin interfaceCommentReaction
-
content
public CommentReactionContent content()
Reaction content.- Specified by:
contentin interfaceCommentReaction
-
withCreatedAt
public final ImmutableCommentReaction 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 ImmutableCommentReaction 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
-
withId
public final ImmutableCommentReaction withId(long value)
Copy the current immutable object by setting a value for theidattribute. 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
thisobject
-
withUser
public final ImmutableCommentReaction withUser(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- Returns:
- A modified copy of the
thisobject
-
withContent
public final ImmutableCommentReaction withContent(CommentReactionContent value)
Copy the current immutable object by setting a value for thecontentattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCommentReactionthat 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 valueCommentReactionwith attribute values.
-
copyOf
public static ImmutableCommentReaction copyOf(CommentReaction instance)
Creates an immutable copy of aCommentReactionvalue. 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) // nullablecreatedAt.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
-
-