Class ImmutablePullRequestReviewEvent.Builder
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutablePullRequestReviewEvent.Builder
-
- Enclosing class:
- ImmutablePullRequestReviewEvent
@NotThreadSafe public static final class ImmutablePullRequestReviewEvent.Builder extends Object
Builds instances of typeImmutablePullRequestReviewEvent. 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 ImmutablePullRequestReviewEvent.Builderaction(String action)Initializes the value for theactionattribute.ImmutablePullRequestReviewEventbuild()Builds a newImmutablePullRequestReviewEvent.ImmutablePullRequestReviewEvent.BuildereventInstallation(EventInstallation eventInstallation)Initializes the value for theeventInstallationattribute.ImmutablePullRequestReviewEvent.Builderfrom(BaseEvent instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.BaseEventinstance.ImmutablePullRequestReviewEvent.Builderfrom(PullRequestReviewEvent instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.PullRequestReviewEventinstance.ImmutablePullRequestReviewEvent.BuilderpullRequest(PullRequestItem pullRequest)Initializes the value for thepullRequestattribute.ImmutablePullRequestReviewEvent.Builderrepository(Repository repository)Initializes the value for therepositoryattribute.ImmutablePullRequestReviewEvent.Builderreview(Review review)Initializes the value for thereviewattribute.ImmutablePullRequestReviewEvent.Buildersender(User sender)Initializes the value for thesenderattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder from(PullRequestReviewEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.PullRequestReviewEventinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder from(BaseEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.BaseEventinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
repository
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder repository(@Nullable Repository repository)
Initializes the value for therepositoryattribute.- Parameters:
repository- The value for repository (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sender
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder sender(@Nullable User sender)
Initializes the value for thesenderattribute.- Parameters:
sender- The value for sender (can benull)- Returns:
thisbuilder for use in a chained invocation
-
eventInstallation
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder eventInstallation(@Nullable EventInstallation eventInstallation)
Initializes the value for theeventInstallationattribute.- Parameters:
eventInstallation- The value for eventInstallation (can benull)- Returns:
thisbuilder for use in a chained invocation
-
action
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder action(@Nullable String action)
Initializes the value for theactionattribute.- Parameters:
action- The value for action (can benull)- Returns:
thisbuilder for use in a chained invocation
-
review
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder review(@Nullable Review review)
Initializes the value for thereviewattribute.- Parameters:
review- The value for review (can benull)- Returns:
thisbuilder for use in a chained invocation
-
pullRequest
@CanIgnoreReturnValue public final ImmutablePullRequestReviewEvent.Builder pullRequest(@Nullable PullRequestItem pullRequest)
Initializes the value for thepullRequestattribute.- Parameters:
pullRequest- The value for pullRequest (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutablePullRequestReviewEvent build()
Builds a newImmutablePullRequestReviewEvent.- Returns:
- An immutable instance of PullRequestReviewEvent
- Throws:
IllegalStateException- if any required attributes are missing
-
-