Package org.kiwiproject.consul.model.acl
Class ImmutableRoleListResponse.Builder
java.lang.Object
org.kiwiproject.consul.model.acl.ImmutableRoleListResponse.Builder
- Enclosing class:
- ImmutableRoleListResponse
Builds instances of type
ImmutableRoleListResponse.
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 TypeMethodDescriptionaddAllNodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements) Adds elements tonodeIdentitieslist.addAllPolicies(Iterable<? extends Role.RolePolicyLink> elements) Adds elements topolicieslist.addAllServiceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements) Adds elements toserviceIdentitieslist.addNodeIdentities(Role.RoleNodeIdentity element) Adds one element tonodeIdentitieslist.addNodeIdentities(Role.RoleNodeIdentity... elements) Adds elements tonodeIdentitieslist.addPolicies(Role.RolePolicyLink element) Adds one element topolicieslist.addPolicies(Role.RolePolicyLink... elements) Adds elements topolicieslist.Adds one element toserviceIdentitieslist.addServiceIdentities(Role.RoleServiceIdentity... elements) Adds elements toserviceIdentitieslist.build()Builds a newImmutableRoleListResponse.createIndex(BigInteger createIndex) Initializes the value for thecreateIndexattribute.description(String description) Initializes the value for thedescriptionattribute.from(BaseRoleResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.BaseRoleResponseinstance.from(RoleListResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.RoleListResponseinstance.Initializes the value for thehashattribute.Initializes the value for theidattribute.modifyIndex(BigInteger modifyIndex) Initializes the value for themodifyIndexattribute.Initializes the value for thenameattribute.nodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements) Sets or replaces all elements fornodeIdentitieslist.policies(Iterable<? extends Role.RolePolicyLink> elements) Sets or replaces all elements forpolicieslist.serviceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements) Sets or replaces all elements forserviceIdentitieslist.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder from(BaseRoleResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.BaseRoleResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder from(RoleListResponse instance) Fill a builder with attribute values from the providedorg.kiwiproject.consul.model.acl.RoleListResponseinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableRoleListResponse.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 ImmutableRoleListResponse.Builder addPolicies(Role.RolePolicyLink element) Adds one element topolicieslist.- Parameters:
element- A policies element- Returns:
thisbuilder for use in a chained invocation
-
addPolicies
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder addPolicies(Role.RolePolicyLink... elements) Adds elements topolicieslist.- Parameters:
elements- An array of policies elements- Returns:
thisbuilder for use in a chained invocation
-
policies
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder policies(Iterable<? extends Role.RolePolicyLink> 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 ImmutableRoleListResponse.Builder addAllPolicies(Iterable<? extends Role.RolePolicyLink> elements) Adds elements topolicieslist.- Parameters:
elements- An iterable of policies elements- Returns:
thisbuilder for use in a chained invocation
-
addServiceIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder addServiceIdentities(Role.RoleServiceIdentity element) Adds one element toserviceIdentitieslist.- Parameters:
element- A serviceIdentities element- Returns:
thisbuilder for use in a chained invocation
-
addServiceIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder addServiceIdentities(Role.RoleServiceIdentity... elements) Adds elements toserviceIdentitieslist.- Parameters:
elements- An array of serviceIdentities elements- Returns:
thisbuilder for use in a chained invocation
-
serviceIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder serviceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements) Sets or replaces all elements forserviceIdentitieslist.- Parameters:
elements- An iterable of serviceIdentities elements- Returns:
thisbuilder for use in a chained invocation
-
addAllServiceIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder addAllServiceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements) Adds elements toserviceIdentitieslist.- Parameters:
elements- An iterable of serviceIdentities elements- Returns:
thisbuilder for use in a chained invocation
-
addNodeIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder addNodeIdentities(Role.RoleNodeIdentity element) Adds one element tonodeIdentitieslist.- Parameters:
element- A nodeIdentities element- Returns:
thisbuilder for use in a chained invocation
-
addNodeIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder addNodeIdentities(Role.RoleNodeIdentity... elements) Adds elements tonodeIdentitieslist.- Parameters:
elements- An array of nodeIdentities elements- Returns:
thisbuilder for use in a chained invocation
-
nodeIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder nodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements) Sets or replaces all elements fornodeIdentitieslist.- Parameters:
elements- An iterable of nodeIdentities elements- Returns:
thisbuilder for use in a chained invocation
-
addAllNodeIdentities
@CanIgnoreReturnValue public final ImmutableRoleListResponse.Builder addAllNodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements) Adds elements tonodeIdentitieslist.- Parameters:
elements- An iterable of nodeIdentities elements- Returns:
thisbuilder for use in a chained invocation
-
createIndex
@CanIgnoreReturnValue public final ImmutableRoleListResponse.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 ImmutableRoleListResponse.Builder modifyIndex(BigInteger modifyIndex) Initializes the value for themodifyIndexattribute.- Parameters:
modifyIndex- The value for modifyIndex- 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 newImmutableRoleListResponse.- Returns:
- An immutable instance of RoleListResponse
- Throws:
IllegalStateException- if any required attributes are missing
-