Class ImmutableApplicationToCreateDto.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.dto.ImmutableApplicationToCreateDto.Builder
-
- Enclosing class:
- ImmutableApplicationToCreateDto
public static final class ImmutableApplicationToCreateDto.Builder extends Object
Builds instances of typeImmutableApplicationToCreateDto. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
public final ImmutableApplicationToCreateDto.Builder from(ApplicationToCreateDto instance)
Fill a builder with attribute values from the providedApplicationToCreateDtoinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
public final ImmutableApplicationToCreateDto.Builder name(String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
staging
public final ImmutableApplicationToCreateDto.Builder staging(Staging staging)
Initializes the value for thestagingattribute.- Parameters:
staging- The value for staging (can benull)- Returns:
thisbuilder for use in a chained invocation
-
diskQuotaInMb
public final ImmutableApplicationToCreateDto.Builder diskQuotaInMb(Integer diskQuotaInMb)
Initializes the value for thediskQuotaInMbattribute.- Parameters:
diskQuotaInMb- The value for diskQuotaInMb (can benull)- Returns:
thisbuilder for use in a chained invocation
-
memoryInMb
public final ImmutableApplicationToCreateDto.Builder memoryInMb(Integer memoryInMb)
Initializes the value for thememoryInMbattribute.- Parameters:
memoryInMb- The value for memoryInMb (can benull)- Returns:
thisbuilder for use in a chained invocation
-
metadata
public final ImmutableApplicationToCreateDto.Builder metadata(org.cloudfoundry.client.v3.Metadata metadata)
Initializes the value for themetadataattribute.- Parameters:
metadata- The value for metadata (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addRoute
public final ImmutableApplicationToCreateDto.Builder addRoute(CloudRoute element)
Adds one element toroutesset.- Parameters:
element- A routes element- Returns:
thisbuilder for use in a chained invocation
-
addRoutes
public final ImmutableApplicationToCreateDto.Builder addRoutes(CloudRoute... elements)
Adds elements toroutesset.- Parameters:
elements- An array of routes elements- Returns:
thisbuilder for use in a chained invocation
-
routes
public final ImmutableApplicationToCreateDto.Builder routes(Iterable<? extends CloudRoute> elements)
Sets or replaces all elements forroutesset.- Parameters:
elements- An iterable of routes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRoutes
public final ImmutableApplicationToCreateDto.Builder addAllRoutes(Iterable<? extends CloudRoute> elements)
Adds elements toroutesset.- Parameters:
elements- An iterable of routes elements- Returns:
thisbuilder for use in a chained invocation
-
putEnv
public final ImmutableApplicationToCreateDto.Builder putEnv(String key, String value)
Put one entry to theenvmap.- Parameters:
key- The key in the env mapvalue- The associated value in the env map- Returns:
thisbuilder for use in a chained invocation
-
putEnv
public final ImmutableApplicationToCreateDto.Builder putEnv(Map.Entry<String,? extends String> entry)
Put one entry to theenvmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
env
public final ImmutableApplicationToCreateDto.Builder env(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for theenvmap. Nulls are not permitted as keys or values, but parameter itself can be null- Parameters:
entries- The entries that will be added to the env map- Returns:
thisbuilder for use in a chained invocation
-
putAllEnv
public final ImmutableApplicationToCreateDto.Builder putAllEnv(Map<String,? extends String> entries)
Put all mappings from the specified map as entries toenvmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the env map- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableApplicationToCreateDto build()
Builds a newImmutableApplicationToCreateDto.- Returns:
- An immutable instance of ApplicationToCreateDto
- Throws:
IllegalStateException- if any required attributes are missing
-
-