Package com.spotify.github.v3.repos
Class ImmutableRequiredStatusChecks.Builder
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableRequiredStatusChecks.Builder
-
- Enclosing class:
- ImmutableRequiredStatusChecks
@NotThreadSafe public static final class ImmutableRequiredStatusChecks.Builder extends Object
Builds instances of typeImmutableRequiredStatusChecks
. 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableRequiredStatusChecks.Builder
addAllContexts(Iterable<String> elements)
Adds elements tocontexts
list.ImmutableRequiredStatusChecks.Builder
addContexts(String element)
Adds one element tocontexts
list.ImmutableRequiredStatusChecks.Builder
addContexts(String... elements)
Adds elements tocontexts
list.ImmutableRequiredStatusChecks
build()
Builds a newImmutableRequiredStatusChecks
.ImmutableRequiredStatusChecks.Builder
contexts(Iterable<String> elements)
Sets or replaces all elements forcontexts
list.ImmutableRequiredStatusChecks.Builder
enforcementLevel(String enforcementLevel)
Initializes the value for theenforcementLevel
attribute.ImmutableRequiredStatusChecks.Builder
from(RequiredStatusChecks instance)
Fill a builder with attribute values from the providedRequiredStatusChecks
instance.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRequiredStatusChecks.Builder from(RequiredStatusChecks instance)
Fill a builder with attribute values from the providedRequiredStatusChecks
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
-
enforcementLevel
@CanIgnoreReturnValue public final ImmutableRequiredStatusChecks.Builder enforcementLevel(String enforcementLevel)
Initializes the value for theenforcementLevel
attribute.- Parameters:
enforcementLevel
- The value for enforcementLevel- Returns:
this
builder for use in a chained invocation
-
addContexts
@CanIgnoreReturnValue public final ImmutableRequiredStatusChecks.Builder addContexts(String element)
Adds one element tocontexts
list.- Parameters:
element
- A contexts element- Returns:
this
builder for use in a chained invocation
-
addContexts
@CanIgnoreReturnValue public final ImmutableRequiredStatusChecks.Builder addContexts(String... elements)
Adds elements tocontexts
list.- Parameters:
elements
- An array of contexts elements- Returns:
this
builder for use in a chained invocation
-
contexts
@CanIgnoreReturnValue public final ImmutableRequiredStatusChecks.Builder contexts(Iterable<String> elements)
Sets or replaces all elements forcontexts
list.- Parameters:
elements
- An iterable of contexts elements- Returns:
this
builder for use in a chained invocation
-
addAllContexts
@CanIgnoreReturnValue public final ImmutableRequiredStatusChecks.Builder addAllContexts(Iterable<String> elements)
Adds elements tocontexts
list.- Parameters:
elements
- An iterable of contexts elements- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableRequiredStatusChecks build()
Builds a newImmutableRequiredStatusChecks
.- Returns:
- An immutable instance of RequiredStatusChecks
- Throws:
IllegalStateException
- if any required attributes are missing
-
-