public static final class ApplicationManifest.Builder extends Object
ApplicationManifest
.
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.
Modifier and Type | Method and Description |
---|---|
ApplicationManifest.Builder |
addAllDomains(Iterable<String> elements)
Adds elements to
domains list. |
ApplicationManifest.Builder |
addAllHosts(Iterable<String> elements)
Adds elements to
hosts list. |
ApplicationManifest.Builder |
addAllRoutes(Iterable<? extends Route> elements)
Adds elements to
routes list. |
ApplicationManifest.Builder |
addAllServices(Iterable<String> elements)
Adds elements to
services list. |
ApplicationManifest |
build()
Builds a new
ApplicationManifest . |
ApplicationManifest.Builder |
buildpack(String buildpack)
Initializes the value for the
buildpack attribute. |
ApplicationManifest.Builder |
command(String command)
Initializes the value for the
command attribute. |
ApplicationManifest.Builder |
disk(Integer disk)
Initializes the value for the
disk attribute. |
ApplicationManifest.Builder |
docker(Docker docker)
Initializes the value for the
docker attribute. |
ApplicationManifest.Builder |
domain(String... elements)
Adds elements to
domains list. |
ApplicationManifest.Builder |
domain(String element)
Adds one element to
domains list. |
ApplicationManifest.Builder |
domains(Iterable<String> elements)
Sets or replaces all elements for
domains list. |
ApplicationManifest.Builder |
environmentVariable(Map.Entry<String,? extends Object> entry)
Put one entry to the
environmentVariables map. |
ApplicationManifest.Builder |
environmentVariable(String key,
Object value)
Put one entry to the
environmentVariables map. |
ApplicationManifest.Builder |
environmentVariables(Map<String,? extends Object> environmentVariables)
Sets or replaces all mappings from the specified map as entries for the
environmentVariables map. |
ApplicationManifest.Builder |
from(ApplicationManifest instance)
Fill a builder with attribute values from the provided
ApplicationManifest instance. |
ApplicationManifest.Builder |
healthCheckHttpEndpoint(String healthCheckHttpEndpoint)
Initializes the value for the
healthCheckHttpEndpoint attribute. |
ApplicationManifest.Builder |
healthCheckType(ApplicationHealthCheck healthCheckType)
Initializes the value for the
healthCheckType attribute. |
ApplicationManifest.Builder |
host(String... elements)
Adds elements to
hosts list. |
ApplicationManifest.Builder |
host(String element)
Adds one element to
hosts list. |
ApplicationManifest.Builder |
hosts(Iterable<String> elements)
Sets or replaces all elements for
hosts list. |
ApplicationManifest.Builder |
instances(Integer instances)
Initializes the value for the
instances attribute. |
ApplicationManifest.Builder |
memory(Integer memory)
Initializes the value for the
memory attribute. |
ApplicationManifest.Builder |
name(String name)
Initializes the value for the
name attribute. |
ApplicationManifest.Builder |
noHostname(Boolean noHostname)
Initializes the value for the
noHostname attribute. |
ApplicationManifest.Builder |
noRoute(Boolean noRoute)
Initializes the value for the
noRoute attribute. |
ApplicationManifest.Builder |
path(Path path)
Initializes the value for the
path attribute. |
ApplicationManifest.Builder |
putAllEnvironmentVariables(Map<String,? extends Object> environmentVariables)
Put all mappings from the specified map as entries to
environmentVariables map. |
ApplicationManifest.Builder |
randomRoute(Boolean randomRoute)
Initializes the value for the
randomRoute attribute. |
ApplicationManifest.Builder |
route(Route... elements)
Adds elements to
routes list. |
ApplicationManifest.Builder |
route(Route element)
Adds one element to
routes list. |
ApplicationManifest.Builder |
routePath(String routePath)
Initializes the value for the
routePath attribute. |
ApplicationManifest.Builder |
routes(Iterable<? extends Route> elements)
Sets or replaces all elements for
routes list. |
ApplicationManifest.Builder |
service(String... elements)
Adds elements to
services list. |
ApplicationManifest.Builder |
service(String element)
Adds one element to
services list. |
ApplicationManifest.Builder |
services(Iterable<String> elements)
Sets or replaces all elements for
services list. |
ApplicationManifest.Builder |
stack(String stack)
Initializes the value for the
stack attribute. |
ApplicationManifest.Builder |
timeout(Integer timeout)
Initializes the value for the
timeout attribute. |
public final ApplicationManifest.Builder from(ApplicationManifest instance)
ApplicationManifest
instance.
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.instance
- The instance from which to copy valuesthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder buildpack(String buildpack)
buildpack
attribute.buildpack
- The value for buildpack (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder command(String command)
command
attribute.command
- The value for command (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder disk(Integer disk)
disk
attribute.disk
- The value for disk (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder docker(Docker docker)
docker
attribute.docker
- The value for docker (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder domain(String element)
domains
list.element
- A domains elementthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder domain(String... elements)
domains
list.elements
- An array of domains elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder domains(Iterable<String> elements)
domains
list.elements
- An iterable of domains elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder addAllDomains(Iterable<String> elements)
domains
list.elements
- An iterable of domains elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder environmentVariable(String key, Object value)
environmentVariables
map.key
- The key in the environmentVariables mapvalue
- The associated value in the environmentVariables mapthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder environmentVariable(Map.Entry<String,? extends Object> entry)
environmentVariables
map. Nulls are not permittedentry
- The key and value entrythis
builder for use in a chained invocationpublic final ApplicationManifest.Builder environmentVariables(Map<String,? extends Object> environmentVariables)
environmentVariables
map. Nulls are not permitted as keys or values, but parameter itself can be nullenvironmentVariables
- The entries that will be added to the environmentVariables mapthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder putAllEnvironmentVariables(Map<String,? extends Object> environmentVariables)
environmentVariables
map. Nulls are not permittedenvironmentVariables
- The entries that will be added to the environmentVariables mapthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder healthCheckHttpEndpoint(String healthCheckHttpEndpoint)
healthCheckHttpEndpoint
attribute.healthCheckHttpEndpoint
- The value for healthCheckHttpEndpoint (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder healthCheckType(ApplicationHealthCheck healthCheckType)
healthCheckType
attribute.healthCheckType
- The value for healthCheckType (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder host(String element)
hosts
list.element
- A hosts elementthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder host(String... elements)
hosts
list.elements
- An array of hosts elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder hosts(Iterable<String> elements)
hosts
list.elements
- An iterable of hosts elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder addAllHosts(Iterable<String> elements)
hosts
list.elements
- An iterable of hosts elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder instances(Integer instances)
instances
attribute.instances
- The value for instances (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder memory(Integer memory)
memory
attribute.memory
- The value for memory (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder name(String name)
name
attribute.name
- The value for namethis
builder for use in a chained invocationpublic final ApplicationManifest.Builder noHostname(Boolean noHostname)
noHostname
attribute.noHostname
- The value for noHostname (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder noRoute(Boolean noRoute)
noRoute
attribute.noRoute
- The value for noRoute (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder path(Path path)
path
attribute.path
- The value for path (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder randomRoute(Boolean randomRoute)
randomRoute
attribute.randomRoute
- The value for randomRoute (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder routePath(String routePath)
routePath
attribute.routePath
- The value for routePath (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder route(Route element)
routes
list.element
- A routes elementthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder route(Route... elements)
routes
list.elements
- An array of routes elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder routes(Iterable<? extends Route> elements)
routes
list.elements
- An iterable of routes elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder addAllRoutes(Iterable<? extends Route> elements)
routes
list.elements
- An iterable of routes elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder service(String element)
services
list.element
- A services elementthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder service(String... elements)
services
list.elements
- An array of services elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder services(Iterable<String> elements)
services
list.elements
- An iterable of services elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder addAllServices(Iterable<String> elements)
services
list.elements
- An iterable of services elementsthis
builder for use in a chained invocationpublic final ApplicationManifest.Builder stack(String stack)
stack
attribute.stack
- The value for stack (can be null
)this
builder for use in a chained invocationpublic final ApplicationManifest.Builder timeout(Integer timeout)
timeout
attribute.timeout
- The value for timeout (can be null
)this
builder for use in a chained invocationpublic ApplicationManifest build()
ApplicationManifest
.IllegalStateException
- if any required attributes are missingCopyright © 2017 Pivotal Software, Inc.. All rights reserved.