Package com.spotify.github.v3.checks
Class ImmutableCheckRunOutput.Builder
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckRunOutput.Builder
-
- Enclosing class:
- ImmutableCheckRunOutput
@NotThreadSafe public static final class ImmutableCheckRunOutput.Builder extends Object
Builds instances of typeImmutableCheckRunOutput. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder from(CheckRunOutput instance)
Fill a builder with attribute values from the providedCheckRunOutputinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
title
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder title(String title)
Initializes the optional valuetitleto title.- Parameters:
title- The value for title- Returns:
thisbuilder for chained invocation
-
title
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder title(Optional<String> title)
Initializes the optional valuetitleto title.- Parameters:
title- The value for title- Returns:
thisbuilder for use in a chained invocation
-
summary
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder summary(String summary)
Initializes the optional valuesummaryto summary.- Parameters:
summary- The value for summary- Returns:
thisbuilder for chained invocation
-
summary
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder summary(Optional<String> summary)
Initializes the optional valuesummaryto summary.- Parameters:
summary- The value for summary- Returns:
thisbuilder for use in a chained invocation
-
text
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder text(String text)
Initializes the optional valuetextto text.- Parameters:
text- The value for text- Returns:
thisbuilder for chained invocation
-
text
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder text(Optional<String> text)
Initializes the optional valuetextto text.- Parameters:
text- The value for text- Returns:
thisbuilder for use in a chained invocation
-
addImages
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addImages(CheckRunImage element)
Adds one element toimageslist.- Parameters:
element- A images element- Returns:
thisbuilder for use in a chained invocation
-
addImages
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addImages(CheckRunImage... elements)
Adds elements toimageslist.- Parameters:
elements- An array of images elements- Returns:
thisbuilder for use in a chained invocation
-
images
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder images(Iterable<? extends CheckRunImage> elements)
Sets or replaces all elements forimageslist.- Parameters:
elements- An iterable of images elements- Returns:
thisbuilder for use in a chained invocation
-
addAllImages
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAllImages(Iterable<? extends CheckRunImage> elements)
Adds elements toimageslist.- Parameters:
elements- An iterable of images elements- Returns:
thisbuilder for use in a chained invocation
-
addAnnotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAnnotations(Annotation element)
Adds one element toannotationslist.- Parameters:
element- A annotations element- Returns:
thisbuilder for use in a chained invocation
-
addAnnotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAnnotations(Annotation... elements)
Adds elements toannotationslist.- Parameters:
elements- An array of annotations elements- Returns:
thisbuilder for use in a chained invocation
-
annotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotations(Iterable<? extends Annotation> elements)
Sets or replaces all elements forannotationslist.- Parameters:
elements- An iterable of annotations elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAnnotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAllAnnotations(Iterable<? extends Annotation> elements)
Adds elements toannotationslist.- Parameters:
elements- An iterable of annotations elements- Returns:
thisbuilder for use in a chained invocation
-
annotationsCount
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsCount(int annotationsCount)
Initializes the optional valueannotationsCountto annotationsCount.- Parameters:
annotationsCount- The value for annotationsCount- Returns:
thisbuilder for chained invocation
-
annotationsCount
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsCount(Optional<Integer> annotationsCount)
Initializes the optional valueannotationsCountto annotationsCount.- Parameters:
annotationsCount- The value for annotationsCount- Returns:
thisbuilder for use in a chained invocation
-
annotationsUrl
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsUrl(String annotationsUrl)
Initializes the optional valueannotationsUrlto annotationsUrl.- Parameters:
annotationsUrl- The value for annotationsUrl- Returns:
thisbuilder for chained invocation
-
annotationsUrl
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsUrl(Optional<String> annotationsUrl)
Initializes the optional valueannotationsUrlto annotationsUrl.- Parameters:
annotationsUrl- The value for annotationsUrl- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCheckRunOutput build()
Builds a newImmutableCheckRunOutput.- Returns:
- An immutable instance of CheckRunOutput
- Throws:
IllegalStateException- if any required attributes are missing
-
-