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 classImmutableRequiredStatusChecks.BuilderBuilds instances of typeImmutableRequiredStatusChecks.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRequiredStatusChecks.Builderbuilder()Creates a builder forImmutableRequiredStatusChecks.List<String>contexts()static ImmutableRequiredStatusCheckscopyOf(RequiredStatusChecks instance)Creates an immutable copy of aRequiredStatusChecksvalue.StringenforcementLevel()booleanequals(Object another)This instance is equal to all instances ofImmutableRequiredStatusChecksthat have equal attribute values.inthashCode()Computes a hash code from attributes:enforcementLevel,contexts.StringtoString()Prints the immutable valueRequiredStatusCheckswith attribute values.ImmutableRequiredStatusCheckswithContexts(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofcontexts.ImmutableRequiredStatusCheckswithContexts(String... elements)Copy the current immutable object with elements that replace the content ofcontexts.ImmutableRequiredStatusCheckswithEnforcementLevel(String value)Copy the current immutable object by setting a value for theenforcementLevelattribute.
-
-
-
Method Detail
-
enforcementLevel
public String enforcementLevel()
- Specified by:
enforcementLevelin interfaceRequiredStatusChecks- Returns:
- The value of the
enforcementLevelattribute
-
contexts
public List<String> contexts()
- Specified by:
contextsin interfaceRequiredStatusChecks- Returns:
- The value of the
contextsattribute
-
withEnforcementLevel
public final ImmutableRequiredStatusChecks withEnforcementLevel(String value)
Copy the current immutable object by setting a value for theenforcementLevelattribute. 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
thisobject
-
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
thisobject
-
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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableRequiredStatusChecksthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:enforcementLevel,contexts.
-
toString
public String toString()
Prints the immutable valueRequiredStatusCheckswith attribute values.
-
copyOf
public static ImmutableRequiredStatusChecks copyOf(RequiredStatusChecks instance)
Creates an immutable copy of aRequiredStatusChecksvalue. 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) // requiredenforcementLevel.addContexts|addAllContexts(String) //contextselements .build();- Returns:
- A new ImmutableRequiredStatusChecks builder
-
-