@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableServiceQuery extends ServiceQuery
ServiceQuery.
Use the builder to create immutable instances:
ImmutableServiceQuery.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableServiceQuery.Builder
Builds instances of type
ImmutableServiceQuery. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableServiceQuery.Builder |
builder()
Creates a builder for
ImmutableServiceQuery. |
static ImmutableServiceQuery |
copyOf(ServiceQuery instance)
Creates an immutable copy of a
ServiceQuery value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableServiceQuery that have equal attribute values. |
Optional<Failover> |
getFailover() |
Optional<Boolean> |
getOnlyPassing() |
String |
getService() |
Optional<List<String>> |
getTags() |
int |
hashCode()
Computes a hash code from attributes:
service, onlyPassing, tags, failover. |
String |
toString()
Prints the immutable value
ServiceQuery with attribute values. |
ImmutableServiceQuery |
withFailover(Failover value)
Copy the current immutable object by setting a present value for the optional
failover attribute. |
ImmutableServiceQuery |
withFailover(Optional<? extends Failover> optional)
Copy the current immutable object by setting an optional value for the
failover attribute. |
ImmutableServiceQuery |
withOnlyPassing(boolean value)
Copy the current immutable object by setting a present value for the optional
onlyPassing attribute. |
ImmutableServiceQuery |
withOnlyPassing(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for the
onlyPassing attribute. |
ImmutableServiceQuery |
withService(String value)
Copy the current immutable object by setting a value for the
service attribute. |
ImmutableServiceQuery |
withTags(List<String> value)
Copy the current immutable object by setting a present value for the optional
tags attribute. |
ImmutableServiceQuery |
withTags(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for the
tags attribute. |
public String getService()
getService in class ServiceQueryservice attributepublic Optional<Boolean> getOnlyPassing()
getOnlyPassing in class ServiceQueryonlyPassing attributepublic Optional<List<String>> getTags()
getTags in class ServiceQuerytags attributepublic Optional<Failover> getFailover()
getFailover in class ServiceQueryfailover attributepublic final ImmutableServiceQuery withService(String value)
service attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for servicethis objectpublic final ImmutableServiceQuery withOnlyPassing(boolean value)
onlyPassing attribute.value - The value for onlyPassingthis objectpublic final ImmutableServiceQuery withOnlyPassing(Optional<Boolean> optional)
onlyPassing attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for onlyPassingthis objectpublic final ImmutableServiceQuery withTags(List<String> value)
tags attribute.value - The value for tagsthis objectpublic final ImmutableServiceQuery withTags(Optional<? extends List<String>> optional)
tags 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 tagsthis objectpublic final ImmutableServiceQuery withFailover(Failover value)
failover attribute.value - The value for failoverthis objectpublic final ImmutableServiceQuery withFailover(Optional<? extends Failover> optional)
failover 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 failoverthis objectpublic boolean equals(@Nullable Object another)
ImmutableServiceQuery that have equal attribute values.public int hashCode()
service, onlyPassing, tags, failover.public String toString()
ServiceQuery with attribute values.public static ImmutableServiceQuery copyOf(ServiceQuery instance)
ServiceQuery 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 ImmutableServiceQuery.Builder builder()
ImmutableServiceQuery.
ImmutableServiceQuery.builder()
.service(String) // required service
.onlyPassing(Boolean) // optional onlyPassing
.tags(List<String>) // optional tags
.failover(com.orbitz.consul.model.query.Failover) // optional failover
.build();
Copyright © 2019. All rights reserved.