Package com.orbitz.consul.model.acl
Class ImmutableTokenResponse
- java.lang.Object
-
- com.orbitz.consul.model.acl.BaseTokenResponse
-
- com.orbitz.consul.model.acl.TokenResponse
-
- com.orbitz.consul.model.acl.ImmutableTokenResponse
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTokenResponse extends TokenResponseImmutable implementation ofTokenResponse.Use the builder to create immutable instances:
ImmutableTokenResponse.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTokenResponse.BuilderBuilds instances of typeImmutableTokenResponse.
-
Method Summary
Modifier and Type Method Description java.lang.StringaccessorId()static ImmutableTokenResponse.Builderbuilder()Creates a builder forImmutableTokenResponse.static ImmutableTokenResponsecopyOf(TokenResponse instance)Creates an immutable copy of aTokenResponsevalue.java.math.BigIntegercreateIndex()java.util.DatecreateTime()java.lang.Stringdescription()booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableTokenResponsethat have equal attribute values.java.lang.Stringhash()inthashCode()Computes a hash code from attributes:accessorId,description,policies,createIndex,modifyIndex,local,createTime,hash,secretId.booleanlocal()java.math.BigIntegermodifyIndex()com.google.common.collect.ImmutableList<Token.PolicyLink>policies()java.lang.StringsecretId()java.lang.StringtoString()Prints the immutable valueTokenResponsewith attribute values.ImmutableTokenResponsewithAccessorId(java.lang.String value)Copy the current immutable object by setting a value for theaccessorIdattribute.ImmutableTokenResponsewithCreateIndex(java.math.BigInteger value)Copy the current immutable object by setting a value for thecreateIndexattribute.ImmutableTokenResponsewithCreateTime(java.util.Date value)Copy the current immutable object by setting a value for thecreateTimeattribute.ImmutableTokenResponsewithDescription(java.lang.String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableTokenResponsewithHash(java.lang.String value)Copy the current immutable object by setting a value for thehashattribute.ImmutableTokenResponsewithLocal(boolean value)Copy the current immutable object by setting a value for thelocalattribute.ImmutableTokenResponsewithModifyIndex(java.math.BigInteger value)Copy the current immutable object by setting a value for themodifyIndexattribute.ImmutableTokenResponsewithPolicies(Token.PolicyLink... elements)Copy the current immutable object with elements that replace the content ofpolicies.ImmutableTokenResponsewithPolicies(java.lang.Iterable<? extends Token.PolicyLink> elements)Copy the current immutable object with elements that replace the content ofpolicies.ImmutableTokenResponsewithSecretId(java.lang.String value)Copy the current immutable object by setting a value for thesecretIdattribute.
-
-
-
Method Detail
-
accessorId
public java.lang.String accessorId()
- Specified by:
accessorIdin classBaseTokenResponse- Returns:
- The value of the
accessorIdattribute
-
description
public java.lang.String description()
- Specified by:
descriptionin classBaseTokenResponse- Returns:
- The value of the
descriptionattribute
-
policies
public com.google.common.collect.ImmutableList<Token.PolicyLink> policies()
- Specified by:
policiesin classBaseTokenResponse- Returns:
- The value of the
policiesattribute
-
createIndex
public java.math.BigInteger createIndex()
- Specified by:
createIndexin classBaseTokenResponse- Returns:
- The value of the
createIndexattribute
-
modifyIndex
public java.math.BigInteger 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
public java.util.Date createTime()
- Specified by:
createTimein classBaseTokenResponse- Returns:
- The value of the
createTimeattribute
-
hash
public java.lang.String hash()
- Specified by:
hashin classBaseTokenResponse- Returns:
- The value of the
hashattribute
-
secretId
public java.lang.String secretId()
- Specified by:
secretIdin classTokenResponse- Returns:
- The value of the
secretIdattribute
-
withAccessorId
public final ImmutableTokenResponse withAccessorId(java.lang.String value)
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
public final ImmutableTokenResponse withDescription(java.lang.String value)
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
public final ImmutableTokenResponse withPolicies(Token.PolicyLink... elements)
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
public final ImmutableTokenResponse withPolicies(java.lang.Iterable<? extends Token.PolicyLink> elements)
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
public final ImmutableTokenResponse withCreateIndex(java.math.BigInteger value)
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
public final ImmutableTokenResponse withModifyIndex(java.math.BigInteger value)
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
public final ImmutableTokenResponse withLocal(boolean value)
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
public final ImmutableTokenResponse withCreateTime(java.util.Date value)
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
public final ImmutableTokenResponse withHash(java.lang.String value)
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
public final ImmutableTokenResponse withSecretId(java.lang.String value)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableTokenResponsethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:accessorId,description,policies,createIndex,modifyIndex,local,createTime,hash,secretId.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueTokenResponsewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableTokenResponse copyOf(TokenResponse instance)
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
public static ImmutableTokenResponse.Builder builder()
Creates a builder forImmutableTokenResponse.ImmutableTokenResponse.builder() .accessorId(String) // requiredaccessorId.description(String) // requireddescription.addPolicies|addAllPolicies(com.orbitz.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
-
-