Package org.kiwiproject.consul.option
Class ImmutableTokenQueryOptions
java.lang.Object
org.kiwiproject.consul.option.TokenQueryOptions
org.kiwiproject.consul.option.ImmutableTokenQueryOptions
- All Implemented Interfaces:
ParamAdder
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableTokenQueryOptions
extends TokenQueryOptions
Immutable implementation of
TokenQueryOptions
.
Use the builder to create immutable instances:
ImmutableTokenQueryOptions.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableTokenQueryOptions
. -
Field Summary
Fields inherited from class org.kiwiproject.consul.option.TokenQueryOptions
BLANK
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableTokenQueryOptions
.static ImmutableTokenQueryOptions
copyOf
(TokenQueryOptions instance) Creates an immutable copy of aTokenQueryOptions
value.boolean
This instance is equal to all instances ofImmutableTokenQueryOptions
that have equal attribute values.getRole()
int
hashCode()
Computes a hash code from attributes:toQueryParameters
,toHeaders
,policy
,role
,authMethod
,authMethodNamespace
,namespace
.com.google.common.collect.ImmutableList<String>
toString()
Prints the immutable valueTokenQueryOptions
with attribute values.withAuthMethod
(String value) Copy the current immutable object by setting a present value for the optionalauthMethod
attribute.withAuthMethod
(Optional<String> optional) Copy the current immutable object by setting an optional value for theauthMethod
attribute.withAuthMethodNamespace
(String value) Copy the current immutable object by setting a present value for the optionalauthMethodNamespace
attribute.withAuthMethodNamespace
(Optional<String> optional) Copy the current immutable object by setting an optional value for theauthMethodNamespace
attribute.withNamespace
(String value) Copy the current immutable object by setting a present value for the optionalnamespace
attribute.withNamespace
(Optional<String> optional) Copy the current immutable object by setting an optional value for thenamespace
attribute.withPolicy
(String value) Copy the current immutable object by setting a present value for the optionalpolicy
attribute.withPolicy
(Optional<String> optional) Copy the current immutable object by setting an optional value for thepolicy
attribute.Copy the current immutable object by setting a present value for the optionalrole
attribute.Copy the current immutable object by setting an optional value for therole
attribute.withToHeaders
(Map<String, ? extends String> entries) Copy the current immutable object by replacing thetoHeaders
map with the specified map.withToQueryParameters
(Iterable<String> elements) Copy the current immutable object with elements that replace the content oftoQueryParameters
.withToQueryParameters
(String... elements) Copy the current immutable object with elements that replace the content oftoQueryParameters
.Methods inherited from class org.kiwiproject.consul.option.TokenQueryOptions
toQuery
-
Method Details
-
toQueryParameters
- Returns:
- The value of the
toQueryParameters
attribute
-
toHeaders
- Returns:
- The value of the
toHeaders
attribute
-
getPolicy
- Specified by:
getPolicy
in classTokenQueryOptions
- Returns:
- The value of the
policy
attribute
-
getRole
- Specified by:
getRole
in classTokenQueryOptions
- Returns:
- The value of the
role
attribute
-
getAuthMethod
- Specified by:
getAuthMethod
in classTokenQueryOptions
- Returns:
- The value of the
authMethod
attribute
-
getAuthMethodNamespace
- Specified by:
getAuthMethodNamespace
in classTokenQueryOptions
- Returns:
- The value of the
authMethodNamespace
attribute
-
getNamespace
- Specified by:
getNamespace
in classTokenQueryOptions
- Returns:
- The value of the
namespace
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
-
withPolicy
Copy the current immutable object by setting a present value for the optionalpolicy
attribute.- Parameters:
value
- The value for policy- Returns:
- A modified copy of
this
object
-
withPolicy
Copy the current immutable object by setting an optional value for thepolicy
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for policy- Returns:
- A modified copy of
this
object
-
withRole
Copy the current immutable object by setting a present value for the optionalrole
attribute.- Parameters:
value
- The value for role- Returns:
- A modified copy of
this
object
-
withRole
Copy the current immutable object by setting an optional value for therole
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for role- Returns:
- A modified copy of
this
object
-
withAuthMethod
Copy the current immutable object by setting a present value for the optionalauthMethod
attribute.- Parameters:
value
- The value for authMethod- Returns:
- A modified copy of
this
object
-
withAuthMethod
Copy the current immutable object by setting an optional value for theauthMethod
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for authMethod- Returns:
- A modified copy of
this
object
-
withAuthMethodNamespace
Copy the current immutable object by setting a present value for the optionalauthMethodNamespace
attribute.- Parameters:
value
- The value for authMethodNamespace- Returns:
- A modified copy of
this
object
-
withAuthMethodNamespace
Copy the current immutable object by setting an optional value for theauthMethodNamespace
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for authMethodNamespace- Returns:
- A modified copy of
this
object
-
withNamespace
Copy the current immutable object by setting a present value for the optionalnamespace
attribute.- Parameters:
value
- The value for namespace- Returns:
- A modified copy of
this
object
-
withNamespace
Copy the current immutable object by setting an optional value for thenamespace
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableTokenQueryOptions
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:toQueryParameters
,toHeaders
,policy
,role
,authMethod
,authMethodNamespace
,namespace
. -
toString
Prints the immutable valueTokenQueryOptions
with attribute values. -
copyOf
Creates an immutable copy of aTokenQueryOptions
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 TokenQueryOptions instance
-
builder
Creates a builder forImmutableTokenQueryOptions
.ImmutableTokenQueryOptions.builder() .addToQueryParameters|addAllToQueryParameters(String) //
toQueryParameters
elements .putToHeaders|putAllToHeaders(String => String) //toHeaders
mappings .policy(String) // optionalpolicy
.role(String) // optionalrole
.authMethod(String) // optionalauthMethod
.authMethodNamespace(String) // optionalauthMethodNamespace
.namespace(String) // optionalnamespace
.build();- Returns:
- A new ImmutableTokenQueryOptions builder
-