Class ImmutableCloudApplication

    • 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
      • getMemory

        public int getMemory()
        Overrides:
        getMemory in class CloudApplication
        Returns:
        The value of the memory attribute
      • getDiskQuota

        public int getDiskQuota()
        Overrides:
        getDiskQuota in class CloudApplication
        Returns:
        The value of the diskQuota attribute
      • getInstances

        public int getInstances()
        Overrides:
        getInstances in class CloudApplication
        Returns:
        The value of the instances attribute
      • withName

        public final ImmutableCloudApplication 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 ImmutableCloudApplication 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 ImmutableCloudApplication 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
      • withMemory

        public final ImmutableCloudApplication withMemory​(int value)
        Copy the current immutable object by setting a value for the memory attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for memory
        Returns:
        A modified copy of the this object
      • withDiskQuota

        public final ImmutableCloudApplication withDiskQuota​(int value)
        Copy the current immutable object by setting a value for the diskQuota attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for diskQuota
        Returns:
        A modified copy of the this object
      • withInstances

        public final ImmutableCloudApplication withInstances​(int value)
        Copy the current immutable object by setting a value for the instances attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for instances
        Returns:
        A modified copy of the this object
      • withRunningInstances

        public final ImmutableCloudApplication withRunningInstances​(int value)
        Copy the current immutable object by setting a value for the runningInstances attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for runningInstances
        Returns:
        A modified copy of the this object
      • withState

        public final ImmutableCloudApplication withState​(CloudApplication.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
      • withStaging

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

        public final ImmutableCloudApplication withPackageState​(PackageState value)
        Copy the current immutable object by setting a value for the packageState attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for packageState (can be null)
        Returns:
        A modified copy of the this object
      • withStagingError

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

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

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

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

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

        public final ImmutableCloudApplication withEnv​(Map<String,​? extends String> entries)
        Copy the current immutable object by replacing the env map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the env map
        Returns:
        A modified copy of this object
      • withSpace

        public final ImmutableCloudApplication withSpace​(CloudSpace value)
        Copy the current immutable object by setting a value for the space attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for space (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 ImmutableCloudApplication 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, memory, diskQuota, instances, runningInstances, state, staging, packageState, stagingError, uris, services, env, space.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableCloudApplication.Builder builder()
        Creates a builder for ImmutableCloudApplication.
         ImmutableCloudApplication.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
            .memory(int) // optional memory
            .diskQuota(int) // optional diskQuota
            .instances(int) // optional instances
            .runningInstances(int) // optional runningInstances
            .state(com.sap.cloudfoundry.client.facade.domain.CloudApplication.State | null) // nullable state
            .staging(com.sap.cloudfoundry.client.facade.domain.Staging | null) // nullable staging
            .packageState(com.sap.cloudfoundry.client.facade.domain.PackageState | null) // nullable packageState
            .stagingError(String | null) // nullable stagingError
            .addUri|addAllUris(String) // uris elements
            .addService|addAllServices(String) // services elements
            .putEnv|putAllEnv(String => String) // env mappings
            .space(com.sap.cloudfoundry.client.facade.domain.CloudSpace | null) // nullable space
            .build();
         
        Returns:
        A new ImmutableCloudApplication builder