Class ImmutableCheckRunEvent

  • All Implemented Interfaces:
    UpdateTracking, BaseEvent, CheckRunEvent

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

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

    • Method Detail

      • sender

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

        @Nullable
        public String action()
        Specified by:
        action in interface CheckRunEvent
        Returns:
        The value of the action attribute
      • withRepository

        public final ImmutableCheckRunEvent 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 ImmutableCheckRunEvent 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 ImmutableCheckRunEvent 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
      • withCreatedAt

        public final ImmutableCheckRunEvent withCreatedAt​(@Nullable
                                                          GitHubInstant value)
        Copy the current immutable object by setting a value for the createdAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createdAt (can be null)
        Returns:
        A modified copy of the this object
      • withUpdatedAt

        public final ImmutableCheckRunEvent withUpdatedAt​(@Nullable
                                                          GitHubInstant value)
        Copy the current immutable object by setting a value for the updatedAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for updatedAt (can be null)
        Returns:
        A modified copy of the this object
      • withAction

        public final ImmutableCheckRunEvent withAction​(@Nullable
                                                       String value)
        Copy the current immutable object by setting a value for the action attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for action (can be null)
        Returns:
        A modified copy of the this object
      • withCheckRun

        public final ImmutableCheckRunEvent withCheckRun​(@Nullable
                                                         CheckRunResponse value)
        Copy the current immutable object by setting a value for the checkRun attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for checkRun (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 ImmutableCheckRunEvent 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, createdAt, updatedAt, action, checkRun.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableCheckRunEvent copyOf​(CheckRunEvent instance)
        Creates an immutable copy of a CheckRunEvent 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 CheckRunEvent instance
      • builder

        public static ImmutableCheckRunEvent.Builder builder()
        Creates a builder for ImmutableCheckRunEvent.
         ImmutableCheckRunEvent.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
            .createdAt(com.spotify.github.GitHubInstant | null) // nullable createdAt
            .updatedAt(com.spotify.github.GitHubInstant | null) // nullable updatedAt
            .action(String | null) // nullable action
            .checkRun(com.spotify.github.v3.checks.CheckRunResponse | null) // nullable checkRun
            .build();
         
        Returns:
        A new ImmutableCheckRunEvent builder