Class ImmutableDeploymentEvent

  • All Implemented Interfaces:
    BaseEvent, DeploymentEvent

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

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

    • Method Detail

      • sender

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

        public final ImmutableDeploymentEvent 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 ImmutableDeploymentEvent 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 ImmutableDeploymentEvent 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
      • withDeployment

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

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

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

        public static ImmutableDeploymentEvent.Builder builder()
        Creates a builder for ImmutableDeploymentEvent.
         ImmutableDeploymentEvent.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
            .deployment(com.spotify.github.v3.repos.Deployment | null) // nullable deployment
            .build();
         
        Returns:
        A new ImmutableDeploymentEvent builder