Package org.kiwiproject.consul.model.acl
Class ImmutablePolicyListResponse.Builder
java.lang.Object
org.kiwiproject.consul.model.acl.ImmutablePolicyListResponse.Builder
- Enclosing class:
- ImmutablePolicyListResponse
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 Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newImmutablePolicyListResponse
.createIndex
(BigInteger createIndex) Initializes the value for thecreateIndex
attribute.datacenters
(List<String> datacenters) Initializes the optional valuedatacenters
to datacenters.datacenters
(Optional<? extends List<String>> datacenters) Initializes the optional valuedatacenters
to datacenters.from
(BasePolicyResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.BasePolicyResponse
instance.from
(PolicyListResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.PolicyListResponse
instance.Initializes the value for thehash
attribute.Initializes the value for theid
attribute.modifyIndex
(BigInteger modifyIndex) Initializes the value for themodifyIndex
attribute.Initializes the value for thename
attribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutablePolicyListResponse.Builder from(BasePolicyResponse instance) Fill a builder with attribute values from the providedorg.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 providedorg.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
Initializes the value for theid
attribute.- Parameters:
id
- The value for id- Returns:
this
builder for use in a chained invocation
-
name
Initializes the value for thename
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 valuedatacenters
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 valuedatacenters
to datacenters.- Parameters:
datacenters
- The value for datacenters- Returns:
this
builder for use in a chained invocation
-
hash
Initializes the value for thehash
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 thecreateIndex
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 themodifyIndex
attribute.- Parameters:
modifyIndex
- The value for modifyIndex- Returns:
this
builder for use in a chained invocation
-
build
Builds a newImmutablePolicyListResponse
.- Returns:
- An immutable instance of PolicyListResponse
- Throws:
IllegalStateException
- if any required attributes are missing
-