Package org.kiwiproject.consul.option
Class ImmutableEventOptions
java.lang.Object
org.kiwiproject.consul.option.EventOptions
org.kiwiproject.consul.option.ImmutableEventOptions
- All Implemented Interfaces:
ParamAdder
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableEventOptions
extends EventOptions
Immutable implementation of
EventOptions.
Use the builder to create immutable instances:
ImmutableEventOptions.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds 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 ImmutableEventOptionscopyOf(EventOptions instance) Creates an immutable copy of aEventOptionsvalue.booleanThis instance is equal to all instances ofImmutableEventOptionsthat have equal attribute values.inthashCode()Computes a hash code from attributes:toQueryParameters,toHeaders,datacenter,nodeFilter,serviceFilter,tagFilter.com.google.common.collect.ImmutableList<String>toString()Prints the immutable valueEventOptionswith attribute values.final ImmutableEventOptionswithDatacenter(String value) Copy the current immutable object by setting a present value for the optionaldatacenterattribute.final ImmutableEventOptionswithDatacenter(Optional<String> optional) Copy the current immutable object by setting an optional value for thedatacenterattribute.final ImmutableEventOptionswithNodeFilter(String value) Copy the current immutable object by setting a present value for the optionalnodeFilterattribute.final ImmutableEventOptionswithNodeFilter(Optional<String> optional) Copy the current immutable object by setting an optional value for thenodeFilterattribute.final ImmutableEventOptionswithServiceFilter(String value) Copy the current immutable object by setting a present value for the optionalserviceFilterattribute.final ImmutableEventOptionswithServiceFilter(Optional<String> optional) Copy the current immutable object by setting an optional value for theserviceFilterattribute.final ImmutableEventOptionswithTagFilter(String value) Copy the current immutable object by setting a present value for the optionaltagFilterattribute.final ImmutableEventOptionswithTagFilter(Optional<String> optional) Copy the current immutable object by setting an optional value for thetagFilterattribute.final ImmutableEventOptionswithToHeaders(Map<String, ? extends String> entries) Copy the current immutable object by replacing thetoHeadersmap with the specified map.final ImmutableEventOptionswithToQueryParameters(Iterable<String> elements) Copy the current immutable object with elements that replace the content oftoQueryParameters.final ImmutableEventOptionswithToQueryParameters(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
toQueryParametersattribute
-
toHeaders
- Returns:
- The value of the
toHeadersattribute
-
getDatacenter
- Specified by:
getDatacenterin classEventOptions- Returns:
- The value of the
datacenterattribute
-
getNodeFilter
- Specified by:
getNodeFilterin classEventOptions- Returns:
- The value of the
nodeFilterattribute
-
getServiceFilter
- Specified by:
getServiceFilterin classEventOptions- Returns:
- The value of the
serviceFilterattribute
-
getTagFilter
- Specified by:
getTagFilterin classEventOptions- Returns:
- The value of the
tagFilterattribute
-
withToQueryParameters
Copy the current immutable object with elements that replace the content oftoQueryParameters.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisobject
-
withToHeaders
Copy the current immutable object by replacing thetoHeadersmap 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
thisobject
-
withDatacenter
Copy the current immutable object by setting a present value for the optionaldatacenterattribute.- Parameters:
value- The value for datacenter- Returns:
- A modified copy of
thisobject
-
withDatacenter
Copy the current immutable object by setting an optional value for thedatacenterattribute. 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
thisobject
-
withNodeFilter
Copy the current immutable object by setting a present value for the optionalnodeFilterattribute.- Parameters:
value- The value for nodeFilter- Returns:
- A modified copy of
thisobject
-
withNodeFilter
Copy the current immutable object by setting an optional value for thenodeFilterattribute. 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
thisobject
-
withServiceFilter
Copy the current immutable object by setting a present value for the optionalserviceFilterattribute.- Parameters:
value- The value for serviceFilter- Returns:
- A modified copy of
thisobject
-
withServiceFilter
Copy the current immutable object by setting an optional value for theserviceFilterattribute. 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
thisobject
-
withTagFilter
Copy the current immutable object by setting a present value for the optionaltagFilterattribute.- Parameters:
value- The value for tagFilter- Returns:
- A modified copy of
thisobject
-
withTagFilter
Copy the current immutable object by setting an optional value for thetagFilterattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableEventOptionsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:toQueryParameters,toHeaders,datacenter,nodeFilter,serviceFilter,tagFilter. -
toString
Prints the immutable valueEventOptionswith attribute values. -
copyOf
Creates an immutable copy of aEventOptionsvalue. 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) //toQueryParameterselements .putToHeaders|putAllToHeaders(String => String) //toHeadersmappings .datacenter(String) // optionaldatacenter.nodeFilter(String) // optionalnodeFilter.serviceFilter(String) // optionalserviceFilter.tagFilter(String) // optionaltagFilter.build();- Returns:
- A new ImmutableEventOptions builder
-