Package com.orbitz.consul.model.acl
Class ImmutableTokenListResponse.Builder
- java.lang.Object
-
- com.orbitz.consul.model.acl.ImmutableTokenListResponse.Builder
-
- Enclosing class:
- ImmutableTokenListResponse
@NotThreadSafe public static final class ImmutableTokenListResponse.Builder extends java.lang.ObjectBuilds instances of typeImmutableTokenListResponse. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
Modifier and Type Method Description ImmutableTokenListResponse.BuilderaccessorId(java.lang.String accessorId)Initializes the value for theaccessorIdattribute.ImmutableTokenListResponse.BuilderaddAllPolicies(java.lang.Iterable<? extends Token.PolicyLink> elements)Adds elements topolicieslist.ImmutableTokenListResponse.BuilderaddPolicies(Token.PolicyLink element)Adds one element topolicieslist.ImmutableTokenListResponse.BuilderaddPolicies(Token.PolicyLink... elements)Adds elements topolicieslist.ImmutableTokenListResponsebuild()Builds a newImmutableTokenListResponse.ImmutableTokenListResponse.BuildercreateIndex(java.math.BigInteger createIndex)Initializes the value for thecreateIndexattribute.ImmutableTokenListResponse.BuildercreateTime(java.util.Date createTime)Initializes the value for thecreateTimeattribute.ImmutableTokenListResponse.Builderdescription(java.lang.String description)Initializes the value for thedescriptionattribute.ImmutableTokenListResponse.Builderfrom(BaseTokenResponse instance)Fill a builder with attribute values from the providedcom.orbitz.consul.model.acl.BaseTokenResponseinstance.ImmutableTokenListResponse.Builderfrom(TokenListResponse instance)Fill a builder with attribute values from the providedcom.orbitz.consul.model.acl.TokenListResponseinstance.ImmutableTokenListResponse.Builderhash(java.lang.String hash)Initializes the value for thehashattribute.ImmutableTokenListResponse.Builderlocal(boolean local)Initializes the value for thelocalattribute.ImmutableTokenListResponse.BuildermodifyIndex(java.math.BigInteger modifyIndex)Initializes the value for themodifyIndexattribute.ImmutableTokenListResponse.Builderpolicies(java.lang.Iterable<? extends Token.PolicyLink> elements)Sets or replaces all elements forpolicieslist.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder from(BaseTokenResponse instance)
Fill a builder with attribute values from the providedcom.orbitz.consul.model.acl.BaseTokenResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder from(TokenListResponse instance)
Fill a builder with attribute values from the providedcom.orbitz.consul.model.acl.TokenListResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
accessorId
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder accessorId(java.lang.String accessorId)
Initializes the value for theaccessorIdattribute.- Parameters:
accessorId- The value for accessorId- Returns:
thisbuilder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder description(java.lang.String description)
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
addPolicies
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder addPolicies(Token.PolicyLink element)
Adds one element topolicieslist.- Parameters:
element- A policies element- Returns:
thisbuilder for use in a chained invocation
-
addPolicies
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder addPolicies(Token.PolicyLink... elements)
Adds elements topolicieslist.- Parameters:
elements- An array of policies elements- Returns:
thisbuilder for use in a chained invocation
-
policies
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder policies(java.lang.Iterable<? extends Token.PolicyLink> elements)
Sets or replaces all elements forpolicieslist.- Parameters:
elements- An iterable of policies elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPolicies
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder addAllPolicies(java.lang.Iterable<? extends Token.PolicyLink> elements)
Adds elements topolicieslist.- Parameters:
elements- An iterable of policies elements- Returns:
thisbuilder for use in a chained invocation
-
createIndex
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder createIndex(java.math.BigInteger createIndex)
Initializes the value for thecreateIndexattribute.- Parameters:
createIndex- The value for createIndex- Returns:
thisbuilder for use in a chained invocation
-
modifyIndex
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder modifyIndex(java.math.BigInteger modifyIndex)
Initializes the value for themodifyIndexattribute.- Parameters:
modifyIndex- The value for modifyIndex- Returns:
thisbuilder for use in a chained invocation
-
local
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder local(boolean local)
Initializes the value for thelocalattribute.- Parameters:
local- The value for local- Returns:
thisbuilder for use in a chained invocation
-
createTime
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder createTime(java.util.Date createTime)
Initializes the value for thecreateTimeattribute.- Parameters:
createTime- The value for createTime- Returns:
thisbuilder for use in a chained invocation
-
hash
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder hash(java.lang.String hash)
Initializes the value for thehashattribute.- Parameters:
hash- The value for hash- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTokenListResponse build()
Builds a newImmutableTokenListResponse.- Returns:
- An immutable instance of TokenListResponse
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-