Package org.kiwiproject.consul.model.acl
Class ImmutablePolicyLink
java.lang.Object
org.kiwiproject.consul.model.acl.Token.PolicyLink
org.kiwiproject.consul.model.acl.ImmutablePolicyLink
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutablePolicyLink
extends Token.PolicyLink
Immutable implementation of
Token.PolicyLink.
Use the builder to create immutable instances:
ImmutablePolicyLink.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutablePolicyLink. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutablePolicyLink.Builderbuilder()Creates a builder forImmutablePolicyLink.static ImmutablePolicyLinkcopyOf(Token.PolicyLink instance) Creates an immutable copy of aToken.PolicyLinkvalue.booleanThis instance is equal to all instances ofImmutablePolicyLinkthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name.id()name()toString()Prints the immutable valuePolicyLinkwith attribute values.final ImmutablePolicyLinkCopy the current immutable object by setting a present value for the optionalidattribute.final ImmutablePolicyLinkCopy the current immutable object by setting an optional value for theidattribute.final ImmutablePolicyLinkCopy the current immutable object by setting a present value for the optionalnameattribute.final ImmutablePolicyLinkCopy the current immutable object by setting an optional value for thenameattribute.
-
Method Details
-
id
- Specified by:
idin classToken.PolicyLink- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein classToken.PolicyLink- 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 ofImmutablePolicyLinkthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name. -
toString
Prints the immutable valuePolicyLinkwith attribute values. -
copyOf
Creates an immutable copy of aToken.PolicyLinkvalue. 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 PolicyLink instance
-
builder
Creates a builder forImmutablePolicyLink.ImmutablePolicyLink.builder() .id(String) // optionalid.name(String) // optionalname.build();- Returns:
- A new ImmutablePolicyLink builder
-