Class ImmutableCheckRunImage

  • All Implemented Interfaces:
    CheckRunImage

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

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

    • Method Detail

      • alt

        public String alt()
        The alternative text for the image.
        Specified by:
        alt in interface CheckRunImage
        Returns:
        the string
      • imageUrl

        public String imageUrl()
        The full URL of the image.
        Specified by:
        imageUrl in interface CheckRunImage
        Returns:
        the string
      • withAlt

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

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

        public final ImmutableCheckRunImage withCaption​(String value)
        Copy the current immutable object by setting a present value for the optional caption attribute.
        Parameters:
        value - The value for caption
        Returns:
        A modified copy of this object
      • withCaption

        public final ImmutableCheckRunImage withCaption​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the caption attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for caption
        Returns:
        A modified copy of this object
      • equals

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

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

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