Class ImmutableCheckRunAction

  • All Implemented Interfaces:
    CheckRunAction

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

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

    • Method Detail

      • label

        public String label()
        The label to be shown at the action button.
        Specified by:
        label in interface CheckRunAction
        Returns:
        the string
      • identifier

        public String identifier()
        The identifier to be sent at the event When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. When your app receives a check_run.requested_action webhook event, it can look for the requested_action.identifier key in the webhook payload to determine which button was clicked and perform the requested task.
        Specified by:
        identifier in interface CheckRunAction
        Returns:
        the string
      • withLabel

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

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

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

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

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

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