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 classImmutableInstallationList.BuilderBuilds instances of typeImmutableInstallationList.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableInstallationList.Builderbuilder()Creates a builder forImmutableInstallationList.static ImmutableInstallationListcopyOf(InstallationList instance)Creates an immutable copy of aInstallationListvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableInstallationListthat have equal attribute values.inthashCode()Computes a hash code from attributes:totalCount,installations.List<Installation>installations()Installations list.StringtoString()Prints the immutable valueInstallationListwith attribute values.inttotalCount()Count of installations of the App the caller has access to.ImmutableInstallationListwithInstallations(Installation... elements)Copy the current immutable object with elements that replace the content ofinstallations.ImmutableInstallationListwithInstallations(Iterable<? extends Installation> elements)Copy the current immutable object with elements that replace the content ofinstallations.ImmutableInstallationListwithTotalCount(int value)Copy the current immutable object by setting a value for thetotalCountattribute.
-
-
-
Method Detail
-
totalCount
public int totalCount()
Count of installations of the App the caller has access to.- Specified by:
totalCountin 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:
installationsin interfaceInstallationList- Returns:
- the list
-
withTotalCount
public final ImmutableInstallationList 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
-
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
thisobject
-
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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableInstallationListthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:totalCount,installations.
-
toString
public String toString()
Prints the immutable valueInstallationListwith attribute values.
-
copyOf
public static ImmutableInstallationList copyOf(InstallationList instance)
Creates an immutable copy of aInstallationListvalue. 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) // requiredtotalCount.addInstallations|addAllInstallations(com.spotify.github.v3.checks.Installation) //installationselements .build();- Returns:
- A new ImmutableInstallationList builder
-
-