Package org.kiwiproject.consul.option
Class ImmutableQueryOptions
java.lang.Object
org.kiwiproject.consul.option.QueryOptions
org.kiwiproject.consul.option.ImmutableQueryOptions
- All Implemented Interfaces:
ParamAdder
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableQueryOptions
extends QueryOptions
Immutable implementation of
QueryOptions.
Use the builder to create immutable instances:
ImmutableQueryOptions.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableQueryOptions. -
Field Summary
Fields inherited from class org.kiwiproject.consul.option.QueryOptions
BLANK -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableQueryOptions.static ImmutableQueryOptionscopyOf(QueryOptions instance) Creates an immutable copy of aQueryOptionsvalue.booleanThis instance is equal to all instances ofImmutableQueryOptionsthat have equal attribute values.getHash()getIndex()getNear()com.google.common.collect.ImmutableList<String>getNote()com.google.common.collect.ImmutableList<String>getTag()getToken()getWait()getWan()inthashCode()Computes a hash code from attributes:toQueryParameters,wait,token,hash,index,near,datacenter,filter,namespace,wan,segment,note,enable,reason,nodeMeta,tag,consistencyMode,isBlocking,hasToken,nodeMetaQuery,tagsQuery.booleanhasToken()booleancom.google.common.collect.ImmutableList<String>toString()Prints the immutable valueQueryOptionswith attribute values.final ImmutableQueryOptionsCopy the current immutable object by setting a value for theconsistencyModeattribute.final ImmutableQueryOptionswithDatacenter(String value) Copy the current immutable object by setting a present value for the optionaldatacenterattribute.final ImmutableQueryOptionswithDatacenter(Optional<String> optional) Copy the current immutable object by setting an optional value for thedatacenterattribute.final ImmutableQueryOptionswithEnable(boolean value) Copy the current immutable object by setting a present value for the optionalenableattribute.final ImmutableQueryOptionswithEnable(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theenableattribute.final ImmutableQueryOptionswithFilter(String value) Copy the current immutable object by setting a present value for the optionalfilterattribute.final ImmutableQueryOptionswithFilter(Optional<String> optional) Copy the current immutable object by setting an optional value for thefilterattribute.final ImmutableQueryOptionsCopy the current immutable object by setting a present value for the optionalhashattribute.final ImmutableQueryOptionsCopy the current immutable object by setting an optional value for thehashattribute.final ImmutableQueryOptionswithIndex(BigInteger value) Copy the current immutable object by setting a present value for the optionalindexattribute.final ImmutableQueryOptionswithIndex(Optional<? extends BigInteger> optional) Copy the current immutable object by setting an optional value for theindexattribute.final ImmutableQueryOptionswithNamespace(String value) Copy the current immutable object by setting a present value for the optionalnamespaceattribute.final ImmutableQueryOptionswithNamespace(Optional<String> optional) Copy the current immutable object by setting an optional value for thenamespaceattribute.final ImmutableQueryOptionsCopy the current immutable object by setting a present value for the optionalnearattribute.final ImmutableQueryOptionsCopy the current immutable object by setting an optional value for thenearattribute.final ImmutableQueryOptionswithNodeMeta(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofnodeMeta.final ImmutableQueryOptionswithNodeMeta(String... elements) Copy the current immutable object with elements that replace the content ofnodeMeta.final ImmutableQueryOptionsCopy the current immutable object by setting a present value for the optionalnoteattribute.final ImmutableQueryOptionsCopy the current immutable object by setting an optional value for thenoteattribute.final ImmutableQueryOptionswithReason(String value) Copy the current immutable object by setting a present value for the optionalreasonattribute.final ImmutableQueryOptionswithReason(Optional<String> optional) Copy the current immutable object by setting an optional value for thereasonattribute.final ImmutableQueryOptionswithSegment(String value) Copy the current immutable object by setting a present value for the optionalsegmentattribute.final ImmutableQueryOptionswithSegment(Optional<String> optional) Copy the current immutable object by setting an optional value for thesegmentattribute.final ImmutableQueryOptionsCopy the current immutable object with elements that replace the content oftag.final ImmutableQueryOptionsCopy the current immutable object with elements that replace the content oftag.final ImmutableQueryOptionsCopy the current immutable object by setting a present value for the optionaltokenattribute.final ImmutableQueryOptionsCopy the current immutable object by setting an optional value for thetokenattribute.final ImmutableQueryOptionswithToQueryParameters(Iterable<String> elements) Copy the current immutable object with elements that replace the content oftoQueryParameters.final ImmutableQueryOptionswithToQueryParameters(String... elements) Copy the current immutable object with elements that replace the content oftoQueryParameters.final ImmutableQueryOptionsCopy the current immutable object by setting a present value for the optionalwaitattribute.final ImmutableQueryOptionsCopy the current immutable object by setting an optional value for thewaitattribute.final ImmutableQueryOptionswithWan(boolean value) Copy the current immutable object by setting a present value for the optionalwanattribute.final ImmutableQueryOptionsCopy the current immutable object by setting an optional value for thewanattribute.Methods inherited from class org.kiwiproject.consul.option.QueryOptions
blockMinutes, blockMinutes, blockSeconds, blockSeconds, toHeaders, toQuery
-
Method Details
-
toQueryParameters
- Returns:
- The value of the
toQueryParametersattribute
-
getWait
- Specified by:
getWaitin classQueryOptions- Returns:
- The value of the
waitattribute
-
getToken
- Specified by:
getTokenin classQueryOptions- Returns:
- The value of the
tokenattribute
-
getHash
- Specified by:
getHashin classQueryOptions- Returns:
- The value of the
hashattribute
-
getIndex
- Specified by:
getIndexin classQueryOptions- Returns:
- The value of the
indexattribute
-
getNear
- Specified by:
getNearin classQueryOptions- Returns:
- The value of the
nearattribute
-
getDatacenter
- Specified by:
getDatacenterin classQueryOptions- Returns:
- The value of the
datacenterattribute
-
getFilter
- Specified by:
getFilterin classQueryOptions- Returns:
- The value of the
filterattribute
-
getNamespace
- Specified by:
getNamespacein classQueryOptions- Returns:
- The value of the
namespaceattribute
-
getWan
- Specified by:
getWanin classQueryOptions- Returns:
- The value of the
wanattribute
-
getSegment
- Specified by:
getSegmentin classQueryOptions- Returns:
- The value of the
segmentattribute
-
getNote
- Specified by:
getNotein classQueryOptions- Returns:
- The value of the
noteattribute
-
getEnable
- Specified by:
getEnablein classQueryOptions- Returns:
- The value of the
enableattribute
-
getReason
- Specified by:
getReasonin classQueryOptions- Returns:
- The value of the
reasonattribute
-
getNodeMeta
- Specified by:
getNodeMetain classQueryOptions- Returns:
- The value of the
nodeMetaattribute
-
getTag
- Specified by:
getTagin classQueryOptions- Returns:
- The value of the
tagattribute
-
getConsistencyMode
- Overrides:
getConsistencyModein classQueryOptions- Returns:
- The value of the
consistencyModeattribute
-
isBlocking
public boolean isBlocking()- Overrides:
isBlockingin classQueryOptions- Returns:
- The computed-at-construction value of the
isBlockingattribute
-
hasToken
public boolean hasToken()- Overrides:
hasTokenin classQueryOptions- Returns:
- The computed-at-construction value of the
hasTokenattribute
-
getNodeMetaQuery
- Overrides:
getNodeMetaQueryin classQueryOptions- Returns:
- The computed-at-construction value of the
nodeMetaQueryattribute
-
getTagsQuery
- Overrides:
getTagsQueryin classQueryOptions- Returns:
- The computed-at-construction value of the
tagsQueryattribute
-
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
-
withWait
Copy the current immutable object by setting a present value for the optionalwaitattribute.- Parameters:
value- The value for wait- Returns:
- A modified copy of
thisobject
-
withWait
Copy the current immutable object by setting an optional value for thewaitattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for wait- Returns:
- A modified copy of
thisobject
-
withToken
Copy the current immutable object by setting a present value for the optionaltokenattribute.- Parameters:
value- The value for token- Returns:
- A modified copy of
thisobject
-
withToken
Copy the current immutable object by setting an optional value for thetokenattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for token- Returns:
- A modified copy of
thisobject
-
withHash
Copy the current immutable object by setting a present value for the optionalhashattribute.- Parameters:
value- The value for hash- Returns:
- A modified copy of
thisobject
-
withHash
Copy the current immutable object by setting an optional value for thehashattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for hash- Returns:
- A modified copy of
thisobject
-
withIndex
Copy the current immutable object by setting a present value for the optionalindexattribute.- Parameters:
value- The value for index- Returns:
- A modified copy of
thisobject
-
withIndex
Copy the current immutable object by setting an optional value for theindexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for index- Returns:
- A modified copy of
thisobject
-
withNear
Copy the current immutable object by setting a present value for the optionalnearattribute.- Parameters:
value- The value for near- Returns:
- A modified copy of
thisobject
-
withNear
Copy the current immutable object by setting an optional value for thenearattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for near- 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
-
withFilter
Copy the current immutable object by setting a present value for the optionalfilterattribute.- Parameters:
value- The value for filter- Returns:
- A modified copy of
thisobject
-
withFilter
Copy the current immutable object by setting an optional value for thefilterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for filter- Returns:
- A modified copy of
thisobject
-
withNamespace
Copy the current immutable object by setting a present value for the optionalnamespaceattribute.- Parameters:
value- The value for namespace- Returns:
- A modified copy of
thisobject
-
withNamespace
Copy the current immutable object by setting an optional value for thenamespaceattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for namespace- Returns:
- A modified copy of
thisobject
-
withWan
Copy the current immutable object by setting a present value for the optionalwanattribute.- Parameters:
value- The value for wan- Returns:
- A modified copy of
thisobject
-
withWan
Copy the current immutable object by setting an optional value for thewanattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for wan- Returns:
- A modified copy of
thisobject
-
withSegment
Copy the current immutable object by setting a present value for the optionalsegmentattribute.- Parameters:
value- The value for segment- Returns:
- A modified copy of
thisobject
-
withSegment
Copy the current immutable object by setting an optional value for thesegmentattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for segment- Returns:
- A modified copy of
thisobject
-
withNote
Copy the current immutable object by setting a present value for the optionalnoteattribute.- Parameters:
value- The value for note- Returns:
- A modified copy of
thisobject
-
withNote
Copy the current immutable object by setting an optional value for thenoteattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for note- Returns:
- A modified copy of
thisobject
-
withEnable
Copy the current immutable object by setting a present value for the optionalenableattribute.- Parameters:
value- The value for enable- Returns:
- A modified copy of
thisobject
-
withEnable
Copy the current immutable object by setting an optional value for theenableattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for enable- Returns:
- A modified copy of
thisobject
-
withReason
Copy the current immutable object by setting a present value for the optionalreasonattribute.- Parameters:
value- The value for reason- Returns:
- A modified copy of
thisobject
-
withReason
Copy the current immutable object by setting an optional value for thereasonattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for reason- Returns:
- A modified copy of
thisobject
-
withNodeMeta
Copy the current immutable object with elements that replace the content ofnodeMeta.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNodeMeta
Copy the current immutable object with elements that replace the content ofnodeMeta. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of nodeMeta elements to set- Returns:
- A modified copy of
thisobject
-
withTag
Copy the current immutable object with elements that replace the content oftag.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTag
Copy the current immutable object with elements that replace the content oftag. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of tag elements to set- Returns:
- A modified copy of
thisobject
-
withConsistencyMode
Copy the current immutable object by setting a value for theconsistencyModeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for consistencyMode- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableQueryOptionsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:toQueryParameters,wait,token,hash,index,near,datacenter,filter,namespace,wan,segment,note,enable,reason,nodeMeta,tag,consistencyMode,isBlocking,hasToken,nodeMetaQuery,tagsQuery. -
toString
Prints the immutable valueQueryOptionswith attribute values. -
copyOf
Creates an immutable copy of aQueryOptionsvalue. 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 QueryOptions instance
-
builder
Creates a builder forImmutableQueryOptions.ImmutableQueryOptions.builder() .addToQueryParameters|addAllToQueryParameters(String) //toQueryParameterselements .wait(String) // optionalwait.token(String) // optionaltoken.hash(String) // optionalhash.index(java.math.BigInteger) // optionalindex.near(String) // optionalnear.datacenter(String) // optionaldatacenter.filter(String) // optionalfilter.namespace(String) // optionalnamespace.wan(Boolean) // optionalwan.segment(String) // optionalsegment.note(String) // optionalnote.enable(Boolean) // optionalenable.reason(String) // optionalreason.addNodeMeta|addAllNodeMeta(String) //nodeMetaelements .addTag|addAllTag(String) //tagelements .consistencyMode(org.kiwiproject.consul.option.ConsistencyMode) // optionalconsistencyMode.build();- Returns:
- A new ImmutableQueryOptions builder
-