@NotThreadSafe public static final class ImmutableCatalogService.Builder extends Object
ImmutableCatalogService.
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.
@CanIgnoreReturnValue public final ImmutableCatalogService.Builder from(CatalogService instance)
CatalogService 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 ImmutableCatalogService.Builder node(String node)
node attribute.node - The value for nodethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder address(String address)
address attribute.address - The value for addressthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder datacenter(String datacenter)
datacenter to datacenter.datacenter - The value for datacenterthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder datacenter(Optional<String> datacenter)
datacenter to datacenter.datacenter - The value for datacenterthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceName(String serviceName)
serviceName attribute.serviceName - The value for serviceNamethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceId(String serviceId)
serviceId attribute.serviceId - The value for serviceIdthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceAddress(String serviceAddress)
serviceAddress attribute.serviceAddress - The value for serviceAddressthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceEnableTagOverride(boolean serviceEnableTagOverride)
serviceEnableTagOverride to serviceEnableTagOverride.serviceEnableTagOverride - The value for serviceEnableTagOverridethis builder for chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceEnableTagOverride(Optional<Boolean> serviceEnableTagOverride)
serviceEnableTagOverride to serviceEnableTagOverride.serviceEnableTagOverride - The value for serviceEnableTagOverridethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder servicePort(int servicePort)
servicePort attribute.servicePort - The value for servicePortthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder addServiceTags(String element)
serviceTags list.element - A serviceTags elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder addServiceTags(String... elements)
serviceTags list.elements - An array of serviceTags elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceTags(Iterable<String> elements)
serviceTags list.elements - An iterable of serviceTags elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder addAllServiceTags(Iterable<String> elements)
serviceTags list.elements - An iterable of serviceTags elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceMeta(Map<String,String> serviceMeta)
serviceMeta to serviceMeta.serviceMeta - The value for serviceMetathis builder for chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceMeta(Optional<? extends Map<String,String>> serviceMeta)
serviceMeta to serviceMeta.serviceMeta - The value for serviceMetathis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceWeights(ServiceWeights serviceWeights)
serviceWeights to serviceWeights.serviceWeights - The value for serviceWeightsthis builder for chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder serviceWeights(Optional<? extends ServiceWeights> serviceWeights)
serviceWeights to serviceWeights.serviceWeights - The value for serviceWeightsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder nodeMeta(Map<String,String> nodeMeta)
nodeMeta to nodeMeta.nodeMeta - The value for nodeMetathis builder for chained invocation@CanIgnoreReturnValue public final ImmutableCatalogService.Builder nodeMeta(Optional<? extends Map<String,String>> nodeMeta)
nodeMeta to nodeMeta.nodeMeta - The value for nodeMetathis builder for use in a chained invocationpublic ImmutableCatalogService build()
ImmutableCatalogService.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.