Package org.kiwiproject.consul.model.acl
Class ImmutableRoleListResponse
java.lang.Object
org.kiwiproject.consul.model.acl.BaseRoleResponse
org.kiwiproject.consul.model.acl.RoleListResponse
org.kiwiproject.consul.model.acl.ImmutableRoleListResponse
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableRoleListResponse
extends RoleListResponse
Immutable implementation of
RoleListResponse.
Use the builder to create immutable instances:
ImmutableRoleListResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRoleListResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRoleListResponse.static ImmutableRoleListResponsecopyOf(RoleListResponse instance) Creates an immutable copy of aRoleListResponsevalue.booleanThis instance is equal to all instances ofImmutableRoleListResponsethat have equal attribute values.hash()inthashCode()Computes a hash code from attributes:id,name,description,policies,serviceIdentities,nodeIdentities,createIndex,modifyIndex,hash.id()name()com.google.common.collect.ImmutableList<Role.RoleNodeIdentity>com.google.common.collect.ImmutableList<Role.RolePolicyLink>policies()com.google.common.collect.ImmutableList<Role.RoleServiceIdentity>toString()Prints the immutable valueRoleListResponsewith attribute values.withCreateIndex(BigInteger value) Copy the current immutable object by setting a value for thecreateIndexattribute.withDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.Copy the current immutable object by setting a value for thehashattribute.Copy the current immutable object by setting a value for theidattribute.withModifyIndex(BigInteger value) Copy the current immutable object by setting a value for themodifyIndexattribute.Copy the current immutable object by setting a value for thenameattribute.withNodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements) Copy the current immutable object with elements that replace the content ofnodeIdentities.withNodeIdentities(Role.RoleNodeIdentity... elements) Copy the current immutable object with elements that replace the content ofnodeIdentities.withPolicies(Iterable<? extends Role.RolePolicyLink> elements) Copy the current immutable object with elements that replace the content ofpolicies.withPolicies(Role.RolePolicyLink... elements) Copy the current immutable object with elements that replace the content ofpolicies.withServiceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements) Copy the current immutable object with elements that replace the content ofserviceIdentities.withServiceIdentities(Role.RoleServiceIdentity... elements) Copy the current immutable object with elements that replace the content ofserviceIdentities.
-
Method Details
-
id
- Specified by:
idin classBaseRoleResponse- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein classBaseRoleResponse- Returns:
- The value of the
nameattribute
-
description
- Specified by:
descriptionin classBaseRoleResponse- Returns:
- The value of the
descriptionattribute
-
policies
- Specified by:
policiesin classBaseRoleResponse- Returns:
- The value of the
policiesattribute
-
serviceIdentities
- Specified by:
serviceIdentitiesin classBaseRoleResponse- Returns:
- The value of the
serviceIdentitiesattribute
-
nodeIdentities
- Specified by:
nodeIdentitiesin classBaseRoleResponse- Returns:
- The value of the
nodeIdentitiesattribute
-
createIndex
- Specified by:
createIndexin classBaseRoleResponse- Returns:
- The value of the
createIndexattribute
-
modifyIndex
- Specified by:
modifyIndexin classBaseRoleResponse- Returns:
- The value of the
modifyIndexattribute
-
hash
- Specified by:
hashin classBaseRoleResponse- Returns:
- The value of the
hashattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
withPolicies
Copy the current immutable object with elements that replace the content ofpolicies.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPolicies
public final ImmutableRoleListResponse withPolicies(Iterable<? extends Role.RolePolicyLink> elements) Copy the current immutable object with elements that replace the content ofpolicies. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of policies elements to set- Returns:
- A modified copy of
thisobject
-
withServiceIdentities
Copy the current immutable object with elements that replace the content ofserviceIdentities.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withServiceIdentities
public final ImmutableRoleListResponse withServiceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements) Copy the current immutable object with elements that replace the content ofserviceIdentities. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of serviceIdentities elements to set- Returns:
- A modified copy of
thisobject
-
withNodeIdentities
Copy the current immutable object with elements that replace the content ofnodeIdentities.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNodeIdentities
public final ImmutableRoleListResponse withNodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements) Copy the current immutable object with elements that replace the content ofnodeIdentities. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of nodeIdentities elements to set- Returns:
- A modified copy of
thisobject
-
withCreateIndex
Copy the current immutable object by setting a value for thecreateIndexattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createIndex- Returns:
- A modified copy of the
thisobject
-
withModifyIndex
Copy the current immutable object by setting a value for themodifyIndexattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modifyIndex- Returns:
- A modified copy of the
thisobject
-
withHash
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableRoleListResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,description,policies,serviceIdentities,nodeIdentities,createIndex,modifyIndex,hash. -
toString
Prints the immutable valueRoleListResponsewith attribute values. -
copyOf
Creates an immutable copy of aRoleListResponsevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable RoleListResponse instance
-
builder
Creates a builder forImmutableRoleListResponse.ImmutableRoleListResponse.builder() .id(String) // requiredid.name(String) // requiredname.description(String) // requireddescription.addPolicies|addAllPolicies(org.kiwiproject.consul.model.acl.Role.RolePolicyLink) //policieselements .addServiceIdentities|addAllServiceIdentities(org.kiwiproject.consul.model.acl.Role.RoleServiceIdentity) //serviceIdentitieselements .addNodeIdentities|addAllNodeIdentities(org.kiwiproject.consul.model.acl.Role.RoleNodeIdentity) //nodeIdentitieselements .createIndex(java.math.BigInteger) // requiredcreateIndex.modifyIndex(java.math.BigInteger) // requiredmodifyIndex.hash(String) // requiredhash.build();- Returns:
- A new ImmutableRoleListResponse builder
-