@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","QueryResult"}) @Immutable public final class ImmutableQueryResult extends QueryResult
QueryResult.
Use the builder to create immutable instances:
ImmutableQueryResult.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableQueryResult.Builder
Builds instances of type
ImmutableQueryResult. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableQueryResult.Builder |
builder()
Creates a builder for
ImmutableQueryResult. |
static ImmutableQueryResult |
copyOf(QueryResult instance)
Creates an immutable copy of a
QueryResult value. |
Optional<String> |
datacenters() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableQueryResult that have equal attribute values. |
Optional<Integer> |
failovers() |
com.google.common.collect.ImmutableList<HealthCheck> |
getChecks() |
Optional<DnsQuery> |
getDns() |
Node |
getNode() |
Service |
getService() |
int |
hashCode()
Computes a hash code from attributes:
node, service, checks, dns, datacenters, failovers. |
String |
toString()
Prints the immutable value
QueryResult with attribute values. |
ImmutableQueryResult |
withChecks(HealthCheck... elements)
Copy the current immutable object with elements that replace the content of
checks. |
ImmutableQueryResult |
withChecks(Iterable<? extends HealthCheck> elements)
Copy the current immutable object with elements that replace the content of
checks. |
ImmutableQueryResult |
withDatacenters(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
datacenters attribute. |
ImmutableQueryResult |
withDatacenters(String value)
Copy the current immutable object by setting a present value for the optional
datacenters attribute. |
ImmutableQueryResult |
withDns(DnsQuery value)
Copy the current immutable object by setting a present value for the optional
dns attribute. |
ImmutableQueryResult |
withDns(Optional<DnsQuery> optional)
Copy the current immutable object by setting an optional value for the
dns attribute. |
ImmutableQueryResult |
withFailovers(int value)
Copy the current immutable object by setting a present value for the optional
failovers attribute. |
ImmutableQueryResult |
withFailovers(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for the
failovers attribute. |
ImmutableQueryResult |
withNode(Node value)
Copy the current immutable object by setting a value for the
node attribute. |
ImmutableQueryResult |
withService(Service value)
Copy the current immutable object by setting a value for the
service attribute. |
public Node getNode()
getNode in class QueryResultnode attributepublic Service getService()
getService in class QueryResultservice attributepublic com.google.common.collect.ImmutableList<HealthCheck> getChecks()
getChecks in class QueryResultchecks attributepublic Optional<DnsQuery> getDns()
getDns in class QueryResultdns attributepublic Optional<String> datacenters()
datacenters in class QueryResultdatacenters attributepublic Optional<Integer> failovers()
failovers in class QueryResultfailovers attributepublic final ImmutableQueryResult withNode(Node value)
node attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for nodethis objectpublic final ImmutableQueryResult withService(Service value)
service attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for servicethis objectpublic final ImmutableQueryResult withChecks(HealthCheck... elements)
checks.elements - The elements to setthis objectpublic final ImmutableQueryResult withChecks(Iterable<? extends HealthCheck> elements)
checks.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of checks elements to setthis objectpublic final ImmutableQueryResult withDns(DnsQuery value)
dns attribute.value - The value for dnsthis objectpublic final ImmutableQueryResult withDns(Optional<DnsQuery> optional)
dns attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for dnsthis objectpublic final ImmutableQueryResult withDatacenters(String value)
datacenters attribute.value - The value for datacentersthis objectpublic final ImmutableQueryResult 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 ImmutableQueryResult withFailovers(int value)
failovers attribute.value - The value for failoversthis objectpublic final ImmutableQueryResult withFailovers(Optional<Integer> optional)
failovers attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for failoversthis objectpublic boolean equals(@Nullable Object another)
ImmutableQueryResult that have equal attribute values.public int hashCode()
node, service, checks, dns, datacenters, failovers.public String toString()
QueryResult with attribute values.public static ImmutableQueryResult copyOf(QueryResult instance)
QueryResult 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 ImmutableQueryResult.Builder builder()
ImmutableQueryResult.Copyright © 2018. All rights reserved.