@NotThreadSafe public static final class ImmutableFullService.Builder extends Object
ImmutableFullService.
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 |
|---|---|
ImmutableFullService.Builder |
addAllTags(Iterable<String> elements)
Adds elements to
tags list. |
ImmutableFullService.Builder |
address(String address)
Initializes the value for the
address attribute. |
ImmutableFullService.Builder |
addTags(String... elements)
Adds elements to
tags list. |
ImmutableFullService.Builder |
addTags(String element)
Adds one element to
tags list. |
ImmutableFullService |
build()
Builds a new
ImmutableFullService. |
ImmutableFullService.Builder |
contentHash(String contentHash)
Initializes the value for the
contentHash attribute. |
ImmutableFullService.Builder |
enableTagOverride(boolean enableTagOverride)
Initializes the optional value
enableTagOverride to enableTagOverride. |
ImmutableFullService.Builder |
enableTagOverride(Optional<Boolean> enableTagOverride)
Initializes the optional value
enableTagOverride to enableTagOverride. |
ImmutableFullService.Builder |
from(FullService instance)
Fill a builder with attribute values from the provided
FullService instance. |
ImmutableFullService.Builder |
id(String id)
Initializes the value for the
id attribute. |
ImmutableFullService.Builder |
kind(Optional<String> kind)
Initializes the optional value
kind to kind. |
ImmutableFullService.Builder |
kind(String kind)
Initializes the optional value
kind to kind. |
ImmutableFullService.Builder |
meta(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for the
meta map. |
ImmutableFullService.Builder |
port(int port)
Initializes the value for the
port attribute. |
ImmutableFullService.Builder |
proxy(Optional<? extends ServiceProxy> proxy)
Initializes the optional value
proxy to proxy. |
ImmutableFullService.Builder |
proxy(ServiceProxy proxy)
Initializes the optional value
proxy to proxy. |
ImmutableFullService.Builder |
putAllMeta(Map<String,? extends String> entries)
Put all mappings from the specified map as entries to
meta map. |
ImmutableFullService.Builder |
putMeta(Map.Entry<String,? extends String> entry)
Put one entry to the
meta map. |
ImmutableFullService.Builder |
putMeta(String key,
String value)
Put one entry to the
meta map. |
ImmutableFullService.Builder |
service(String service)
Initializes the value for the
service attribute. |
ImmutableFullService.Builder |
tags(Iterable<String> elements)
Sets or replaces all elements for
tags list. |
ImmutableFullService.Builder |
weights(Optional<? extends ServiceWeights> weights)
Initializes the optional value
weights to weights. |
ImmutableFullService.Builder |
weights(ServiceWeights weights)
Initializes the optional value
weights to weights. |
@CanIgnoreReturnValue public final ImmutableFullService.Builder from(FullService instance)
FullService 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 invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder kind(String kind)
kind to kind.kind - The value for kindthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder kind(Optional<String> kind)
kind to kind.kind - The value for kindthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder id(String id)
id attribute.id - The value for idthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder service(String service)
service attribute.service - The value for servicethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder addTags(String element)
tags list.element - A tags elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder addTags(String... elements)
tags list.elements - An array of tags elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder tags(Iterable<String> elements)
tags list.elements - An iterable of tags elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder addAllTags(Iterable<String> elements)
tags list.elements - An iterable of tags elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder putMeta(String key, String value)
meta map.key - The key in the meta mapvalue - The associated value in the meta mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder putMeta(Map.Entry<String,? extends String> entry)
meta map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder meta(Map<String,? extends String> entries)
meta map. Nulls are not permittedentries - The entries that will be added to the meta mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder putAllMeta(Map<String,? extends String> entries)
meta map. Nulls are not permittedentries - The entries that will be added to the meta mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder port(int port)
port attribute.port - The value for portthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder address(String address)
address attribute.address - The value for addressthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder weights(ServiceWeights weights)
weights to weights.weights - The value for weightsthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder weights(Optional<? extends ServiceWeights> weights)
weights to weights.weights - The value for weightsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder enableTagOverride(boolean enableTagOverride)
enableTagOverride to enableTagOverride.enableTagOverride - The value for enableTagOverridethis builder for chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder enableTagOverride(Optional<Boolean> enableTagOverride)
enableTagOverride to enableTagOverride.enableTagOverride - The value for enableTagOverridethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder contentHash(String contentHash)
contentHash attribute.contentHash - The value for contentHashthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder proxy(ServiceProxy proxy)
proxy to proxy.proxy - The value for proxythis builder for chained invocation@CanIgnoreReturnValue public final ImmutableFullService.Builder proxy(Optional<? extends ServiceProxy> proxy)
proxy to proxy.proxy - The value for proxythis builder for use in a chained invocationpublic ImmutableFullService build()
ImmutableFullService.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.