Class ImmutableDnsQuery
java.lang.Object
org.kiwiproject.consul.model.query.DnsQuery
org.kiwiproject.consul.model.query.ImmutableDnsQuery
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableDnsQuery
extends DnsQuery
Immutable implementation of
DnsQuery.
Use the builder to create immutable instances:
ImmutableDnsQuery.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDnsQuery.Builderbuilder()Creates a builder forImmutableDnsQuery.static ImmutableDnsQueryCreates an immutable copy of aDnsQueryvalue.booleanThis instance is equal to all instances ofImmutableDnsQuerythat have equal attribute values.getTtl()inthashCode()Computes a hash code from attributes:ttl.toString()Prints the immutable valueDnsQuerywith attribute values.final ImmutableDnsQueryCopy the current immutable object by setting a value for thettlattribute.
-
Method Details
-
getTtl
-
withTtl
Copy the current immutable object by setting a value for thettlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ttl- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableDnsQuerythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ttl. -
toString
Prints the immutable valueDnsQuerywith attribute values. -
copyOf
Creates an immutable copy of aDnsQueryvalue. 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 DnsQuery instance
-
builder
Creates a builder forImmutableDnsQuery.ImmutableDnsQuery.builder() .ttl(String) // requiredttl.build();- Returns:
- A new ImmutableDnsQuery builder
-