Class ImmutablePolicyListResponse.Builder

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

@NotThreadSafe public static final class ImmutablePolicyListResponse.Builder extends Object
Builds instances of type ImmutablePolicyListResponse. 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 ImmutablePolicyListResponse.Builder from(BasePolicyResponse instance)
      Fill a builder with attribute values from the provided org.kiwiproject.consul.model.acl.BasePolicyResponse instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

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

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

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

      @CanIgnoreReturnValue public final ImmutablePolicyListResponse.Builder datacenters(List<String> datacenters)
      Initializes the optional value datacenters to datacenters.
      Parameters:
      datacenters - The value for datacenters
      Returns:
      this builder for chained invocation
    • datacenters

      @CanIgnoreReturnValue public final ImmutablePolicyListResponse.Builder datacenters(Optional<? extends List<String>> datacenters)
      Initializes the optional value datacenters to datacenters.
      Parameters:
      datacenters - The value for datacenters
      Returns:
      this builder for use in a chained invocation
    • hash

      @CanIgnoreReturnValue public final ImmutablePolicyListResponse.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
    • createIndex

      @CanIgnoreReturnValue public final ImmutablePolicyListResponse.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 ImmutablePolicyListResponse.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
    • build

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