@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePolicyResponse extends PolicyResponse
PolicyResponse.
Use the builder to create immutable instances:
ImmutablePolicyResponse.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutablePolicyResponse.Builder
Builds instances of type
ImmutablePolicyResponse. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutablePolicyResponse.Builder |
builder()
Creates a builder for
ImmutablePolicyResponse. |
static ImmutablePolicyResponse |
copyOf(PolicyResponse instance)
Creates an immutable copy of a
PolicyResponse value. |
BigInteger |
createIndex() |
Optional<String> |
datacenters() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutablePolicyResponse that have equal attribute values. |
String |
hash() |
int |
hashCode()
Computes a hash code from attributes:
id, name, datacenters, hash, createIndex, modifyIndex. |
String |
id() |
BigInteger |
modifyIndex() |
String |
name() |
String |
toString()
Prints the immutable value
PolicyResponse with attribute values. |
ImmutablePolicyResponse |
withCreateIndex(BigInteger value)
Copy the current immutable object by setting a value for the
createIndex attribute. |
ImmutablePolicyResponse |
withDatacenters(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
datacenters attribute. |
ImmutablePolicyResponse |
withDatacenters(String value)
Copy the current immutable object by setting a present value for the optional
datacenters attribute. |
ImmutablePolicyResponse |
withHash(String value)
Copy the current immutable object by setting a value for the
hash attribute. |
ImmutablePolicyResponse |
withId(String value)
Copy the current immutable object by setting a value for the
id attribute. |
ImmutablePolicyResponse |
withModifyIndex(BigInteger value)
Copy the current immutable object by setting a value for the
modifyIndex attribute. |
ImmutablePolicyResponse |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
public String id()
id in class BasePolicyResponseid attributepublic String name()
name in class BasePolicyResponsename attributepublic Optional<String> datacenters()
datacenters in class BasePolicyResponsedatacenters attributepublic String hash()
hash in class BasePolicyResponsehash attributepublic BigInteger createIndex()
createIndex in class BasePolicyResponsecreateIndex attributepublic BigInteger modifyIndex()
modifyIndex in class BasePolicyResponsemodifyIndex attributepublic final ImmutablePolicyResponse withId(String value)
id attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for idthis objectpublic final ImmutablePolicyResponse withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic final ImmutablePolicyResponse withDatacenters(String value)
datacenters attribute.value - The value for datacentersthis objectpublic final ImmutablePolicyResponse withDatacenters(Optional<String> optional)
datacenters attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for datacentersthis objectpublic final ImmutablePolicyResponse withHash(String value)
hash attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for hashthis objectpublic final ImmutablePolicyResponse withCreateIndex(BigInteger value)
createIndex attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for createIndexthis objectpublic final ImmutablePolicyResponse withModifyIndex(BigInteger value)
modifyIndex attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for modifyIndexthis objectpublic boolean equals(@Nullable Object another)
ImmutablePolicyResponse that have equal attribute values.public int hashCode()
id, name, datacenters, hash, createIndex, modifyIndex.public String toString()
PolicyResponse with attribute values.public static ImmutablePolicyResponse copyOf(PolicyResponse instance)
PolicyResponse value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutablePolicyResponse.Builder builder()
ImmutablePolicyResponse.
ImmutablePolicyResponse.builder()
.id(String) // required id
.name(String) // required name
.datacenters(String) // optional datacenters
.hash(String) // required hash
.createIndex(java.math.BigInteger) // required createIndex
.modifyIndex(java.math.BigInteger) // required modifyIndex
.build();
Copyright © 2019. All rights reserved.