Package org.kiwiproject.consul.model.acl
Class ImmutableTokenResponse
java.lang.Object
org.kiwiproject.consul.model.acl.BaseTokenResponse
org.kiwiproject.consul.model.acl.TokenResponse
org.kiwiproject.consul.model.acl.ImmutableTokenResponse
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTokenResponse
extends TokenResponse
Immutable implementation of
TokenResponse.
Use the builder to create immutable instances:
ImmutableTokenResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTokenResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTokenResponse.static ImmutableTokenResponsecopyOf(TokenResponse instance) Creates an immutable copy of aTokenResponsevalue.booleanThis instance is equal to all instances ofImmutableTokenResponsethat have equal attribute values.hash()inthashCode()Computes a hash code from attributes:accessorId,description,policies,createIndex,modifyIndex,local,createTime,hash,secretId.booleanlocal()com.google.common.collect.ImmutableList<Token.PolicyLink>policies()secretId()toString()Prints the immutable valueTokenResponsewith attribute values.final ImmutableTokenResponsewithAccessorId(String value) Copy the current immutable object by setting a value for theaccessorIdattribute.final ImmutableTokenResponsewithCreateIndex(BigInteger value) Copy the current immutable object by setting a value for thecreateIndexattribute.final ImmutableTokenResponsewithCreateTime(Date value) Copy the current immutable object by setting a value for thecreateTimeattribute.final ImmutableTokenResponsewithDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.final ImmutableTokenResponseCopy the current immutable object by setting a value for thehashattribute.final ImmutableTokenResponsewithLocal(boolean value) Copy the current immutable object by setting a value for thelocalattribute.final ImmutableTokenResponsewithModifyIndex(BigInteger value) Copy the current immutable object by setting a value for themodifyIndexattribute.final ImmutableTokenResponsewithPolicies(Iterable<? extends Token.PolicyLink> elements) Copy the current immutable object with elements that replace the content ofpolicies.final ImmutableTokenResponsewithPolicies(Token.PolicyLink... elements) Copy the current immutable object with elements that replace the content ofpolicies.final ImmutableTokenResponsewithSecretId(String value) Copy the current immutable object by setting a value for thesecretIdattribute.
-
Method Details
-
accessorId
- Specified by:
accessorIdin classBaseTokenResponse- Returns:
- The value of the
accessorIdattribute
-
description
- Specified by:
descriptionin classBaseTokenResponse- Returns:
- The value of the
descriptionattribute
-
policies
- Specified by:
policiesin classBaseTokenResponse- Returns:
- The value of the
policiesattribute
-
createIndex
- Specified by:
createIndexin classBaseTokenResponse- Returns:
- The value of the
createIndexattribute
-
modifyIndex
- Specified by:
modifyIndexin classBaseTokenResponse- Returns:
- The value of the
modifyIndexattribute
-
local
public boolean local()- Specified by:
localin classBaseTokenResponse- Returns:
- The value of the
localattribute
-
createTime
- Specified by:
createTimein classBaseTokenResponse- Returns:
- The value of the
createTimeattribute
-
hash
- Specified by:
hashin classBaseTokenResponse- Returns:
- The value of the
hashattribute
-
secretId
- Specified by:
secretIdin classTokenResponse- Returns:
- The value of the
secretIdattribute
-
withAccessorId
Copy the current immutable object by setting a value for theaccessorIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for accessorId- Returns:
- A modified copy of the
thisobject
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
withPolicies
Copy the current immutable object with elements that replace the content ofpolicies.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPolicies
Copy the current immutable object with elements that replace the content ofpolicies. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of policies elements to set- Returns:
- A modified copy of
thisobject
-
withCreateIndex
Copy the current immutable object by setting a value for thecreateIndexattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createIndex- Returns:
- A modified copy of the
thisobject
-
withModifyIndex
Copy the current immutable object by setting a value for themodifyIndexattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modifyIndex- Returns:
- A modified copy of the
thisobject
-
withLocal
Copy the current immutable object by setting a value for thelocalattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for local- Returns:
- A modified copy of the
thisobject
-
withCreateTime
Copy the current immutable object by setting a value for thecreateTimeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createTime- Returns:
- A modified copy of the
thisobject
-
withHash
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
withSecretId
Copy the current immutable object by setting a value for thesecretIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for secretId- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableTokenResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:accessorId,description,policies,createIndex,modifyIndex,local,createTime,hash,secretId. -
toString
Prints the immutable valueTokenResponsewith attribute values. -
copyOf
Creates an immutable copy of aTokenResponsevalue. 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 TokenResponse instance
-
builder
Creates a builder forImmutableTokenResponse.ImmutableTokenResponse.builder() .accessorId(String) // requiredaccessorId.description(String) // requireddescription.addPolicies|addAllPolicies(org.kiwiproject.consul.model.acl.Token.PolicyLink) //policieselements .createIndex(java.math.BigInteger) // requiredcreateIndex.modifyIndex(java.math.BigInteger) // requiredmodifyIndex.local(boolean) // requiredlocal.createTime(Date) // requiredcreateTime.hash(String) // requiredhash.secretId(String) // requiredsecretId.build();- Returns:
- A new ImmutableTokenResponse builder
-