Package org.kiwiproject.consul.model.acl
Class ImmutableAclToken
java.lang.Object
org.kiwiproject.consul.model.acl.AclToken
org.kiwiproject.consul.model.acl.ImmutableAclToken
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableAclToken
extends AclToken
Immutable implementation of
AclToken.
Use the builder to create immutable instances:
ImmutableAclToken.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAclToken.Builderbuilder()Creates a builder forImmutableAclToken.static ImmutableAclTokenCreates an immutable copy of aAclTokenvalue.booleanThis instance is equal to all instances ofImmutableAclTokenthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name,type,rules.id()name()rules()toString()Prints the immutable valueAclTokenwith attribute values.type()final ImmutableAclTokenCopy the current immutable object by setting a present value for the optionalidattribute.final ImmutableAclTokenCopy the current immutable object by setting an optional value for theidattribute.final ImmutableAclTokenCopy the current immutable object by setting a present value for the optionalnameattribute.final ImmutableAclTokenCopy the current immutable object by setting an optional value for thenameattribute.final ImmutableAclTokenCopy the current immutable object by setting a present value for the optionalrulesattribute.final ImmutableAclTokenCopy the current immutable object by setting an optional value for therulesattribute.final ImmutableAclTokenCopy the current immutable object by setting a present value for the optionaltypeattribute.final ImmutableAclTokenCopy the current immutable object by setting an optional value for thetypeattribute.
-
Method Details
-
id
-
name
-
type
-
rules
-
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
-
withType
Copy the current immutable object by setting a present value for the optionaltypeattribute.- Parameters:
value- The value for type- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting an optional value for thetypeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for type- Returns:
- A modified copy of
thisobject
-
withRules
Copy the current immutable object by setting a present value for the optionalrulesattribute.- Parameters:
value- The value for rules- Returns:
- A modified copy of
thisobject
-
withRules
Copy the current immutable object by setting an optional value for therulesattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for rules- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableAclTokenthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,type,rules. -
toString
Prints the immutable valueAclTokenwith attribute values. -
copyOf
Creates an immutable copy of aAclTokenvalue. 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 AclToken instance
-
builder
Creates a builder forImmutableAclToken.ImmutableAclToken.builder() .id(String) // optionalid.name(String) // optionalname.type(String) // optionaltype.rules(String) // optionalrules.build();- Returns:
- A new ImmutableAclToken builder
-