Package com.spotify.github.v3.repos
Class ImmutableRequiredStatusChecks
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableRequiredStatusChecks
-
- All Implemented Interfaces:
RequiredStatusChecks
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRequiredStatusChecks extends Object implements RequiredStatusChecks
Immutable implementation ofRequiredStatusChecks
.Use the builder to create immutable instances:
ImmutableRequiredStatusChecks.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableRequiredStatusChecks.Builder
Builds instances of typeImmutableRequiredStatusChecks
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRequiredStatusChecks.Builder
builder()
Creates a builder forImmutableRequiredStatusChecks
.List<String>
contexts()
static ImmutableRequiredStatusChecks
copyOf(RequiredStatusChecks instance)
Creates an immutable copy of aRequiredStatusChecks
value.String
enforcementLevel()
boolean
equals(Object another)
This instance is equal to all instances ofImmutableRequiredStatusChecks
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:enforcementLevel
,contexts
.String
toString()
Prints the immutable valueRequiredStatusChecks
with attribute values.ImmutableRequiredStatusChecks
withContexts(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofcontexts
.ImmutableRequiredStatusChecks
withContexts(String... elements)
Copy the current immutable object with elements that replace the content ofcontexts
.ImmutableRequiredStatusChecks
withEnforcementLevel(String value)
Copy the current immutable object by setting a value for theenforcementLevel
attribute.
-
-
-
Method Detail
-
enforcementLevel
public String enforcementLevel()
- Specified by:
enforcementLevel
in interfaceRequiredStatusChecks
- Returns:
- The value of the
enforcementLevel
attribute
-
contexts
public List<String> contexts()
- Specified by:
contexts
in interfaceRequiredStatusChecks
- Returns:
- The value of the
contexts
attribute
-
withEnforcementLevel
public final ImmutableRequiredStatusChecks withEnforcementLevel(String value)
Copy the current immutable object by setting a value for theenforcementLevel
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for enforcementLevel- Returns:
- A modified copy of the
this
object
-
withContexts
public final ImmutableRequiredStatusChecks withContexts(String... elements)
Copy the current immutable object with elements that replace the content ofcontexts
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withContexts
public final ImmutableRequiredStatusChecks withContexts(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofcontexts
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of contexts elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableRequiredStatusChecks
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:enforcementLevel
,contexts
.
-
toString
public String toString()
Prints the immutable valueRequiredStatusChecks
with attribute values.
-
copyOf
public static ImmutableRequiredStatusChecks copyOf(RequiredStatusChecks instance)
Creates an immutable copy of aRequiredStatusChecks
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 RequiredStatusChecks instance
-
builder
public static ImmutableRequiredStatusChecks.Builder builder()
Creates a builder forImmutableRequiredStatusChecks
.ImmutableRequiredStatusChecks.builder() .enforcementLevel(String) // required
enforcementLevel
.addContexts|addAllContexts(String) //contexts
elements .build();- Returns:
- A new ImmutableRequiredStatusChecks builder
-
-