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.Builder
is 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 providedCheckRunOutput
instance. 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:
this
builder for use in a chained invocation
-
title
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder title(String title)
Initializes the optional valuetitle
to title.- Parameters:
title
- The value for title- Returns:
this
builder for chained invocation
-
title
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder title(Optional<String> title)
Initializes the optional valuetitle
to title.- Parameters:
title
- The value for title- Returns:
this
builder for use in a chained invocation
-
summary
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder summary(String summary)
Initializes the optional valuesummary
to summary.- Parameters:
summary
- The value for summary- Returns:
this
builder for chained invocation
-
summary
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder summary(Optional<String> summary)
Initializes the optional valuesummary
to summary.- Parameters:
summary
- The value for summary- Returns:
this
builder for use in a chained invocation
-
text
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder text(String text)
Initializes the optional valuetext
to text.- Parameters:
text
- The value for text- Returns:
this
builder for chained invocation
-
text
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder text(Optional<String> text)
Initializes the optional valuetext
to text.- Parameters:
text
- The value for text- Returns:
this
builder for use in a chained invocation
-
addImages
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addImages(CheckRunImage element)
Adds one element toimages
list.- Parameters:
element
- A images element- Returns:
this
builder for use in a chained invocation
-
addImages
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addImages(CheckRunImage... elements)
Adds elements toimages
list.- Parameters:
elements
- An array of images elements- Returns:
this
builder for use in a chained invocation
-
images
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder images(Iterable<? extends CheckRunImage> elements)
Sets or replaces all elements forimages
list.- Parameters:
elements
- An iterable of images elements- Returns:
this
builder for use in a chained invocation
-
addAllImages
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAllImages(Iterable<? extends CheckRunImage> elements)
Adds elements toimages
list.- Parameters:
elements
- An iterable of images elements- Returns:
this
builder for use in a chained invocation
-
addAnnotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAnnotations(Annotation element)
Adds one element toannotations
list.- Parameters:
element
- A annotations element- Returns:
this
builder for use in a chained invocation
-
addAnnotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAnnotations(Annotation... elements)
Adds elements toannotations
list.- Parameters:
elements
- An array of annotations elements- Returns:
this
builder for use in a chained invocation
-
annotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotations(Iterable<? extends Annotation> elements)
Sets or replaces all elements forannotations
list.- Parameters:
elements
- An iterable of annotations elements- Returns:
this
builder for use in a chained invocation
-
addAllAnnotations
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder addAllAnnotations(Iterable<? extends Annotation> elements)
Adds elements toannotations
list.- Parameters:
elements
- An iterable of annotations elements- Returns:
this
builder for use in a chained invocation
-
annotationsCount
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsCount(int annotationsCount)
Initializes the optional valueannotationsCount
to annotationsCount.- Parameters:
annotationsCount
- The value for annotationsCount- Returns:
this
builder for chained invocation
-
annotationsCount
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsCount(Optional<Integer> annotationsCount)
Initializes the optional valueannotationsCount
to annotationsCount.- Parameters:
annotationsCount
- The value for annotationsCount- Returns:
this
builder for use in a chained invocation
-
annotationsUrl
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsUrl(String annotationsUrl)
Initializes the optional valueannotationsUrl
to annotationsUrl.- Parameters:
annotationsUrl
- The value for annotationsUrl- Returns:
this
builder for chained invocation
-
annotationsUrl
@CanIgnoreReturnValue public final ImmutableCheckRunOutput.Builder annotationsUrl(Optional<String> annotationsUrl)
Initializes the optional valueannotationsUrl
to annotationsUrl.- Parameters:
annotationsUrl
- The value for annotationsUrl- Returns:
this
builder 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
-
-