Package org.kiwiproject.consul.option
Class ImmutableDeleteOptions.Builder
java.lang.Object
org.kiwiproject.consul.option.ImmutableDeleteOptions.Builder
- Enclosing class:
- ImmutableDeleteOptions
Builds instances of type
ImmutableDeleteOptions
.
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.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllToQueryParameters
(Iterable<String> elements) Adds elements totoQueryParameters
list.addToQueryParameters
(String element) Adds one element totoQueryParameters
list.addToQueryParameters
(String... elements) Adds elements totoQueryParameters
list.build()
Builds a newImmutableDeleteOptions
.cas
(long cas) Initializes the optional valuecas
to cas.Initializes the optional valuecas
to cas.datacenter
(String datacenter) Initializes the optional valuedatacenter
to datacenter.datacenter
(Optional<String> datacenter) Initializes the optional valuedatacenter
to datacenter.from
(DeleteOptions instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.option.DeleteOptions
instance.from
(ParamAdder instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.option.ParamAdder
instance.putAllToHeaders
(Map<String, ? extends String> entries) Put all mappings from the specified map as entries totoHeaders
map.putToHeaders
(String key, String value) Put one entry to thetoHeaders
map.putToHeaders
(Map.Entry<String, ? extends String> entry) Put one entry to thetoHeaders
map.recurse
(boolean recurse) Initializes the optional valuerecurse
to recurse.Initializes the optional valuerecurse
to recurse.Sets or replaces all mappings from the specified map as entries for thetoHeaders
map.toQueryParameters
(Iterable<String> elements) Sets or replaces all elements fortoQueryParameters
list.
-
Method Details
-
from
Fill a builder with attribute values from the providedorg.kiwiproject.consul.option.ParamAdder
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedorg.kiwiproject.consul.option.DeleteOptions
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addToQueryParameters
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder addToQueryParameters(String element) Adds one element totoQueryParameters
list.- Parameters:
element
- A toQueryParameters element- Returns:
this
builder for use in a chained invocation
-
addToQueryParameters
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder addToQueryParameters(String... elements) Adds elements totoQueryParameters
list.- Parameters:
elements
- An array of toQueryParameters elements- Returns:
this
builder for use in a chained invocation
-
toQueryParameters
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder toQueryParameters(Iterable<String> elements) Sets or replaces all elements fortoQueryParameters
list.- Parameters:
elements
- An iterable of toQueryParameters elements- Returns:
this
builder for use in a chained invocation
-
addAllToQueryParameters
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder addAllToQueryParameters(Iterable<String> elements) Adds elements totoQueryParameters
list.- Parameters:
elements
- An iterable of toQueryParameters elements- Returns:
this
builder for use in a chained invocation
-
putToHeaders
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder putToHeaders(String key, String value) Put one entry to thetoHeaders
map.- Parameters:
key
- The key in the toHeaders mapvalue
- The associated value in the toHeaders map- Returns:
this
builder for use in a chained invocation
-
putToHeaders
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder putToHeaders(Map.Entry<String, ? extends String> entry) Put one entry to thetoHeaders
map. Nulls are not permitted- Parameters:
entry
- The key and value entry- Returns:
this
builder for use in a chained invocation
-
toHeaders
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder toHeaders(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thetoHeaders
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the toHeaders map- Returns:
this
builder for use in a chained invocation
-
putAllToHeaders
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder putAllToHeaders(Map<String, ? extends String> entries) Put all mappings from the specified map as entries totoHeaders
map. Nulls are not permitted- Parameters:
entries
- The entries that will be added to the toHeaders map- Returns:
this
builder for use in a chained invocation
-
cas
Initializes the optional valuecas
to cas.- Parameters:
cas
- The value for cas- Returns:
this
builder for chained invocation
-
cas
Initializes the optional valuecas
to cas.- Parameters:
cas
- The value for cas- Returns:
this
builder for use in a chained invocation
-
recurse
Initializes the optional valuerecurse
to recurse.- Parameters:
recurse
- The value for recurse- Returns:
this
builder for chained invocation
-
recurse
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder recurse(Optional<Boolean> recurse) Initializes the optional valuerecurse
to recurse.- Parameters:
recurse
- The value for recurse- Returns:
this
builder for use in a chained invocation
-
datacenter
Initializes the optional valuedatacenter
to datacenter.- Parameters:
datacenter
- The value for datacenter- Returns:
this
builder for chained invocation
-
datacenter
@CanIgnoreReturnValue public final ImmutableDeleteOptions.Builder datacenter(Optional<String> datacenter) Initializes the optional valuedatacenter
to datacenter.- Parameters:
datacenter
- The value for datacenter- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutableDeleteOptions
.- Returns:
- An immutable instance of DeleteOptions
- Throws:
IllegalStateException
- if any required attributes are missing
-