Class ImmutableTokenListResponse.Builder

java.lang.Object
org.kiwiproject.consul.model.acl.ImmutableTokenListResponse.Builder
Enclosing class:
ImmutableTokenListResponse

public static final class ImmutableTokenListResponse.Builder extends Object
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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder from(BaseTokenResponse instance)
      Fill a builder with attribute values from the provided org.kiwiproject.consul.model.acl.BaseTokenResponse instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder from(TokenListResponse instance)
      Fill a builder with attribute values from the provided org.kiwiproject.consul.model.acl.TokenListResponse instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • accessorId

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder accessorId(String accessorId)
      Initializes the value for the accessorId attribute.
      Parameters:
      accessorId - The value for accessorId
      Returns:
      this builder for use in a chained invocation
    • description

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder description(String description)
      Initializes the value for the description attribute.
      Parameters:
      description - The value for description
      Returns:
      this builder for use in a chained invocation
    • addPolicies

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder addPolicies(Token.PolicyLink element)
      Adds one element to policies list.
      Parameters:
      element - A policies element
      Returns:
      this builder for use in a chained invocation
    • addPolicies

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder addPolicies(Token.PolicyLink... elements)
      Adds elements to policies list.
      Parameters:
      elements - An array of policies elements
      Returns:
      this builder for use in a chained invocation
    • policies

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder policies(Iterable<? extends Token.PolicyLink> elements)
      Sets or replaces all elements for policies list.
      Parameters:
      elements - An iterable of policies elements
      Returns:
      this builder for use in a chained invocation
    • addAllPolicies

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder addAllPolicies(Iterable<? extends Token.PolicyLink> elements)
      Adds elements to policies list.
      Parameters:
      elements - An iterable of policies elements
      Returns:
      this builder for use in a chained invocation
    • createIndex

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder createIndex(BigInteger createIndex)
      Initializes the value for the createIndex attribute.
      Parameters:
      createIndex - The value for createIndex
      Returns:
      this builder for use in a chained invocation
    • modifyIndex

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder modifyIndex(BigInteger modifyIndex)
      Initializes the value for the modifyIndex attribute.
      Parameters:
      modifyIndex - The value for modifyIndex
      Returns:
      this builder for use in a chained invocation
    • local

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder local(boolean local)
      Initializes the value for the local attribute.
      Parameters:
      local - The value for local
      Returns:
      this builder for use in a chained invocation
    • createTime

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder createTime(Date createTime)
      Initializes the value for the createTime attribute.
      Parameters:
      createTime - The value for createTime
      Returns:
      this builder for use in a chained invocation
    • hash

      @CanIgnoreReturnValue public final ImmutableTokenListResponse.Builder hash(String hash)
      Initializes the value for the hash attribute.
      Parameters:
      hash - The value for hash
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of TokenListResponse
      Throws:
      IllegalStateException - if any required attributes are missing