public static final class InstanceDetail.Builder extends Object
InstanceDetail.
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 |
|---|---|
InstanceDetail |
build()
Builds a new
InstanceDetail. |
InstanceDetail.Builder |
cpu(Double cpu)
Initializes the value for the
cpu attribute. |
InstanceDetail.Builder |
diskQuota(Long diskQuota)
Initializes the value for the
diskQuota attribute. |
InstanceDetail.Builder |
diskUsage(Long diskUsage)
Initializes the value for the
diskUsage attribute. |
InstanceDetail.Builder |
from(InstanceDetail instance)
Fill a builder with attribute values from the provided
InstanceDetail instance. |
InstanceDetail.Builder |
index(String index)
Initializes the value for the
index attribute. |
InstanceDetail.Builder |
memoryQuota(Long memoryQuota)
Initializes the value for the
memoryQuota attribute. |
InstanceDetail.Builder |
memoryUsage(Long memoryUsage)
Initializes the value for the
memoryUsage attribute. |
InstanceDetail.Builder |
since(Date since)
Initializes the value for the
since attribute. |
InstanceDetail.Builder |
state(String state)
Initializes the value for the
state attribute. |
public final InstanceDetail.Builder from(InstanceDetail instance)
InstanceDetail instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final InstanceDetail.Builder cpu(Double cpu)
cpu attribute.cpu - The value for cpu (can be null)this builder for use in a chained invocationpublic final InstanceDetail.Builder diskQuota(Long diskQuota)
diskQuota attribute.diskQuota - The value for diskQuota (can be null)this builder for use in a chained invocationpublic final InstanceDetail.Builder diskUsage(Long diskUsage)
diskUsage attribute.diskUsage - The value for diskUsage (can be null)this builder for use in a chained invocationpublic final InstanceDetail.Builder index(String index)
index attribute.index - The value for indexthis builder for use in a chained invocationpublic final InstanceDetail.Builder memoryQuota(Long memoryQuota)
memoryQuota attribute.memoryQuota - The value for memoryQuota (can be null)this builder for use in a chained invocationpublic final InstanceDetail.Builder memoryUsage(Long memoryUsage)
memoryUsage attribute.memoryUsage - The value for memoryUsage (can be null)this builder for use in a chained invocationpublic final InstanceDetail.Builder since(Date since)
since attribute.since - The value for since (can be null)this builder for use in a chained invocationpublic final InstanceDetail.Builder state(String state)
state attribute.state - The value for state (can be null)this builder for use in a chained invocationpublic InstanceDetail build()
InstanceDetail.IllegalStateException - if any required attributes are missingCopyright © 2017 Pivotal Software, Inc.. All rights reserved.