Package com.spotify.github.v3.checks
Class ImmutableCheckRunResponseList
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckRunResponseList
-
- All Implemented Interfaces:
CheckRunResponseList
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckRunResponseList extends Object implements CheckRunResponseList
Immutable implementation ofCheckRunResponseList.Use the builder to create immutable instances:
ImmutableCheckRunResponseList.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCheckRunResponseList.BuilderBuilds instances of typeImmutableCheckRunResponseList.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCheckRunResponseList.Builderbuilder()Creates a builder forImmutableCheckRunResponseList.List<CheckRunResponse>checkRuns()CheckRuns list.static ImmutableCheckRunResponseListcopyOf(CheckRunResponseList instance)Creates an immutable copy of aCheckRunResponseListvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCheckRunResponseListthat have equal attribute values.inthashCode()Computes a hash code from attributes:totalCount,checkRuns.StringtoString()Prints the immutable valueCheckRunResponseListwith attribute values.inttotalCount()The count of checks in the responseImmutableCheckRunResponseListwithCheckRuns(CheckRunResponse... elements)Copy the current immutable object with elements that replace the content ofcheckRuns.ImmutableCheckRunResponseListwithCheckRuns(Iterable<? extends CheckRunResponse> elements)Copy the current immutable object with elements that replace the content ofcheckRuns.ImmutableCheckRunResponseListwithTotalCount(int value)Copy the current immutable object by setting a value for thetotalCountattribute.
-
-
-
Method Detail
-
totalCount
public int totalCount()
The count of checks in the response- Specified by:
totalCountin interfaceCheckRunResponseList- Returns:
- the int
-
checkRuns
public List<CheckRunResponse> checkRuns()
CheckRuns list.- Specified by:
checkRunsin interfaceCheckRunResponseList- Returns:
- the list
-
withTotalCount
public final ImmutableCheckRunResponseList withTotalCount(int value)
Copy the current immutable object by setting a value for thetotalCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for totalCount- Returns:
- A modified copy of the
thisobject
-
withCheckRuns
public final ImmutableCheckRunResponseList withCheckRuns(CheckRunResponse... elements)
Copy the current immutable object with elements that replace the content ofcheckRuns.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCheckRuns
public final ImmutableCheckRunResponseList withCheckRuns(Iterable<? extends CheckRunResponse> elements)
Copy the current immutable object with elements that replace the content ofcheckRuns. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of checkRuns elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCheckRunResponseListthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:totalCount,checkRuns.
-
toString
public String toString()
Prints the immutable valueCheckRunResponseListwith attribute values.
-
copyOf
public static ImmutableCheckRunResponseList copyOf(CheckRunResponseList instance)
Creates an immutable copy of aCheckRunResponseListvalue. 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 CheckRunResponseList instance
-
builder
public static ImmutableCheckRunResponseList.Builder builder()
Creates a builder forImmutableCheckRunResponseList.ImmutableCheckRunResponseList.builder() .totalCount(int) // requiredtotalCount.addCheckRuns|addAllCheckRuns(com.spotify.github.v3.checks.CheckRunResponse) //checkRunselements .build();- Returns:
- A new ImmutableCheckRunResponseList builder
-
-