Package org.kiwiproject.consul.model.acl
Class ImmutableRoleResponse
java.lang.Object
org.kiwiproject.consul.model.acl.BaseRoleResponse
org.kiwiproject.consul.model.acl.RoleResponse
org.kiwiproject.consul.model.acl.ImmutableRoleResponse
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableRoleResponse
extends RoleResponse
Immutable implementation of
RoleResponse.
Use the builder to create immutable instances:
ImmutableRoleResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRoleResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRoleResponse.static ImmutableRoleResponsecopyOf(RoleResponse instance) Creates an immutable copy of aRoleResponsevalue.booleanThis instance is equal to all instances ofImmutableRoleResponsethat 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 valueRoleResponsewith attribute values.final ImmutableRoleResponsewithCreateIndex(BigInteger value) Copy the current immutable object by setting a value for thecreateIndexattribute.final ImmutableRoleResponsewithDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.final ImmutableRoleResponseCopy the current immutable object by setting a value for thehashattribute.final ImmutableRoleResponseCopy the current immutable object by setting a value for theidattribute.final ImmutableRoleResponsewithModifyIndex(BigInteger value) Copy the current immutable object by setting a value for themodifyIndexattribute.final ImmutableRoleResponseCopy the current immutable object by setting a value for thenameattribute.final ImmutableRoleResponsewithNodeIdentities(Iterable<? extends Role.RoleNodeIdentity> elements) Copy the current immutable object with elements that replace the content ofnodeIdentities.final ImmutableRoleResponsewithNodeIdentities(Role.RoleNodeIdentity... elements) Copy the current immutable object with elements that replace the content ofnodeIdentities.final ImmutableRoleResponsewithPolicies(Iterable<? extends Role.RolePolicyLink> elements) Copy the current immutable object with elements that replace the content ofpolicies.final ImmutableRoleResponsewithPolicies(Role.RolePolicyLink... elements) Copy the current immutable object with elements that replace the content ofpolicies.final ImmutableRoleResponsewithServiceIdentities(Iterable<? extends Role.RoleServiceIdentity> elements) Copy the current immutable object with elements that replace the content ofserviceIdentities.final ImmutableRoleResponsewithServiceIdentities(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
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 ImmutableRoleResponse 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 ImmutableRoleResponse 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 ofImmutableRoleResponsethat 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 valueRoleResponsewith attribute values. -
copyOf
Creates an immutable copy of aRoleResponsevalue. 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 RoleResponse instance
-
builder
Creates a builder forImmutableRoleResponse.ImmutableRoleResponse.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 ImmutableRoleResponse builder
-