Package org.kiwiproject.consul.model.acl
Class ImmutableRoleNodeIdentity
java.lang.Object
org.kiwiproject.consul.model.acl.Role.RoleNodeIdentity
org.kiwiproject.consul.model.acl.ImmutableRoleNodeIdentity
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableRoleNodeIdentity
extends Role.RoleNodeIdentity
Immutable implementation of
Role.RoleNodeIdentity.
Use the builder to create immutable instances:
ImmutableRoleNodeIdentity.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRoleNodeIdentity. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRoleNodeIdentity.static ImmutableRoleNodeIdentitycopyOf(Role.RoleNodeIdentity instance) Creates an immutable copy of aRole.RoleNodeIdentityvalue.booleanThis instance is equal to all instances ofImmutableRoleNodeIdentitythat have equal attribute values.inthashCode()Computes a hash code from attributes:name,datacenter.name()toString()Prints the immutable valueRoleNodeIdentitywith attribute values.withDatacenter(String value) Copy the current immutable object by setting a value for thedatacenterattribute.Copy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
name
- Specified by:
namein classRole.RoleNodeIdentity- Returns:
- The value of the
nameattribute
-
datacenter
- Specified by:
datacenterin classRole.RoleNodeIdentity- Returns:
- The value of the
datacenterattribute
-
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
-
withDatacenter
Copy the current immutable object by setting a value for thedatacenterattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for datacenter- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableRoleNodeIdentitythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,datacenter. -
toString
Prints the immutable valueRoleNodeIdentitywith attribute values. -
copyOf
Creates an immutable copy of aRole.RoleNodeIdentityvalue. 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 RoleNodeIdentity instance
-
builder
Creates a builder forImmutableRoleNodeIdentity.ImmutableRoleNodeIdentity.builder() .name(String) // requiredname.datacenter(String) // requireddatacenter.build();- Returns:
- A new ImmutableRoleNodeIdentity builder
-