Class ImmutableInstallationList

  • All Implemented Interfaces:
    InstallationList

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableInstallationList
    extends Object
    implements InstallationList
    Immutable implementation of InstallationList.

    Use the builder to create immutable instances: ImmutableInstallationList.builder().

    • Method Detail

      • totalCount

        public int totalCount()
        Count of installations of the App the caller has access to.
        Specified by:
        totalCount in interface InstallationList
        Returns:
        the int
        See Also:
        "https://developer.github.com/v3/apps/installations/#list-installations-for-a-user"
      • withTotalCount

        public final ImmutableInstallationList withTotalCount​(int value)
        Copy the current immutable object by setting a value for the totalCount attribute. A value equality check is used to prevent copying of the same value by returning this.
        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 of installations.
        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 of installations. A shallow reference equality check is used to prevent copying of the same value by returning this.
        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 of ImmutableInstallationList that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: totalCount, installations.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value InstallationList with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableInstallationList copyOf​(InstallationList instance)
        Creates an immutable copy of a InstallationList 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