Package org.kiwiproject.consul.option
Class ImmutableEventOptions
java.lang.Object
org.kiwiproject.consul.option.EventOptions
org.kiwiproject.consul.option.ImmutableEventOptions
- All Implemented Interfaces:
ParamAdder
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableEventOptions
extends EventOptions
Immutable implementation of
EventOptions
.
Use the builder to create immutable instances:
ImmutableEventOptions.builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableEventOptions
. -
Field Summary
Fields inherited from class org.kiwiproject.consul.option.EventOptions
BLANK
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableEventOptions
.static ImmutableEventOptions
copyOf
(EventOptions instance) Creates an immutable copy of aEventOptions
value.boolean
This instance is equal to all instances ofImmutableEventOptions
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:toQueryParameters
,toHeaders
,datacenter
,nodeFilter
,serviceFilter
,tagFilter
.com.google.common.collect.ImmutableList<String>
toString()
Prints the immutable valueEventOptions
with attribute values.final ImmutableEventOptions
withDatacenter
(String value) Copy the current immutable object by setting a present value for the optionaldatacenter
attribute.final ImmutableEventOptions
withDatacenter
(Optional<String> optional) Copy the current immutable object by setting an optional value for thedatacenter
attribute.final ImmutableEventOptions
withNodeFilter
(String value) Copy the current immutable object by setting a present value for the optionalnodeFilter
attribute.final ImmutableEventOptions
withNodeFilter
(Optional<String> optional) Copy the current immutable object by setting an optional value for thenodeFilter
attribute.final ImmutableEventOptions
withServiceFilter
(String value) Copy the current immutable object by setting a present value for the optionalserviceFilter
attribute.final ImmutableEventOptions
withServiceFilter
(Optional<String> optional) Copy the current immutable object by setting an optional value for theserviceFilter
attribute.final ImmutableEventOptions
withTagFilter
(String value) Copy the current immutable object by setting a present value for the optionaltagFilter
attribute.final ImmutableEventOptions
withTagFilter
(Optional<String> optional) Copy the current immutable object by setting an optional value for thetagFilter
attribute.final ImmutableEventOptions
withToHeaders
(Map<String, ? extends String> entries) Copy the current immutable object by replacing thetoHeaders
map with the specified map.final ImmutableEventOptions
withToQueryParameters
(Iterable<String> elements) Copy the current immutable object with elements that replace the content oftoQueryParameters
.final ImmutableEventOptions
withToQueryParameters
(String... elements) Copy the current immutable object with elements that replace the content oftoQueryParameters
.Methods inherited from class org.kiwiproject.consul.option.EventOptions
toQuery
-
Method Details
-
toQueryParameters
- Returns:
- The value of the
toQueryParameters
attribute
-
toHeaders
- Returns:
- The value of the
toHeaders
attribute
-
getDatacenter
- Specified by:
getDatacenter
in classEventOptions
- Returns:
- The value of the
datacenter
attribute
-
getNodeFilter
- Specified by:
getNodeFilter
in classEventOptions
- Returns:
- The value of the
nodeFilter
attribute
-
getServiceFilter
- Specified by:
getServiceFilter
in classEventOptions
- Returns:
- The value of the
serviceFilter
attribute
-
getTagFilter
- Specified by:
getTagFilter
in classEventOptions
- Returns:
- The value of the
tagFilter
attribute
-
withToQueryParameters
Copy the current immutable object with elements that replace the content oftoQueryParameters
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withToQueryParameters
Copy the current immutable object with elements that replace the content oftoQueryParameters
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of toQueryParameters elements to set- Returns:
- A modified copy of
this
object
-
withToHeaders
Copy the current immutable object by replacing thetoHeaders
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the toHeaders map- Returns:
- A modified copy of
this
object
-
withDatacenter
Copy the current immutable object by setting a present value for the optionaldatacenter
attribute.- Parameters:
value
- The value for datacenter- Returns:
- A modified copy of
this
object
-
withDatacenter
Copy the current immutable object by setting an optional value for thedatacenter
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for datacenter- Returns:
- A modified copy of
this
object
-
withNodeFilter
Copy the current immutable object by setting a present value for the optionalnodeFilter
attribute.- Parameters:
value
- The value for nodeFilter- Returns:
- A modified copy of
this
object
-
withNodeFilter
Copy the current immutable object by setting an optional value for thenodeFilter
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for nodeFilter- Returns:
- A modified copy of
this
object
-
withServiceFilter
Copy the current immutable object by setting a present value for the optionalserviceFilter
attribute.- Parameters:
value
- The value for serviceFilter- Returns:
- A modified copy of
this
object
-
withServiceFilter
Copy the current immutable object by setting an optional value for theserviceFilter
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for serviceFilter- Returns:
- A modified copy of
this
object
-
withTagFilter
Copy the current immutable object by setting a present value for the optionaltagFilter
attribute.- Parameters:
value
- The value for tagFilter- Returns:
- A modified copy of
this
object
-
withTagFilter
Copy the current immutable object by setting an optional value for thetagFilter
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for tagFilter- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableEventOptions
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:toQueryParameters
,toHeaders
,datacenter
,nodeFilter
,serviceFilter
,tagFilter
. -
toString
Prints the immutable valueEventOptions
with attribute values. -
copyOf
Creates an immutable copy of aEventOptions
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable EventOptions instance
-
builder
Creates a builder forImmutableEventOptions
.ImmutableEventOptions.builder() .addToQueryParameters|addAllToQueryParameters(String) //
toQueryParameters
elements .putToHeaders|putAllToHeaders(String => String) //toHeaders
mappings .datacenter(String) // optionaldatacenter
.nodeFilter(String) // optionalnodeFilter
.serviceFilter(String) // optionalserviceFilter
.tagFilter(String) // optionaltagFilter
.build();- Returns:
- A new ImmutableEventOptions builder
-