Class ImmutableDeploymentEvent.Builder
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableDeploymentEvent.Builder
-
- Enclosing class:
- ImmutableDeploymentEvent
@NotThreadSafe public static final class ImmutableDeploymentEvent.Builder extends Object
Builds instances of typeImmutableDeploymentEvent. 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 ImmutableDeploymentEventbuild()Builds a newImmutableDeploymentEvent.ImmutableDeploymentEvent.Builderdeployment(Deployment deployment)Initializes the value for thedeploymentattribute.ImmutableDeploymentEvent.BuildereventInstallation(EventInstallation eventInstallation)Initializes the value for theeventInstallationattribute.ImmutableDeploymentEvent.Builderfrom(BaseEvent instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.BaseEventinstance.ImmutableDeploymentEvent.Builderfrom(DeploymentEvent instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.DeploymentEventinstance.ImmutableDeploymentEvent.Builderrepository(Repository repository)Initializes the value for therepositoryattribute.ImmutableDeploymentEvent.Buildersender(User sender)Initializes the value for thesenderattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableDeploymentEvent.Builder from(DeploymentEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.DeploymentEventinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableDeploymentEvent.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 ImmutableDeploymentEvent.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 ImmutableDeploymentEvent.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 ImmutableDeploymentEvent.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
-
deployment
@CanIgnoreReturnValue public final ImmutableDeploymentEvent.Builder deployment(@Nullable Deployment deployment)
Initializes the value for thedeploymentattribute.- Parameters:
deployment- The value for deployment (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDeploymentEvent build()
Builds a newImmutableDeploymentEvent.- Returns:
- An immutable instance of DeploymentEvent
- Throws:
IllegalStateException- if any required attributes are missing
-
-