Class ImmutableCloudTask

  • All Implemented Interfaces:
    Derivable<CloudTask>

    @Generated("org.immutables.processor.ProxyProcessor")
    public final class ImmutableCloudTask
    extends CloudTask
    Immutable implementation of CloudTask.

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

    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in class CloudEntity
        Returns:
        The value of the name attribute
      • getV3Metadata

        public org.cloudfoundry.client.v3.Metadata getV3Metadata()
        Specified by:
        getV3Metadata in class CloudEntity
        Returns:
        The value of the v3Metadata attribute
      • getCommand

        public String getCommand()
        Specified by:
        getCommand in class CloudTask
        Returns:
        The value of the command attribute
      • withName

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

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

        public final ImmutableCloudTask withV3Metadata​(org.cloudfoundry.client.v3.Metadata value)
        Copy the current immutable object by setting a value for the v3Metadata attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for v3Metadata (can be null)
        Returns:
        A modified copy of the this object
      • withCommand

        public final ImmutableCloudTask 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
      • withLimits

        public final ImmutableCloudTask withLimits​(CloudTask.Limits value)
        Copy the current immutable object by setting a value for the limits attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for limits (can be null)
        Returns:
        A modified copy of the this object
      • withResult

        public final ImmutableCloudTask withResult​(CloudTask.Result value)
        Copy the current immutable object by setting a value for the result attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for result (can be null)
        Returns:
        A modified copy of the this object
      • withState

        public final ImmutableCloudTask withState​(CloudTask.State value)
        Copy the current immutable object by setting a value for the state attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for state (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 ImmutableCloudTask 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: name, metadata, v3Metadata, command, limits, result, state.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableCloudTask copyOf​(CloudTask instance)
        Creates an immutable copy of a CloudTask 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 CloudTask instance
      • builder

        public static ImmutableCloudTask.Builder builder()
        Creates a builder for ImmutableCloudTask.
         ImmutableCloudTask.builder()
            .name(String | null) // nullable name
            .metadata(com.sap.cloudfoundry.client.facade.domain.CloudMetadata | null) // nullable metadata
            .v3Metadata(org.cloudfoundry.client.v3.Metadata | null) // nullable v3Metadata
            .command(String | null) // nullable command
            .limits(com.sap.cloudfoundry.client.facade.domain.CloudTask.Limits | null) // nullable limits
            .result(com.sap.cloudfoundry.client.facade.domain.CloudTask.Result | null) // nullable result
            .state(com.sap.cloudfoundry.client.facade.domain.CloudTask.State | null) // nullable state
            .build();
         
        Returns:
        A new ImmutableCloudTask builder