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.Builder
is 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 ImmutableCommentReaction
build()
Builds a newImmutableCommentReaction
.ImmutableCommentReaction.Builder
content(CommentReactionContent content)
Initializes the value for thecontent
attribute.ImmutableCommentReaction.Builder
createdAt(GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.ImmutableCommentReaction.Builder
from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTracking
instance.ImmutableCommentReaction.Builder
from(CommentReaction instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.comment.CommentReaction
instance.ImmutableCommentReaction.Builder
id(long id)
Initializes the value for theid
attribute.ImmutableCommentReaction.Builder
updatedAt(GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.ImmutableCommentReaction.Builder
user(User user)
Initializes the value for theuser
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder from(CommentReaction instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.comment.CommentReaction
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.UpdateTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.- Parameters:
createdAt
- The value for createdAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.- Parameters:
updatedAt
- The value for updatedAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder id(long id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id- Returns:
this
builder for use in a chained invocation
-
user
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder user(User user)
Initializes the value for theuser
attribute.- Parameters:
user
- The value for user- Returns:
this
builder for use in a chained invocation
-
content
@CanIgnoreReturnValue public final ImmutableCommentReaction.Builder content(CommentReactionContent content)
Initializes the value for thecontent
attribute.- Parameters:
content
- The value for content- Returns:
this
builder 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
-
-