Package org.kiwiproject.consul.model.acl
Class ImmutableTokenListResponse.Builder
java.lang.Object
org.kiwiproject.consul.model.acl.ImmutableTokenListResponse.Builder
- Enclosing class:
- ImmutableTokenListResponse
Builds instances of type
ImmutableTokenListResponse.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is 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 TypeMethodDescriptionaccessorId(String accessorId) Initializes the value for theaccessorIdattribute.addAllPolicies(Iterable<? extends Token.PolicyLink> elements) Adds elements topolicieslist.addPolicies(Token.PolicyLink element) Adds one element topolicieslist.addPolicies(Token.PolicyLink... elements) Adds elements topolicieslist.build()Builds a newImmutableTokenListResponse.createIndex(BigInteger createIndex) Initializes the value for thecreateIndexattribute.createTime(Date createTime) Initializes the value for thecreateTimeattribute.description(String description) Initializes the value for thedescriptionattribute.from(BaseTokenResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.BaseTokenResponseinstance.from(TokenListResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.TokenListResponseinstance.Initializes the value for thehashattribute.local(boolean local) Initializes the value for thelocalattribute.modifyIndex(BigInteger modifyIndex) Initializes the value for themodifyIndexattribute.policies(Iterable<? extends Token.PolicyLink> elements) Sets or replaces all elements forpolicieslist.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder from(BaseTokenResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.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 providedorg.kiwiproject.consul.model.acl.TokenListResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
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(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(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(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(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(BigInteger modifyIndex) Initializes the value for themodifyIndexattribute.- Parameters:
modifyIndex- The value for modifyIndex- Returns:
thisbuilder for use in a chained invocation
-
local
Initializes the value for thelocalattribute.- Parameters:
local- The value for local- Returns:
thisbuilder for use in a chained invocation
-
createTime
Initializes the value for thecreateTimeattribute.- Parameters:
createTime- The value for createTime- Returns:
thisbuilder for use in a chained invocation
-
hash
Initializes the value for thehashattribute.- Parameters:
hash- The value for hash- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableTokenListResponse.- Returns:
- An immutable instance of TokenListResponse
- Throws:
IllegalStateException- if any required attributes are missing
-