Package org.kiwiproject.consul.model.acl
Class ImmutableTokenListResponse
java.lang.Object
org.kiwiproject.consul.model.acl.BaseTokenResponse
org.kiwiproject.consul.model.acl.TokenListResponse
org.kiwiproject.consul.model.acl.ImmutableTokenListResponse
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTokenListResponse
extends TokenListResponse
Immutable implementation of
TokenListResponse.
Use the builder to create immutable instances:
ImmutableTokenListResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTokenListResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTokenListResponse.static ImmutableTokenListResponsecopyOf(TokenListResponse instance) Creates an immutable copy of aTokenListResponsevalue.booleanThis instance is equal to all instances ofImmutableTokenListResponsethat have equal attribute values.hash()inthashCode()Computes a hash code from attributes:accessorId,description,policies,createIndex,modifyIndex,local,createTime,hash.booleanlocal()com.google.common.collect.ImmutableList<Token.PolicyLink>policies()toString()Prints the immutable valueTokenListResponsewith attribute values.withAccessorId(String value) Copy the current immutable object by setting a value for theaccessorIdattribute.withCreateIndex(BigInteger value) Copy the current immutable object by setting a value for thecreateIndexattribute.withCreateTime(Date value) Copy the current immutable object by setting a value for thecreateTimeattribute.withDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.Copy the current immutable object by setting a value for thehashattribute.withLocal(boolean value) Copy the current immutable object by setting a value for thelocalattribute.withModifyIndex(BigInteger value) Copy the current immutable object by setting a value for themodifyIndexattribute.withPolicies(Iterable<? extends Token.PolicyLink> elements) Copy the current immutable object with elements that replace the content ofpolicies.withPolicies(Token.PolicyLink... elements) Copy the current immutable object with elements that replace the content ofpolicies.
-
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
-
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
-
equals
This instance is equal to all instances ofImmutableTokenListResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:accessorId,description,policies,createIndex,modifyIndex,local,createTime,hash. -
toString
Prints the immutable valueTokenListResponsewith attribute values. -
copyOf
Creates an immutable copy of aTokenListResponsevalue. 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 TokenListResponse instance
-
builder
Creates a builder forImmutableTokenListResponse.ImmutableTokenListResponse.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.build();- Returns:
- A new ImmutableTokenListResponse builder
-