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 class
ImmutableCheckRunOutput.Builder
Builds 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.Builder
builder()
Creates a builder forImmutableCheckRunOutput
.static ImmutableCheckRunOutput
copyOf(CheckRunOutput instance)
Creates an immutable copy of aCheckRunOutput
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableCheckRunOutput
that have equal attribute values.int
hashCode()
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.String
toString()
Prints the immutable valueCheckRunOutput
with attribute values.ImmutableCheckRunOutput
withAnnotations(Annotation... elements)
Copy the current immutable object with elements that replace the content ofannotations
.ImmutableCheckRunOutput
withAnnotations(Iterable<? extends Annotation> elements)
Copy the current immutable object with elements that replace the content ofannotations
.ImmutableCheckRunOutput
withAnnotationsCount(int value)
Copy the current immutable object by setting a present value for the optionalannotationsCount
attribute.ImmutableCheckRunOutput
withAnnotationsCount(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theannotationsCount
attribute.ImmutableCheckRunOutput
withAnnotationsUrl(String value)
Copy the current immutable object by setting a present value for the optionalannotationsUrl
attribute.ImmutableCheckRunOutput
withAnnotationsUrl(Optional<String> optional)
Copy the current immutable object by setting an optional value for theannotationsUrl
attribute.ImmutableCheckRunOutput
withImages(CheckRunImage... elements)
Copy the current immutable object with elements that replace the content ofimages
.ImmutableCheckRunOutput
withImages(Iterable<? extends CheckRunImage> elements)
Copy the current immutable object with elements that replace the content ofimages
.ImmutableCheckRunOutput
withSummary(String value)
Copy the current immutable object by setting a present value for the optionalsummary
attribute.ImmutableCheckRunOutput
withSummary(Optional<String> optional)
Copy the current immutable object by setting an optional value for thesummary
attribute.ImmutableCheckRunOutput
withText(String value)
Copy the current immutable object by setting a present value for the optionaltext
attribute.ImmutableCheckRunOutput
withText(Optional<String> optional)
Copy the current immutable object by setting an optional value for thetext
attribute.ImmutableCheckRunOutput
withTitle(String value)
Copy the current immutable object by setting a present value for the optionaltitle
attribute.ImmutableCheckRunOutput
withTitle(Optional<String> optional)
Copy the current immutable object by setting an optional value for thetitle
attribute.
-
-
-
Method Detail
-
title
public Optional<String> title()
The title of the check run.- Specified by:
title
in interfaceCheckRunOutput
- Returns:
- the string
-
summary
public Optional<String> summary()
The summary of the check run. This parameter supports Markdown.- Specified by:
summary
in interfaceCheckRunOutput
- Returns:
- the optional
-
text
public Optional<String> text()
The details of the check run. This parameter supports Markdown.- Specified by:
text
in interfaceCheckRunOutput
- Returns:
- the optional
-
images
public List<CheckRunImage> images()
Adds images to the output displayed in the GitHub pull request UI.- Specified by:
images
in 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:
annotations
in interfaceCheckRunOutput
- Returns:
- the list
-
annotationsCount
public Optional<Integer> annotationsCount()
The count of annotations. Used on response objects.- Specified by:
annotationsCount
in interfaceCheckRunOutput
- Returns:
- the optional
-
annotationsUrl
public Optional<String> annotationsUrl()
Annotations URL, used on response objects.- Specified by:
annotationsUrl
in interfaceCheckRunOutput
- Returns:
- the optional
-
withTitle
public final ImmutableCheckRunOutput withTitle(String value)
Copy the current immutable object by setting a present value for the optionaltitle
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 thetitle
attribute. 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
this
object
-
withSummary
public final ImmutableCheckRunOutput withSummary(String value)
Copy the current immutable object by setting a present value for the optionalsummary
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 thesummary
attribute. 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
this
object
-
withText
public final ImmutableCheckRunOutput withText(String value)
Copy the current immutable object by setting a present value for the optionaltext
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 thetext
attribute. 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
this
object
-
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
this
object
-
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
this
object
-
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
this
object
-
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
this
object
-
withAnnotationsCount
public final ImmutableCheckRunOutput withAnnotationsCount(int value)
Copy the current immutable object by setting a present value for the optionalannotationsCount
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 theannotationsCount
attribute. 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
this
object
-
withAnnotationsUrl
public final ImmutableCheckRunOutput withAnnotationsUrl(String value)
Copy the current immutable object by setting a present value for the optionalannotationsUrl
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 theannotationsUrl
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCheckRunOutput
that 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 valueCheckRunOutput
with attribute values.
-
copyOf
public static ImmutableCheckRunOutput copyOf(CheckRunOutput instance)
Creates an immutable copy of aCheckRunOutput
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 forImmutableCheckRunOutput
.ImmutableCheckRunOutput.builder() .title(String) // optional
title
.summary(String) // optionalsummary
.text(String) // optionaltext
.addImages|addAllImages(com.spotify.github.v3.checks.CheckRunImage) //images
elements .addAnnotations|addAllAnnotations(com.spotify.github.v3.checks.Annotation) //annotations
elements .annotationsCount(Integer) // optionalannotationsCount
.annotationsUrl(String) // optionalannotationsUrl
.build();- Returns:
- A new ImmutableCheckRunOutput builder
-
-