Package org.kiwiproject.consul.option
Class ImmutableTokenQueryOptions
java.lang.Object
org.kiwiproject.consul.option.TokenQueryOptions
org.kiwiproject.consul.option.ImmutableTokenQueryOptions
- All Implemented Interfaces:
ParamAdder
@Generated("org.immutables.processor.ProxyProcessor")
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 classBuilds 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 ImmutableTokenQueryOptionscopyOf(TokenQueryOptions instance) Creates an immutable copy of aTokenQueryOptionsvalue.booleanThis instance is equal to all instances ofImmutableTokenQueryOptionsthat have equal attribute values.getRole()inthashCode()Computes a hash code from attributes:toQueryParameters,toHeaders,policy,role,authMethod,authMethodNamespace,namespace.com.google.common.collect.ImmutableList<String>toString()Prints the immutable valueTokenQueryOptionswith attribute values.withAuthMethod(String value) Copy the current immutable object by setting a present value for the optionalauthMethodattribute.withAuthMethod(Optional<String> optional) Copy the current immutable object by setting an optional value for theauthMethodattribute.withAuthMethodNamespace(String value) Copy the current immutable object by setting a present value for the optionalauthMethodNamespaceattribute.withAuthMethodNamespace(Optional<String> optional) Copy the current immutable object by setting an optional value for theauthMethodNamespaceattribute.withNamespace(String value) Copy the current immutable object by setting a present value for the optionalnamespaceattribute.withNamespace(Optional<String> optional) Copy the current immutable object by setting an optional value for thenamespaceattribute.withPolicy(String value) Copy the current immutable object by setting a present value for the optionalpolicyattribute.withPolicy(Optional<String> optional) Copy the current immutable object by setting an optional value for thepolicyattribute.Copy the current immutable object by setting a present value for the optionalroleattribute.Copy the current immutable object by setting an optional value for theroleattribute.withToHeaders(Map<String, ? extends String> entries) Copy the current immutable object by replacing thetoHeadersmap 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
toQueryParametersattribute
-
toHeaders
- Returns:
- The value of the
toHeadersattribute
-
getPolicy
- Specified by:
getPolicyin classTokenQueryOptions- Returns:
- The value of the
policyattribute
-
getRole
- Specified by:
getRolein classTokenQueryOptions- Returns:
- The value of the
roleattribute
-
getAuthMethod
- Specified by:
getAuthMethodin classTokenQueryOptions- Returns:
- The value of the
authMethodattribute
-
getAuthMethodNamespace
- Specified by:
getAuthMethodNamespacein classTokenQueryOptions- Returns:
- The value of the
authMethodNamespaceattribute
-
getNamespace
- Specified by:
getNamespacein classTokenQueryOptions- Returns:
- The value of the
namespaceattribute
-
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
-
withPolicy
Copy the current immutable object by setting a present value for the optionalpolicyattribute.- Parameters:
value- The value for policy- Returns:
- A modified copy of
thisobject
-
withPolicy
Copy the current immutable object by setting an optional value for thepolicyattribute. 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
thisobject
-
withRole
Copy the current immutable object by setting a present value for the optionalroleattribute.- Parameters:
value- The value for role- Returns:
- A modified copy of
thisobject
-
withRole
Copy the current immutable object by setting an optional value for theroleattribute. 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
thisobject
-
withAuthMethod
Copy the current immutable object by setting a present value for the optionalauthMethodattribute.- Parameters:
value- The value for authMethod- Returns:
- A modified copy of
thisobject
-
withAuthMethod
Copy the current immutable object by setting an optional value for theauthMethodattribute. 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
thisobject
-
withAuthMethodNamespace
Copy the current immutable object by setting a present value for the optionalauthMethodNamespaceattribute.- Parameters:
value- The value for authMethodNamespace- Returns:
- A modified copy of
thisobject
-
withAuthMethodNamespace
Copy the current immutable object by setting an optional value for theauthMethodNamespaceattribute. 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
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
-
equals
This instance is equal to all instances ofImmutableTokenQueryOptionsthat 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 valueTokenQueryOptionswith attribute values. -
copyOf
Creates an immutable copy of aTokenQueryOptionsvalue. 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) //toQueryParameterselements .putToHeaders|putAllToHeaders(String => String) //toHeadersmappings .policy(String) // optionalpolicy.role(String) // optionalrole.authMethod(String) // optionalauthMethod.authMethodNamespace(String) // optionalauthMethodNamespace.namespace(String) // optionalnamespace.build();- Returns:
- A new ImmutableTokenQueryOptions builder
-