Class ImmutableCloudApplication.Builder

  • Enclosing class:
    ImmutableCloudApplication

    public static final class ImmutableCloudApplication.Builder
    extends Object
    Builds instances of type ImmutableCloudApplication. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final ImmutableCloudApplication.Builder from​(CloudApplication instance)
        Fill a builder with attribute values from the provided com.sap.cloudfoundry.client.facade.domain.CloudApplication instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final ImmutableCloudApplication.Builder from​(CloudEntity instance)
        Fill a builder with attribute values from the provided com.sap.cloudfoundry.client.facade.domain.CloudEntity instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • name

        public final ImmutableCloudApplication.Builder name​(String name)
        Initializes the value for the name attribute.
        Parameters:
        name - The value for name (can be null)
        Returns:
        this builder for use in a chained invocation
      • v3Metadata

        public final ImmutableCloudApplication.Builder v3Metadata​(org.cloudfoundry.client.v3.Metadata v3Metadata)
        Initializes the value for the v3Metadata attribute.
        Parameters:
        v3Metadata - The value for v3Metadata (can be null)
        Returns:
        this builder for use in a chained invocation
      • memory

        public final ImmutableCloudApplication.Builder memory​(int memory)
        Initializes the value for the memory attribute.

        If not set, this attribute will have a default value as returned by the initializer of memory.

        Parameters:
        memory - The value for memory
        Returns:
        this builder for use in a chained invocation
      • diskQuota

        public final ImmutableCloudApplication.Builder diskQuota​(int diskQuota)
        Initializes the value for the diskQuota attribute.

        If not set, this attribute will have a default value as returned by the initializer of diskQuota.

        Parameters:
        diskQuota - The value for diskQuota
        Returns:
        this builder for use in a chained invocation
      • instances

        public final ImmutableCloudApplication.Builder instances​(int instances)
        Initializes the value for the instances attribute.

        If not set, this attribute will have a default value as returned by the initializer of instances.

        Parameters:
        instances - The value for instances
        Returns:
        this builder for use in a chained invocation
      • runningInstances

        public final ImmutableCloudApplication.Builder runningInstances​(int runningInstances)
        Initializes the value for the runningInstances attribute.

        If not set, this attribute will have a default value as returned by the initializer of runningInstances.

        Parameters:
        runningInstances - The value for runningInstances
        Returns:
        this builder for use in a chained invocation
      • staging

        public final ImmutableCloudApplication.Builder staging​(Staging staging)
        Initializes the value for the staging attribute.
        Parameters:
        staging - The value for staging (can be null)
        Returns:
        this builder for use in a chained invocation
      • stagingError

        public final ImmutableCloudApplication.Builder stagingError​(String stagingError)
        Initializes the value for the stagingError attribute.
        Parameters:
        stagingError - The value for stagingError (can be null)
        Returns:
        this builder for use in a chained invocation
      • addUris

        public final ImmutableCloudApplication.Builder addUris​(String... elements)
        Adds elements to uris list.
        Parameters:
        elements - An array of uris elements
        Returns:
        this builder for use in a chained invocation
      • addServices

        public final ImmutableCloudApplication.Builder addServices​(String... elements)
        Adds elements to services list.
        Parameters:
        elements - An array of services elements
        Returns:
        this builder for use in a chained invocation
      • putEnv

        public final ImmutableCloudApplication.Builder putEnv​(String key,
                                                              String value)
        Put one entry to the env map.
        Parameters:
        key - The key in the env map
        value - The associated value in the env map
        Returns:
        this builder for use in a chained invocation
      • env

        public final ImmutableCloudApplication.Builder env​(Map<String,​? extends String> entries)
        Sets or replaces all mappings from the specified map as entries for the env map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the env map
        Returns:
        this builder for use in a chained invocation
      • putAllEnv

        public final ImmutableCloudApplication.Builder putAllEnv​(Map<String,​? extends String> entries)
        Put all mappings from the specified map as entries to env map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the env map
        Returns:
        this builder for use in a chained invocation