Package org.kiwiproject.consul.model.acl
Class ImmutableRoleLink
java.lang.Object
org.kiwiproject.consul.model.acl.Token.RoleLink
org.kiwiproject.consul.model.acl.ImmutableRoleLink
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableRoleLink
extends Token.RoleLink
Immutable implementation of
Token.RoleLink.
Use the builder to create immutable instances:
ImmutableRoleLink.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableRoleLink.Builderbuilder()Creates a builder forImmutableRoleLink.static ImmutableRoleLinkcopyOf(Token.RoleLink instance) Creates an immutable copy of aToken.RoleLinkvalue.booleanThis instance is equal to all instances ofImmutableRoleLinkthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name.id()name()toString()Prints the immutable valueRoleLinkwith attribute values.final ImmutableRoleLinkCopy the current immutable object by setting a present value for the optionalidattribute.final ImmutableRoleLinkCopy the current immutable object by setting an optional value for theidattribute.final ImmutableRoleLinkCopy the current immutable object by setting a present value for the optionalnameattribute.final ImmutableRoleLinkCopy the current immutable object by setting an optional value for thenameattribute.
-
Method Details
-
id
- Specified by:
idin classToken.RoleLink- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein classToken.RoleLink- Returns:
- The value of the
nameattribute
-
withId
Copy the current immutable object by setting a present value for the optionalidattribute.- Parameters:
value- The value for id- Returns:
- A modified copy of
thisobject
-
withId
Copy the current immutable object by setting an optional value for theidattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for id- Returns:
- A modified copy of
thisobject
-
withName
Copy the current immutable object by setting a present value for the optionalnameattribute.- Parameters:
value- The value for name- Returns:
- A modified copy of
thisobject
-
withName
Copy the current immutable object by setting an optional value for thenameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for name- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableRoleLinkthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name. -
toString
Prints the immutable valueRoleLinkwith attribute values. -
copyOf
Creates an immutable copy of aToken.RoleLinkvalue. 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 RoleLink instance
-
builder
Creates a builder forImmutableRoleLink.ImmutableRoleLink.builder() .id(String) // optionalid.name(String) // optionalname.build();- Returns:
- A new ImmutableRoleLink builder
-