Package org.kiwiproject.consul.model.acl
Class ImmutablePolicyListResponse
java.lang.Object
org.kiwiproject.consul.model.acl.BasePolicyResponse
org.kiwiproject.consul.model.acl.PolicyListResponse
org.kiwiproject.consul.model.acl.ImmutablePolicyListResponse
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutablePolicyListResponse
extends PolicyListResponse
Immutable implementation of
PolicyListResponse.
Use the builder to create immutable instances:
ImmutablePolicyListResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutablePolicyListResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutablePolicyListResponse.static ImmutablePolicyListResponsecopyOf(PolicyListResponse instance) Creates an immutable copy of aPolicyListResponsevalue.booleanThis instance is equal to all instances ofImmutablePolicyListResponsethat have equal attribute values.hash()inthashCode()Computes a hash code from attributes:id,name,datacenters,hash,createIndex,modifyIndex.id()name()toString()Prints the immutable valuePolicyListResponsewith attribute values.withCreateIndex(BigInteger value) Copy the current immutable object by setting a value for thecreateIndexattribute.withDatacenters(List<String> value) Copy the current immutable object by setting a present value for the optionaldatacentersattribute.withDatacenters(Optional<? extends List<String>> optional) Copy the current immutable object by setting an optional value for thedatacentersattribute.Copy the current immutable object by setting a value for thehashattribute.Copy the current immutable object by setting a value for theidattribute.withModifyIndex(BigInteger value) Copy the current immutable object by setting a value for themodifyIndexattribute.Copy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
id
- Specified by:
idin classBasePolicyResponse- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein classBasePolicyResponse- Returns:
- The value of the
nameattribute
-
datacenters
- Specified by:
datacentersin classBasePolicyResponse- Returns:
- The value of the
datacentersattribute
-
hash
- Specified by:
hashin classBasePolicyResponse- Returns:
- The value of the
hashattribute
-
createIndex
- Specified by:
createIndexin classBasePolicyResponse- Returns:
- The value of the
createIndexattribute
-
modifyIndex
- Specified by:
modifyIndexin classBasePolicyResponse- Returns:
- The value of the
modifyIndexattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
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 by setting a present value for the optionaldatacentersattribute.- Parameters:
value- The value for datacenters- Returns:
- A modified copy of
thisobject
-
withDatacenters
Copy the current immutable object by setting an optional value for thedatacentersattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for datacenters- Returns:
- A modified copy of
thisobject
-
withHash
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
withCreateIndex
Copy the current immutable object by setting a value for thecreateIndexattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createIndex- Returns:
- A modified copy of the
thisobject
-
withModifyIndex
Copy the current immutable object by setting a value for themodifyIndexattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modifyIndex- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutablePolicyListResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,datacenters,hash,createIndex,modifyIndex. -
toString
Prints the immutable valuePolicyListResponsewith attribute values. -
copyOf
Creates an immutable copy of aPolicyListResponsevalue. 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 PolicyListResponse instance
-
builder
Creates a builder forImmutablePolicyListResponse.ImmutablePolicyListResponse.builder() .id(String) // requiredid.name(String) // requiredname.datacenters(List<String>) // optionaldatacenters.hash(String) // requiredhash.createIndex(java.math.BigInteger) // requiredcreateIndex.modifyIndex(java.math.BigInteger) // requiredmodifyIndex.build();- Returns:
- A new ImmutablePolicyListResponse builder
-