Class ImmutableCheckRunOutput

  • All Implemented Interfaces:
    CheckRunOutput

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

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

    • Method Detail

      • summary

        public Optional<String> summary()
        The summary of the check run. This parameter supports Markdown.
        Specified by:
        summary in interface CheckRunOutput
        Returns:
        the optional
      • text

        public Optional<String> text()
        The details of the check run. This parameter supports Markdown.
        Specified by:
        text in interface CheckRunOutput
        Returns:
        the optional
      • annotations

        public List<Annotation> annotations()
        Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request.
        Specified by:
        annotations in interface CheckRunOutput
        Returns:
        the list
      • withTitle

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

        public final ImmutableCheckRunOutput withTitle​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the title 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 title
        Returns:
        A modified copy of this object
      • withSummary

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

        public final ImmutableCheckRunOutput withSummary​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the summary 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 summary
        Returns:
        A modified copy of this object
      • withText

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

        public final ImmutableCheckRunOutput withText​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the text 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 text
        Returns:
        A modified copy of this object
      • withImages

        public final ImmutableCheckRunOutput withImages​(CheckRunImage... elements)
        Copy the current immutable object with elements that replace the content of images.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withImages

        public final ImmutableCheckRunOutput withImages​(Iterable<? extends CheckRunImage> elements)
        Copy the current immutable object with elements that replace the content of images. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of images elements to set
        Returns:
        A modified copy of this object
      • withAnnotations

        public final ImmutableCheckRunOutput withAnnotations​(Annotation... elements)
        Copy the current immutable object with elements that replace the content of annotations.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withAnnotations

        public final ImmutableCheckRunOutput withAnnotations​(Iterable<? extends Annotation> elements)
        Copy the current immutable object with elements that replace the content of annotations. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of annotations elements to set
        Returns:
        A modified copy of this object
      • withAnnotationsCount

        public final ImmutableCheckRunOutput withAnnotationsCount​(int value)
        Copy the current immutable object by setting a present value for the optional annotationsCount attribute.
        Parameters:
        value - The value for annotationsCount
        Returns:
        A modified copy of this object
      • withAnnotationsCount

        public final ImmutableCheckRunOutput withAnnotationsCount​(Optional<Integer> optional)
        Copy the current immutable object by setting an optional value for the annotationsCount 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 annotationsCount
        Returns:
        A modified copy of this object
      • withAnnotationsUrl

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

        public final ImmutableCheckRunOutput withAnnotationsUrl​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the annotationsUrl 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 annotationsUrl
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableCheckRunOutput 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: title, summary, text, images, annotations, annotationsCount, annotationsUrl.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableCheckRunOutput.Builder builder()
        Creates a builder for ImmutableCheckRunOutput.
         ImmutableCheckRunOutput.builder()
            .title(String) // optional title
            .summary(String) // optional summary
            .text(String) // optional text
            .addImages|addAllImages(com.spotify.github.v3.checks.CheckRunImage) // images elements
            .addAnnotations|addAllAnnotations(com.spotify.github.v3.checks.Annotation) // annotations elements
            .annotationsCount(Integer) // optional annotationsCount
            .annotationsUrl(String) // optional annotationsUrl
            .build();
         
        Returns:
        A new ImmutableCheckRunOutput builder