@NotThreadSafe public static final class ImmutableDsAlert.Builder extends Object
ImmutableDsAlert.
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 |
|---|---|
ImmutableDsAlert.Builder |
addAllRegions(Iterable<String> elements)
Adds elements to
regions list. |
ImmutableDsAlert.Builder |
addRegions(String... elements)
Adds elements to
regions list. |
ImmutableDsAlert.Builder |
addRegions(String element)
Adds one element to
regions list. |
ImmutableDsAlert |
build()
Builds a new
ImmutableDsAlert. |
ImmutableDsAlert.Builder |
description(String description)
Initializes the value for the
description attribute. |
ImmutableDsAlert.Builder |
expires(long expires)
Initializes the value for the
expires attribute. |
ImmutableDsAlert.Builder |
from(DsAlert instance)
Fill a builder with attribute values from the provided
DsAlert instance. |
ImmutableDsAlert.Builder |
regions(Iterable<String> elements)
Sets or replaces all elements for
regions list. |
ImmutableDsAlert.Builder |
severity(DsAlertSeverity severity)
Initializes the value for the
severity attribute. |
ImmutableDsAlert.Builder |
time(long time)
Initializes the value for the
time attribute. |
ImmutableDsAlert.Builder |
title(String title)
Initializes the value for the
title attribute. |
ImmutableDsAlert.Builder |
uri(String uri)
Initializes the value for the
uri attribute. |
public final ImmutableDsAlert.Builder from(DsAlert instance)
DsAlert 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 ImmutableDsAlert.Builder description(String description)
description attribute.description - The value for descriptionthis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder expires(long expires)
expires attribute.expires - The value for expiresthis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder addRegions(String element)
regions list.element - A regions elementthis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder addRegions(String... elements)
regions list.elements - An array of regions elementsthis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder regions(Iterable<String> elements)
regions list.elements - An iterable of regions elementsthis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder addAllRegions(Iterable<String> elements)
regions list.elements - An iterable of regions elementsthis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder severity(DsAlertSeverity severity)
severity attribute.severity - The value for severitythis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder time(long time)
time attribute.time - The value for timethis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder title(String title)
title attribute.title - The value for titlethis builder for use in a chained invocationpublic final ImmutableDsAlert.Builder uri(String uri)
uri attribute.uri - The value for urithis builder for use in a chained invocationpublic ImmutableDsAlert build()
ImmutableDsAlert.IllegalStateException - if any required attributes are missingCopyright © 2016–2020. All rights reserved.