Class ImmutableDeleteEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableDeleteEvent
-
- All Implemented Interfaces:
BaseEvent
,DeleteEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDeleteEvent extends Object implements DeleteEvent
Immutable implementation ofDeleteEvent
.Use the builder to create immutable instances:
ImmutableDeleteEvent.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableDeleteEvent.Builder
Builds instances of typeImmutableDeleteEvent
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDeleteEvent.Builder
builder()
Creates a builder forImmutableDeleteEvent
.static ImmutableDeleteEvent
copyOf(DeleteEvent instance)
Creates an immutable copy of aDeleteEvent
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableDeleteEvent
that have equal attribute values.EventInstallation
eventInstallation()
TheEventInstallation
, if the event comes from a Github App.int
hashCode()
Computes a hash code from attributes:repository
,sender
,eventInstallation
,ref
,refType
,pusherType
.String
pusherType()
Pusher type.String
ref()
Full git referenceString
refType()
The object that was deleted.Repository
repository()
TheRepository
User
sender()
TheUser
that triggered/sent the event.String
toString()
Prints the immutable valueDeleteEvent
with attribute values.ImmutableDeleteEvent
withEventInstallation(EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallation
attribute.ImmutableDeleteEvent
withPusherType(String value)
Copy the current immutable object by setting a value for thepusherType
attribute.ImmutableDeleteEvent
withRef(String value)
Copy the current immutable object by setting a value for theref
attribute.ImmutableDeleteEvent
withRefType(String value)
Copy the current immutable object by setting a value for therefType
attribute.ImmutableDeleteEvent
withRepository(Repository value)
Copy the current immutable object by setting a value for therepository
attribute.ImmutableDeleteEvent
withSender(User value)
Copy the current immutable object by setting a value for thesender
attribute.
-
-
-
Method Detail
-
repository
@Nullable public Repository repository()
TheRepository
- Specified by:
repository
in interfaceBaseEvent
-
eventInstallation
@Nullable public EventInstallation eventInstallation()
TheEventInstallation
, if the event comes from a Github App.- Specified by:
eventInstallation
in interfaceBaseEvent
-
ref
@Nullable public String ref()
Full git reference- Specified by:
ref
in interfaceDeleteEvent
-
refType
@Nullable public String refType()
The object that was deleted. Can be "branch" or "tag".- Specified by:
refType
in interfaceDeleteEvent
-
pusherType
@Nullable public String pusherType()
Pusher type. E.g. user. The github api does not document any other types, yet. To be totally honest, it does not document *ANYTHING* about this field, so leave it as string for now.- Specified by:
pusherType
in interfaceDeleteEvent
-
withRepository
public final ImmutableDeleteEvent withRepository(@Nullable Repository value)
Copy the current immutable object by setting a value for therepository
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for repository (can benull
)- Returns:
- A modified copy of the
this
object
-
withSender
public final ImmutableDeleteEvent withSender(@Nullable User value)
Copy the current immutable object by setting a value for thesender
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sender (can benull
)- Returns:
- A modified copy of the
this
object
-
withEventInstallation
public final ImmutableDeleteEvent withEventInstallation(@Nullable EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallation
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for eventInstallation (can benull
)- Returns:
- A modified copy of the
this
object
-
withRef
public final ImmutableDeleteEvent withRef(@Nullable String value)
Copy the current immutable object by setting a value for theref
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for ref (can benull
)- Returns:
- A modified copy of the
this
object
-
withRefType
public final ImmutableDeleteEvent withRefType(@Nullable String value)
Copy the current immutable object by setting a value for therefType
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for refType (can benull
)- Returns:
- A modified copy of the
this
object
-
withPusherType
public final ImmutableDeleteEvent withPusherType(@Nullable String value)
Copy the current immutable object by setting a value for thepusherType
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for pusherType (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableDeleteEvent
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository
,sender
,eventInstallation
,ref
,refType
,pusherType
.
-
toString
public String toString()
Prints the immutable valueDeleteEvent
with attribute values.
-
copyOf
public static ImmutableDeleteEvent copyOf(DeleteEvent instance)
Creates an immutable copy of aDeleteEvent
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable DeleteEvent instance
-
builder
public static ImmutableDeleteEvent.Builder builder()
Creates a builder forImmutableDeleteEvent
.ImmutableDeleteEvent.builder() .repository(com.spotify.github.v3.repos.Repository | null) // nullable
repository
.sender(com.spotify.github.v3.User | null) // nullablesender
.eventInstallation(com.spotify.github.v3.activity.events.EventInstallation | null) // nullableeventInstallation
.ref(String | null) // nullableref
.refType(String | null) // nullablerefType
.pusherType(String | null) // nullablepusherType
.build();- Returns:
- A new ImmutableDeleteEvent builder
-
-