@NotThreadSafe public static final class ImmutableHealthCheck.Builder extends Object
ImmutableHealthCheck.
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 |
|---|---|
ImmutableHealthCheck.Builder |
addAllServiceTags(Iterable<String> elements)
Adds elements to
serviceTags list. |
ImmutableHealthCheck.Builder |
addServiceTags(String... elements)
Adds elements to
serviceTags list. |
ImmutableHealthCheck.Builder |
addServiceTags(String element)
Adds one element to
serviceTags list. |
ImmutableHealthCheck |
build()
Builds a new
ImmutableHealthCheck. |
ImmutableHealthCheck.Builder |
checkId(String checkId)
Initializes the value for the
checkId attribute. |
ImmutableHealthCheck.Builder |
from(HealthCheck instance)
Fill a builder with attribute values from the provided
HealthCheck instance. |
ImmutableHealthCheck.Builder |
name(String name)
Initializes the value for the
name attribute. |
ImmutableHealthCheck.Builder |
node(String node)
Initializes the value for the
node attribute. |
ImmutableHealthCheck.Builder |
notes(Optional<String> notes)
Initializes the optional value
notes to notes. |
ImmutableHealthCheck.Builder |
notes(String notes)
Initializes the optional value
notes to notes. |
ImmutableHealthCheck.Builder |
output(Optional<String> output)
Initializes the optional value
output to output. |
ImmutableHealthCheck.Builder |
output(String output)
Initializes the optional value
output to output. |
ImmutableHealthCheck.Builder |
serviceId(Optional<String> serviceId)
Initializes the optional value
serviceId to serviceId. |
ImmutableHealthCheck.Builder |
serviceId(String serviceId)
Initializes the optional value
serviceId to serviceId. |
ImmutableHealthCheck.Builder |
serviceName(Optional<String> serviceName)
Initializes the optional value
serviceName to serviceName. |
ImmutableHealthCheck.Builder |
serviceName(String serviceName)
Initializes the optional value
serviceName to serviceName. |
ImmutableHealthCheck.Builder |
serviceTags(Iterable<String> elements)
Sets or replaces all elements for
serviceTags list. |
ImmutableHealthCheck.Builder |
status(String status)
Initializes the value for the
status attribute. |
public final ImmutableHealthCheck.Builder from(HealthCheck instance)
HealthCheck 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 ImmutableHealthCheck.Builder node(String node)
node attribute.node - The value for nodethis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder checkId(String checkId)
checkId attribute.checkId - The value for checkIdthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder name(String name)
name attribute.name - The value for namethis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder status(String status)
status attribute.status - The value for statusthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder notes(String notes)
notes to notes.notes - The value for notesthis builder for chained invocationpublic final ImmutableHealthCheck.Builder notes(Optional<String> notes)
notes to notes.notes - The value for notesthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder output(String output)
output to output.output - The value for outputthis builder for chained invocationpublic final ImmutableHealthCheck.Builder output(Optional<String> output)
output to output.output - The value for outputthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder serviceId(String serviceId)
serviceId to serviceId.serviceId - The value for serviceIdthis builder for chained invocationpublic final ImmutableHealthCheck.Builder serviceId(Optional<String> serviceId)
serviceId to serviceId.serviceId - The value for serviceIdthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder serviceName(String serviceName)
serviceName to serviceName.serviceName - The value for serviceNamethis builder for chained invocationpublic final ImmutableHealthCheck.Builder serviceName(Optional<String> serviceName)
serviceName to serviceName.serviceName - The value for serviceNamethis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder addServiceTags(String element)
serviceTags list.element - A serviceTags elementthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder addServiceTags(String... elements)
serviceTags list.elements - An array of serviceTags elementsthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder serviceTags(Iterable<String> elements)
serviceTags list.elements - An iterable of serviceTags elementsthis builder for use in a chained invocationpublic final ImmutableHealthCheck.Builder addAllServiceTags(Iterable<String> elements)
serviceTags list.elements - An iterable of serviceTags elementsthis builder for use in a chained invocationpublic ImmutableHealthCheck build()
ImmutableHealthCheck.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.