Class ImmutableRepositoryEvent.Builder
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableRepositoryEvent.Builder
-
- Enclosing class:
- ImmutableRepositoryEvent
@NotThreadSafe public static final class ImmutableRepositoryEvent.Builder extends Object
Builds instances of typeImmutableRepositoryEvent. 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 ImmutableRepositoryEvent.Builderaction(String action)Initializes the value for theactionattribute.ImmutableRepositoryEventbuild()Builds a newImmutableRepositoryEvent.ImmutableRepositoryEvent.BuildereventInstallation(EventInstallation eventInstallation)Initializes the value for theeventInstallationattribute.ImmutableRepositoryEvent.Builderfrom(BaseEvent instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.BaseEventinstance.ImmutableRepositoryEvent.Builderfrom(RepositoryEvent instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.RepositoryEventinstance.ImmutableRepositoryEvent.Builderorganization(Organization organization)Initializes the value for theorganizationattribute.ImmutableRepositoryEvent.Builderrepository(Repository repository)Initializes the value for therepositoryattribute.ImmutableRepositoryEvent.Buildersender(User sender)Initializes the value for thesenderattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRepositoryEvent.Builder from(RepositoryEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.RepositoryEventinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableRepositoryEvent.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 ImmutableRepositoryEvent.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 ImmutableRepositoryEvent.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 ImmutableRepositoryEvent.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 ImmutableRepositoryEvent.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
-
organization
@CanIgnoreReturnValue public final ImmutableRepositoryEvent.Builder organization(@Nullable Organization organization)
Initializes the value for theorganizationattribute.- Parameters:
organization- The value for organization (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRepositoryEvent build()
Builds a newImmutableRepositoryEvent.- Returns:
- An immutable instance of RepositoryEvent
- Throws:
IllegalStateException- if any required attributes are missing
-
-