Package com.spotify.github.v3.comment
Class ImmutableCommentReaction.Builder
- java.lang.Object
-
- com.spotify.github.v3.comment.ImmutableCommentReaction.Builder
-
- Enclosing class:
- ImmutableCommentReaction
@NotThreadSafe public static final class ImmutableCommentReaction.Builder extends Object
Builds instances of typeImmutableCommentReaction. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableCommentReactionbuild()Builds a newImmutableCommentReaction.ImmutableCommentReaction.Buildercontent(CommentReactionContent content)Initializes the value for thecontentattribute.ImmutableCommentReaction.BuildercreatedAt(GitHubInstant createdAt)Initializes the value for thecreatedAtattribute.ImmutableCommentReaction.Builderfrom(UpdateTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.ImmutableCommentReaction.Builderfrom(CommentReaction instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.comment.CommentReactioninstance.ImmutableCommentReaction.Builderid(long id)Initializes the value for theidattribute.ImmutableCommentReaction.BuilderupdatedAt(GitHubInstant updatedAt)Initializes the value for theupdatedAtattribute.ImmutableCommentReaction.Builderuser(User user)Initializes the value for theuserattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder from(CommentReaction instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.comment.CommentReactioninstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAtattribute.- Parameters:
createdAt- The value for createdAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAtattribute.- Parameters:
updatedAt- The value for updatedAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder id(long id)
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
user
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder user(User user)
Initializes the value for theuserattribute.- Parameters:
user- The value for user- Returns:
thisbuilder for use in a chained invocation
-
content
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder content(CommentReactionContent content)
Initializes the value for thecontentattribute.- Parameters:
content- The value for content- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCommentReaction build()
Builds a newImmutableCommentReaction.- Returns:
- An immutable instance of CommentReaction
- Throws:
IllegalStateException- if any required attributes are missing
-
-