Package com.spotify.github.v3.checks
Class ImmutableCheckSuite
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckSuite
-
- All Implemented Interfaces:
CheckSuite
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckSuite extends Object implements CheckSuite
Immutable implementation ofCheckSuite
.Use the builder to create immutable instances:
ImmutableCheckSuite.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableCheckSuite.Builder
Builds instances of typeImmutableCheckSuite
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<App>
app()
static ImmutableCheckSuite.Builder
builder()
Creates a builder forImmutableCheckSuite
.static ImmutableCheckSuite
copyOf(CheckSuite instance)
Creates an immutable copy of aCheckSuite
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableCheckSuite
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:id
,app
,headBranch
.Optional<String>
headBranch()
Integer
id()
The Check Suite Id.String
toString()
Prints the immutable valueCheckSuite
with attribute values.ImmutableCheckSuite
withApp(App value)
Copy the current immutable object by setting a present value for the optionalapp
attribute.ImmutableCheckSuite
withApp(Optional<? extends App> optional)
Copy the current immutable object by setting an optional value for theapp
attribute.ImmutableCheckSuite
withHeadBranch(String value)
Copy the current immutable object by setting a present value for the optionalheadBranch
attribute.ImmutableCheckSuite
withHeadBranch(Optional<String> optional)
Copy the current immutable object by setting an optional value for theheadBranch
attribute.ImmutableCheckSuite
withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute.
-
-
-
Method Detail
-
id
public Integer id()
The Check Suite Id.- Specified by:
id
in interfaceCheckSuite
- Returns:
- the integer
-
app
public Optional<App> app()
- Specified by:
app
in interfaceCheckSuite
- Returns:
- The value of the
app
attribute
-
headBranch
public Optional<String> headBranch()
- Specified by:
headBranch
in interfaceCheckSuite
- Returns:
- The value of the
headBranch
attribute
-
withId
public final ImmutableCheckSuite withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id- Returns:
- A modified copy of the
this
object
-
withApp
public final ImmutableCheckSuite withApp(App value)
Copy the current immutable object by setting a present value for the optionalapp
attribute.- Parameters:
value
- The value for app- Returns:
- A modified copy of
this
object
-
withApp
public final ImmutableCheckSuite withApp(Optional<? extends App> optional)
Copy the current immutable object by setting an optional value for theapp
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for app- Returns:
- A modified copy of
this
object
-
withHeadBranch
public final ImmutableCheckSuite withHeadBranch(String value)
Copy the current immutable object by setting a present value for the optionalheadBranch
attribute.- Parameters:
value
- The value for headBranch- Returns:
- A modified copy of
this
object
-
withHeadBranch
public final ImmutableCheckSuite withHeadBranch(Optional<String> optional)
Copy the current immutable object by setting an optional value for theheadBranch
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for headBranch- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCheckSuite
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id
,app
,headBranch
.
-
toString
public String toString()
Prints the immutable valueCheckSuite
with attribute values.
-
copyOf
public static ImmutableCheckSuite copyOf(CheckSuite instance)
Creates an immutable copy of aCheckSuite
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 CheckSuite instance
-
builder
public static ImmutableCheckSuite.Builder builder()
Creates a builder forImmutableCheckSuite
.ImmutableCheckSuite.builder() .id(Integer) // required
id
.app(com.spotify.github.v3.checks.App) // optionalapp
.headBranch(String) // optionalheadBranch
.build();- Returns:
- A new ImmutableCheckSuite builder
-
-