Class ImmutableStaging

  • All Implemented Interfaces:
    Staging

    @Generated("org.immutables.processor.ProxyProcessor")
    public final class ImmutableStaging
    extends Object
    implements Staging
    Immutable implementation of Staging.

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

    • Method Detail

      • getBuildpacks

        public List<String> getBuildpacks()
        Specified by:
        getBuildpacks in interface Staging
        Returns:
        The buildpacks, or empty to use the default buildpack detected based on application content
      • getCommand

        public String getCommand()
        Specified by:
        getCommand in interface Staging
        Returns:
        The start command to use
      • getDetectedBuildpack

        public String getDetectedBuildpack()
        Specified by:
        getDetectedBuildpack in interface Staging
        Returns:
        Raw, free-form information regarding a detected buildpack, or null if no detected buildpack was resolved. For example, if the application is stopped, the detected buildpack may be null.
      • isSshEnabled

        public Boolean isSshEnabled()
        Specified by:
        isSshEnabled in interface Staging
        Returns:
        boolean value to see if ssh is enabled
      • getStack

        public String getStack()
        Specified by:
        getStack in interface Staging
        Returns:
        the stack to use when staging the application, or null to use the default stack
      • withBuildpacks

        public final ImmutableStaging withBuildpacks​(String... elements)
        Copy the current immutable object with elements that replace the content of buildpacks.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withBuildpacks

        public final ImmutableStaging withBuildpacks​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of buildpacks. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of buildpacks elements to set
        Returns:
        A modified copy of this object
      • withCommand

        public final ImmutableStaging withCommand​(String value)
        Copy the current immutable object by setting a value for the command attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for command (can be null)
        Returns:
        A modified copy of the this object
      • withDetectedBuildpack

        public final ImmutableStaging withDetectedBuildpack​(String value)
        Copy the current immutable object by setting a value for the detectedBuildpack attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for detectedBuildpack (can be null)
        Returns:
        A modified copy of the this object
      • withHealthCheckTimeout

        public final ImmutableStaging withHealthCheckTimeout​(Integer value)
        Copy the current immutable object by setting a value for the healthCheckTimeout attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for healthCheckTimeout (can be null)
        Returns:
        A modified copy of the this object
      • withHealthCheckType

        public final ImmutableStaging withHealthCheckType​(String value)
        Copy the current immutable object by setting a value for the healthCheckType attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for healthCheckType (can be null)
        Returns:
        A modified copy of the this object
      • withHealthCheckHttpEndpoint

        public final ImmutableStaging withHealthCheckHttpEndpoint​(String value)
        Copy the current immutable object by setting a value for the healthCheckHttpEndpoint attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for healthCheckHttpEndpoint (can be null)
        Returns:
        A modified copy of the this object
      • withIsSshEnabled

        public final ImmutableStaging withIsSshEnabled​(Boolean value)
        Copy the current immutable object by setting a value for the isSshEnabled attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for isSshEnabled (can be null)
        Returns:
        A modified copy of the this object
      • withStack

        public final ImmutableStaging withStack​(String value)
        Copy the current immutable object by setting a value for the stack attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for stack (can be null)
        Returns:
        A modified copy of the this object
      • withDockerInfo

        public final ImmutableStaging withDockerInfo​(DockerInfo value)
        Copy the current immutable object by setting a value for the dockerInfo attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for dockerInfo (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(Object another)
        This instance is equal to all instances of ImmutableStaging 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: buildpacks, command, detectedBuildpack, healthCheckTimeout, healthCheckType, healthCheckHttpEndpoint, isSshEnabled, stack, dockerInfo.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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