Class ImmutableCommentReaction

  • All Implemented Interfaces:
    UpdateTracking, CommentReaction

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableCommentReaction
    extends Object
    implements CommentReaction
    Immutable implementation of CommentReaction.

    Use the builder to create immutable instances: ImmutableCommentReaction.builder().

    • Method Detail

      • withCreatedAt

        public final ImmutableCommentReaction withCreatedAt​(@Nullable
                                                            GitHubInstant value)
        Copy the current immutable object by setting a value for the createdAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createdAt (can be null)
        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 the updatedAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for updatedAt (can be null)
        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 the id attribute. A value equality check is used to prevent copying of the same value by returning this.
        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 the user attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        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 the content attribute. A value equality check is used to prevent copying of the same value by returning this.
        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 of ImmutableCommentReaction that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: createdAt, updatedAt, id, user, content.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value CommentReaction with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableCommentReaction copyOf​(CommentReaction instance)
        Creates an immutable copy of a CommentReaction 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 for ImmutableCommentReaction.
         ImmutableCommentReaction.builder()
            .createdAt(com.spotify.github.GitHubInstant | null) // nullable createdAt
            .updatedAt(com.spotify.github.GitHubInstant | null) // nullable updatedAt
            .id(long) // required id
            .user(com.spotify.github.v3.User) // required user
            .content(com.spotify.github.v3.comment.CommentReactionContent) // required content
            .build();
         
        Returns:
        A new ImmutableCommentReaction builder