Class ImmutableCheckSuite

  • All Implemented Interfaces:
    CheckSuite

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

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

    • Method Detail

      • id

        public Integer id()
        The Check Suite Id.
        Specified by:
        id in interface CheckSuite
        Returns:
        the integer
      • withId

        public final ImmutableCheckSuite withId​(Integer value)
        Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
        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 optional app 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 the app attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        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 optional headBranch 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 the headBranch attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        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 of ImmutableCheckSuite 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: id, app, headBranch.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableCheckSuite copyOf​(CheckSuite instance)
        Creates an immutable copy of a CheckSuite 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 for ImmutableCheckSuite.
         ImmutableCheckSuite.builder()
            .id(Integer) // required id
            .app(com.spotify.github.v3.checks.App) // optional app
            .headBranch(String) // optional headBranch
            .build();
         
        Returns:
        A new ImmutableCheckSuite builder