Package com.spotify.github.v3.checks
Class ImmutableCheckRunOutput
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckRunOutput
-
- All Implemented Interfaces:
CheckRunOutput
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckRunOutput extends Object implements CheckRunOutput
Immutable implementation ofCheckRunOutput.Use the builder to create immutable instances:
ImmutableCheckRunOutput.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCheckRunOutput.BuilderBuilds instances of typeImmutableCheckRunOutput.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Annotation>annotations()Adds information from your analysis to specific lines of code.Optional<Integer>annotationsCount()The count of annotations.Optional<String>annotationsUrl()Annotations URL, used on response objects.static ImmutableCheckRunOutput.Builderbuilder()Creates a builder forImmutableCheckRunOutput.static ImmutableCheckRunOutputcopyOf(CheckRunOutput instance)Creates an immutable copy of aCheckRunOutputvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCheckRunOutputthat have equal attribute values.inthashCode()Computes a hash code from attributes:title,summary,text,images,annotations,annotationsCount,annotationsUrl.List<CheckRunImage>images()Adds images to the output displayed in the GitHub pull request UI.Optional<String>summary()The summary of the check run.Optional<String>text()The details of the check run.Optional<String>title()The title of the check run.StringtoString()Prints the immutable valueCheckRunOutputwith attribute values.ImmutableCheckRunOutputwithAnnotations(Annotation... elements)Copy the current immutable object with elements that replace the content ofannotations.ImmutableCheckRunOutputwithAnnotations(Iterable<? extends Annotation> elements)Copy the current immutable object with elements that replace the content ofannotations.ImmutableCheckRunOutputwithAnnotationsCount(int value)Copy the current immutable object by setting a present value for the optionalannotationsCountattribute.ImmutableCheckRunOutputwithAnnotationsCount(Optional<Integer> optional)Copy the current immutable object by setting an optional value for theannotationsCountattribute.ImmutableCheckRunOutputwithAnnotationsUrl(String value)Copy the current immutable object by setting a present value for the optionalannotationsUrlattribute.ImmutableCheckRunOutputwithAnnotationsUrl(Optional<String> optional)Copy the current immutable object by setting an optional value for theannotationsUrlattribute.ImmutableCheckRunOutputwithImages(CheckRunImage... elements)Copy the current immutable object with elements that replace the content ofimages.ImmutableCheckRunOutputwithImages(Iterable<? extends CheckRunImage> elements)Copy the current immutable object with elements that replace the content ofimages.ImmutableCheckRunOutputwithSummary(String value)Copy the current immutable object by setting a present value for the optionalsummaryattribute.ImmutableCheckRunOutputwithSummary(Optional<String> optional)Copy the current immutable object by setting an optional value for thesummaryattribute.ImmutableCheckRunOutputwithText(String value)Copy the current immutable object by setting a present value for the optionaltextattribute.ImmutableCheckRunOutputwithText(Optional<String> optional)Copy the current immutable object by setting an optional value for thetextattribute.ImmutableCheckRunOutputwithTitle(String value)Copy the current immutable object by setting a present value for the optionaltitleattribute.ImmutableCheckRunOutputwithTitle(Optional<String> optional)Copy the current immutable object by setting an optional value for thetitleattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.spotify.github.v3.checks.CheckRunOutput
check
-
-
-
-
Method Detail
-
title
public Optional<String> title()
The title of the check run.- Specified by:
titlein interfaceCheckRunOutput- Returns:
- the string
-
summary
public Optional<String> summary()
The summary of the check run. This parameter supports Markdown.- Specified by:
summaryin interfaceCheckRunOutput- Returns:
- the optional
-
text
public Optional<String> text()
The details of the check run. This parameter supports Markdown.- Specified by:
textin interfaceCheckRunOutput- Returns:
- the optional
-
images
public List<CheckRunImage> images()
Adds images to the output displayed in the GitHub pull request UI.- Specified by:
imagesin interfaceCheckRunOutput- Returns:
- the list
-
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:
annotationsin interfaceCheckRunOutput- Returns:
- the list
-
annotationsCount
public Optional<Integer> annotationsCount()
The count of annotations. Used on response objects.- Specified by:
annotationsCountin interfaceCheckRunOutput- Returns:
- the optional
-
annotationsUrl
public Optional<String> annotationsUrl()
Annotations URL, used on response objects.- Specified by:
annotationsUrlin interfaceCheckRunOutput- Returns:
- the optional
-
withTitle
public final ImmutableCheckRunOutput withTitle(String value)
Copy the current immutable object by setting a present value for the optionaltitleattribute.- Parameters:
value- The value for title- Returns:
- A modified copy of
thisobject
-
withTitle
public final ImmutableCheckRunOutput withTitle(Optional<String> optional)
Copy the current immutable object by setting an optional value for thetitleattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for title- Returns:
- A modified copy of
thisobject
-
withSummary
public final ImmutableCheckRunOutput withSummary(String value)
Copy the current immutable object by setting a present value for the optionalsummaryattribute.- Parameters:
value- The value for summary- Returns:
- A modified copy of
thisobject
-
withSummary
public final ImmutableCheckRunOutput withSummary(Optional<String> optional)
Copy the current immutable object by setting an optional value for thesummaryattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for summary- Returns:
- A modified copy of
thisobject
-
withText
public final ImmutableCheckRunOutput withText(String value)
Copy the current immutable object by setting a present value for the optionaltextattribute.- Parameters:
value- The value for text- Returns:
- A modified copy of
thisobject
-
withText
public final ImmutableCheckRunOutput withText(Optional<String> optional)
Copy the current immutable object by setting an optional value for thetextattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for text- Returns:
- A modified copy of
thisobject
-
withImages
public final ImmutableCheckRunOutput withImages(CheckRunImage... elements)
Copy the current immutable object with elements that replace the content ofimages.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withImages
public final ImmutableCheckRunOutput withImages(Iterable<? extends CheckRunImage> elements)
Copy the current immutable object with elements that replace the content ofimages. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of images elements to set- Returns:
- A modified copy of
thisobject
-
withAnnotations
public final ImmutableCheckRunOutput withAnnotations(Annotation... elements)
Copy the current immutable object with elements that replace the content ofannotations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAnnotations
public final ImmutableCheckRunOutput withAnnotations(Iterable<? extends Annotation> elements)
Copy the current immutable object with elements that replace the content ofannotations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of annotations elements to set- Returns:
- A modified copy of
thisobject
-
withAnnotationsCount
public final ImmutableCheckRunOutput withAnnotationsCount(int value)
Copy the current immutable object by setting a present value for the optionalannotationsCountattribute.- Parameters:
value- The value for annotationsCount- Returns:
- A modified copy of
thisobject
-
withAnnotationsCount
public final ImmutableCheckRunOutput withAnnotationsCount(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theannotationsCountattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for annotationsCount- Returns:
- A modified copy of
thisobject
-
withAnnotationsUrl
public final ImmutableCheckRunOutput withAnnotationsUrl(String value)
Copy the current immutable object by setting a present value for the optionalannotationsUrlattribute.- Parameters:
value- The value for annotationsUrl- Returns:
- A modified copy of
thisobject
-
withAnnotationsUrl
public final ImmutableCheckRunOutput withAnnotationsUrl(Optional<String> optional)
Copy the current immutable object by setting an optional value for theannotationsUrlattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for annotationsUrl- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCheckRunOutputthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:title,summary,text,images,annotations,annotationsCount,annotationsUrl.
-
toString
public String toString()
Prints the immutable valueCheckRunOutputwith attribute values.
-
copyOf
public static ImmutableCheckRunOutput copyOf(CheckRunOutput instance)
Creates an immutable copy of aCheckRunOutputvalue. 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 forImmutableCheckRunOutput.ImmutableCheckRunOutput.builder() .title(String) // optionaltitle.summary(String) // optionalsummary.text(String) // optionaltext.addImages|addAllImages(com.spotify.github.v3.checks.CheckRunImage) //imageselements .addAnnotations|addAllAnnotations(com.spotify.github.v3.checks.Annotation) //annotationselements .annotationsCount(Integer) // optionalannotationsCount.annotationsUrl(String) // optionalannotationsUrl.build();- Returns:
- A new ImmutableCheckRunOutput builder
-
-