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 classImmutableDeleteEvent.BuilderBuilds instances of typeImmutableDeleteEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableDeleteEvent.Builderbuilder()Creates a builder forImmutableDeleteEvent.static ImmutableDeleteEventcopyOf(DeleteEvent instance)Creates an immutable copy of aDeleteEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDeleteEventthat have equal attribute values.EventInstallationeventInstallation()TheEventInstallation, if the event comes from a Github App.inthashCode()Computes a hash code from attributes:repository,sender,eventInstallation,ref,refType,pusherType.StringpusherType()Pusher type.Stringref()Full git referenceStringrefType()The object that was deleted.Repositoryrepository()TheRepositoryUsersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valueDeleteEventwith attribute values.ImmutableDeleteEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutableDeleteEventwithPusherType(String value)Copy the current immutable object by setting a value for thepusherTypeattribute.ImmutableDeleteEventwithRef(String value)Copy the current immutable object by setting a value for therefattribute.ImmutableDeleteEventwithRefType(String value)Copy the current immutable object by setting a value for therefTypeattribute.ImmutableDeleteEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutableDeleteEventwithSender(User value)Copy the current immutable object by setting a value for thesenderattribute.
-
-
-
Method Detail
-
repository
@Nullable public Repository repository()
TheRepository- Specified by:
repositoryin interfaceBaseEvent
-
eventInstallation
@Nullable public EventInstallation eventInstallation()
TheEventInstallation, if the event comes from a Github App.- Specified by:
eventInstallationin interfaceBaseEvent
-
ref
@Nullable public String ref()
Full git reference- Specified by:
refin interfaceDeleteEvent
-
refType
@Nullable public String refType()
The object that was deleted. Can be "branch" or "tag".- Specified by:
refTypein 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:
pusherTypein interfaceDeleteEvent
-
withRepository
public final ImmutableDeleteEvent withRepository(@Nullable Repository value)
Copy the current immutable object by setting a value for therepositoryattribute. 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
thisobject
-
withSender
public final ImmutableDeleteEvent withSender(@Nullable User value)
Copy the current immutable object by setting a value for thesenderattribute. 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
thisobject
-
withEventInstallation
public final ImmutableDeleteEvent withEventInstallation(@Nullable EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallationattribute. 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
thisobject
-
withRef
public final ImmutableDeleteEvent withRef(@Nullable String value)
Copy the current immutable object by setting a value for therefattribute. 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
thisobject
-
withRefType
public final ImmutableDeleteEvent withRefType(@Nullable String value)
Copy the current immutable object by setting a value for therefTypeattribute. 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
thisobject
-
withPusherType
public final ImmutableDeleteEvent withPusherType(@Nullable String value)
Copy the current immutable object by setting a value for thepusherTypeattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableDeleteEventthat 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 valueDeleteEventwith attribute values.
-
copyOf
public static ImmutableDeleteEvent copyOf(DeleteEvent instance)
Creates an immutable copy of aDeleteEventvalue. 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) // nullablerepository.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
-
-