Class ImmutableDeleteEvent.Builder
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableDeleteEvent.Builder
-
- Enclosing class:
- ImmutableDeleteEvent
@NotThreadSafe public static final class ImmutableDeleteEvent.Builder extends Object
Builds instances of typeImmutableDeleteEvent
. 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 ImmutableDeleteEvent
build()
Builds a newImmutableDeleteEvent
.ImmutableDeleteEvent.Builder
eventInstallation(EventInstallation eventInstallation)
Initializes the value for theeventInstallation
attribute.ImmutableDeleteEvent.Builder
from(BaseEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.BaseEvent
instance.ImmutableDeleteEvent.Builder
from(DeleteEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.DeleteEvent
instance.ImmutableDeleteEvent.Builder
pusherType(String pusherType)
Initializes the value for thepusherType
attribute.ImmutableDeleteEvent.Builder
ref(String ref)
Initializes the value for theref
attribute.ImmutableDeleteEvent.Builder
refType(String refType)
Initializes the value for therefType
attribute.ImmutableDeleteEvent.Builder
repository(Repository repository)
Initializes the value for therepository
attribute.ImmutableDeleteEvent.Builder
sender(User sender)
Initializes the value for thesender
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder from(DeleteEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.DeleteEvent
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder from(BaseEvent instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.activity.events.BaseEvent
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
repository
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder repository(@Nullable Repository repository)
Initializes the value for therepository
attribute.- Parameters:
repository
- The value for repository (can benull
)- Returns:
this
builder for use in a chained invocation
-
sender
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder sender(@Nullable User sender)
Initializes the value for thesender
attribute.- Parameters:
sender
- The value for sender (can benull
)- Returns:
this
builder for use in a chained invocation
-
eventInstallation
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder eventInstallation(@Nullable EventInstallation eventInstallation)
Initializes the value for theeventInstallation
attribute.- Parameters:
eventInstallation
- The value for eventInstallation (can benull
)- Returns:
this
builder for use in a chained invocation
-
ref
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder ref(@Nullable String ref)
Initializes the value for theref
attribute.- Parameters:
ref
- The value for ref (can benull
)- Returns:
this
builder for use in a chained invocation
-
refType
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder refType(@Nullable String refType)
Initializes the value for therefType
attribute.- Parameters:
refType
- The value for refType (can benull
)- Returns:
this
builder for use in a chained invocation
-
pusherType
@CanIgnoreReturnValue public final ImmutableDeleteEvent.Builder pusherType(@Nullable String pusherType)
Initializes the value for thepusherType
attribute.- Parameters:
pusherType
- The value for pusherType (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableDeleteEvent build()
Builds a newImmutableDeleteEvent
.- Returns:
- An immutable instance of DeleteEvent
- Throws:
IllegalStateException
- if any required attributes are missing
-
-