Class ImmutableRepositoryDispatch

  • All Implemented Interfaces:
    RepositoryDispatch

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

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

    • Method Detail

      • clientPayload

        public Optional<com.fasterxml.jackson.databind.JsonNode> clientPayload()
        JSON payload with extra information about the webhook event that your action or workflow may use.
        Specified by:
        clientPayload in interface RepositoryDispatch
      • withEventType

        public final ImmutableRepositoryDispatch withEventType​(String value)
        Copy the current immutable object by setting a value for the eventType attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for eventType
        Returns:
        A modified copy of the this object
      • withClientPayload

        public final ImmutableRepositoryDispatch withClientPayload​(com.fasterxml.jackson.databind.JsonNode value)
        Copy the current immutable object by setting a present value for the optional clientPayload attribute.
        Parameters:
        value - The value for clientPayload
        Returns:
        A modified copy of this object
      • withClientPayload

        public final ImmutableRepositoryDispatch withClientPayload​(Optional<? extends com.fasterxml.jackson.databind.JsonNode> optional)
        Copy the current immutable object by setting an optional value for the clientPayload attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for clientPayload
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableRepositoryDispatch 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: eventType, clientPayload.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableRepositoryDispatch copyOf​(RepositoryDispatch instance)
        Creates an immutable copy of a RepositoryDispatch 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 RepositoryDispatch instance