Package com.orbitz.consul.model.acl
Class ImmutablePolicyResponse
- java.lang.Object
-
- com.orbitz.consul.model.acl.BasePolicyResponse
-
- com.orbitz.consul.model.acl.PolicyResponse
-
- com.orbitz.consul.model.acl.ImmutablePolicyResponse
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePolicyResponse extends PolicyResponseImmutable implementation ofPolicyResponse.Use the builder to create immutable instances:
ImmutablePolicyResponse.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePolicyResponse.BuilderBuilds instances of typeImmutablePolicyResponse.
-
Method Summary
Modifier and Type Method Description static ImmutablePolicyResponse.Builderbuilder()Creates a builder forImmutablePolicyResponse.static ImmutablePolicyResponsecopyOf(PolicyResponse instance)Creates an immutable copy of aPolicyResponsevalue.java.math.BigIntegercreateIndex()java.util.Optional<java.lang.String>datacenters()booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutablePolicyResponsethat have equal attribute values.java.lang.Stringhash()inthashCode()Computes a hash code from attributes:id,name,datacenters,hash,createIndex,modifyIndex.java.lang.Stringid()java.math.BigIntegermodifyIndex()java.lang.Stringname()java.lang.StringtoString()Prints the immutable valuePolicyResponsewith attribute values.ImmutablePolicyResponsewithCreateIndex(java.math.BigInteger value)Copy the current immutable object by setting a value for thecreateIndexattribute.ImmutablePolicyResponsewithDatacenters(java.lang.String value)Copy the current immutable object by setting a present value for the optionaldatacentersattribute.ImmutablePolicyResponsewithDatacenters(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thedatacentersattribute.ImmutablePolicyResponsewithHash(java.lang.String value)Copy the current immutable object by setting a value for thehashattribute.ImmutablePolicyResponsewithId(java.lang.String value)Copy the current immutable object by setting a value for theidattribute.ImmutablePolicyResponsewithModifyIndex(java.math.BigInteger value)Copy the current immutable object by setting a value for themodifyIndexattribute.ImmutablePolicyResponsewithName(java.lang.String value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
id
public java.lang.String id()
- Specified by:
idin classBasePolicyResponse- Returns:
- The value of the
idattribute
-
name
public java.lang.String name()
- Specified by:
namein classBasePolicyResponse- Returns:
- The value of the
nameattribute
-
datacenters
public java.util.Optional<java.lang.String> datacenters()
- Specified by:
datacentersin classBasePolicyResponse- Returns:
- The value of the
datacentersattribute
-
hash
public java.lang.String hash()
- Specified by:
hashin classBasePolicyResponse- Returns:
- The value of the
hashattribute
-
createIndex
public java.math.BigInteger createIndex()
- Specified by:
createIndexin classBasePolicyResponse- Returns:
- The value of the
createIndexattribute
-
modifyIndex
public java.math.BigInteger modifyIndex()
- Specified by:
modifyIndexin classBasePolicyResponse- Returns:
- The value of the
modifyIndexattribute
-
withId
public final ImmutablePolicyResponse withId(java.lang.String value)
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
public final ImmutablePolicyResponse withName(java.lang.String value)
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
public final ImmutablePolicyResponse withDatacenters(java.lang.String value)
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
public final ImmutablePolicyResponse withDatacenters(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thedatacentersattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for datacenters- Returns:
- A modified copy of
thisobject
-
withHash
public final ImmutablePolicyResponse withHash(java.lang.String value)
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
public final ImmutablePolicyResponse withCreateIndex(java.math.BigInteger value)
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
public final ImmutablePolicyResponse withModifyIndex(java.math.BigInteger value)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutablePolicyResponsethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,name,datacenters,hash,createIndex,modifyIndex.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valuePolicyResponsewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutablePolicyResponse copyOf(PolicyResponse instance)
Creates an immutable copy of aPolicyResponsevalue. 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 PolicyResponse instance
-
builder
public static ImmutablePolicyResponse.Builder builder()
Creates a builder forImmutablePolicyResponse.ImmutablePolicyResponse.builder() .id(String) // requiredid.name(String) // requiredname.datacenters(String) // optionaldatacenters.hash(String) // requiredhash.createIndex(java.math.BigInteger) // requiredcreateIndex.modifyIndex(java.math.BigInteger) // requiredmodifyIndex.build();- Returns:
- A new ImmutablePolicyResponse builder
-
-