Class ImmutableDeleteEvent

  • All Implemented Interfaces:
    BaseEvent, DeleteEvent

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableDeleteEvent
    extends Object
    implements DeleteEvent
    Immutable implementation of DeleteEvent.

    Use the builder to create immutable instances: ImmutableDeleteEvent.builder().

    • Method Detail

      • sender

        @Nullable
        public User sender()
        The User that triggered/sent the event.
        Specified by:
        sender in interface BaseEvent
      • ref

        @Nullable
        public String ref()
        Full git reference
        Specified by:
        ref in interface DeleteEvent
      • refType

        @Nullable
        public String refType()
        The object that was deleted. Can be "branch" or "tag".
        Specified by:
        refType in interface DeleteEvent
      • 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 interface DeleteEvent
      • withRepository

        public final ImmutableDeleteEvent withRepository​(@Nullable
                                                         Repository value)
        Copy the current immutable object by setting a value for the repository attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for repository (can be null)
        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 the sender attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for sender (can be null)
        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 the eventInstallation attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for eventInstallation (can be null)
        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 the ref attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for ref (can be null)
        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 the refType attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for refType (can be null)
        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 the pusherType attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for pusherType (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableDeleteEvent that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: repository, sender, eventInstallation, ref, refType, pusherType.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value DeleteEvent with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableDeleteEvent copyOf​(DeleteEvent instance)
        Creates an immutable copy of a DeleteEvent 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 for ImmutableDeleteEvent.
         ImmutableDeleteEvent.builder()
            .repository(com.spotify.github.v3.repos.Repository | null) // nullable repository
            .sender(com.spotify.github.v3.User | null) // nullable sender
            .eventInstallation(com.spotify.github.v3.activity.events.EventInstallation | null) // nullable eventInstallation
            .ref(String | null) // nullable ref
            .refType(String | null) // nullable refType
            .pusherType(String | null) // nullable pusherType
            .build();
         
        Returns:
        A new ImmutableDeleteEvent builder