Package org.kiwiproject.consul.model.acl
Class ImmutableRoleServiceIdentity
java.lang.Object
org.kiwiproject.consul.model.acl.Role.RoleServiceIdentity
org.kiwiproject.consul.model.acl.ImmutableRoleServiceIdentity
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableRoleServiceIdentity
extends Role.RoleServiceIdentity
Immutable implementation of
Role.RoleServiceIdentity.
Use the builder to create immutable instances:
ImmutableRoleServiceIdentity.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRoleServiceIdentity. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRoleServiceIdentity.static ImmutableRoleServiceIdentitycopyOf(Role.RoleServiceIdentity instance) Creates an immutable copy of aRole.RoleServiceIdentityvalue.com.google.common.collect.ImmutableList<String>booleanThis instance is equal to all instances ofImmutableRoleServiceIdentitythat have equal attribute values.inthashCode()Computes a hash code from attributes:name,datacenters.name()toString()Prints the immutable valueRoleServiceIdentitywith attribute values.withDatacenters(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofdatacenters.withDatacenters(String... elements) Copy the current immutable object with elements that replace the content ofdatacenters.Copy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
name
- Specified by:
namein classRole.RoleServiceIdentity- Returns:
- The value of the
nameattribute
-
datacenters
- Specified by:
datacentersin classRole.RoleServiceIdentity- Returns:
- The value of the
datacentersattribute
-
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
-
withDatacenters
Copy the current immutable object with elements that replace the content ofdatacenters.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDatacenters
Copy the current immutable object with elements that replace the content ofdatacenters. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of datacenters elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableRoleServiceIdentitythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,datacenters. -
toString
Prints the immutable valueRoleServiceIdentitywith attribute values. -
copyOf
Creates an immutable copy of aRole.RoleServiceIdentityvalue. 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 RoleServiceIdentity instance
-
builder
Creates a builder forImmutableRoleServiceIdentity.ImmutableRoleServiceIdentity.builder() .name(String) // requiredname.addDatacenters|addAllDatacenters(String) //datacenterselements .build();- Returns:
- A new ImmutableRoleServiceIdentity builder
-