Package com.spotify.github.v3.checks
Class ImmutableInstallationList
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableInstallationList
-
- All Implemented Interfaces:
InstallationList
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableInstallationList extends Object implements InstallationList
Immutable implementation ofInstallationList
.Use the builder to create immutable instances:
ImmutableInstallationList.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableInstallationList.Builder
Builds instances of typeImmutableInstallationList
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableInstallationList.Builder
builder()
Creates a builder forImmutableInstallationList
.static ImmutableInstallationList
copyOf(InstallationList instance)
Creates an immutable copy of aInstallationList
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableInstallationList
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:totalCount
,installations
.List<Installation>
installations()
Installations list.String
toString()
Prints the immutable valueInstallationList
with attribute values.int
totalCount()
Count of installations of the App the caller has access to.ImmutableInstallationList
withInstallations(Installation... elements)
Copy the current immutable object with elements that replace the content ofinstallations
.ImmutableInstallationList
withInstallations(Iterable<? extends Installation> elements)
Copy the current immutable object with elements that replace the content ofinstallations
.ImmutableInstallationList
withTotalCount(int value)
Copy the current immutable object by setting a value for thetotalCount
attribute.
-
-
-
Method Detail
-
totalCount
public int totalCount()
Count of installations of the App the caller has access to.- Specified by:
totalCount
in interfaceInstallationList
- Returns:
- the int
- See Also:
- "https://developer.github.com/v3/apps/installations/#list-installations-for-a-user"
-
installations
public List<Installation> installations()
Installations list.- Specified by:
installations
in interfaceInstallationList
- Returns:
- the list
-
withTotalCount
public final ImmutableInstallationList withTotalCount(int value)
Copy the current immutable object by setting a value for thetotalCount
attribute. 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
this
object
-
withInstallations
public final ImmutableInstallationList withInstallations(Installation... elements)
Copy the current immutable object with elements that replace the content ofinstallations
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withInstallations
public final ImmutableInstallationList withInstallations(Iterable<? extends Installation> elements)
Copy the current immutable object with elements that replace the content ofinstallations
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of installations elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableInstallationList
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:totalCount
,installations
.
-
toString
public String toString()
Prints the immutable valueInstallationList
with attribute values.
-
copyOf
public static ImmutableInstallationList copyOf(InstallationList instance)
Creates an immutable copy of aInstallationList
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 InstallationList instance
-
builder
public static ImmutableInstallationList.Builder builder()
Creates a builder forImmutableInstallationList
.ImmutableInstallationList.builder() .totalCount(int) // required
totalCount
.addInstallations|addAllInstallations(com.spotify.github.v3.checks.Installation) //installations
elements .build();- Returns:
- A new ImmutableInstallationList builder
-
-