Package com.orbitz.consul.model.query
Class ImmutablePreparedQuery
- java.lang.Object
-
- com.orbitz.consul.model.query.PreparedQuery
-
- com.orbitz.consul.model.query.ImmutablePreparedQuery
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePreparedQuery extends PreparedQueryImmutable implementation ofPreparedQuery.Use the builder to create immutable instances:
ImmutablePreparedQuery.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePreparedQuery.BuilderBuilds instances of typeImmutablePreparedQuery.
-
Method Summary
Modifier and Type Method Description static ImmutablePreparedQuery.Builderbuilder()Creates a builder forImmutablePreparedQuery.static ImmutablePreparedQuerycopyOf(PreparedQuery instance)Creates an immutable copy of aPreparedQueryvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutablePreparedQuerythat have equal attribute values.java.util.Optional<DnsQuery>getDns()java.lang.StringgetName()ServiceQuerygetService()java.util.Optional<java.lang.String>getSession()java.util.Optional<Template>getTemplate()java.util.Optional<java.lang.String>getToken()inthashCode()Computes a hash code from attributes:template,name,session,token,service,dns.java.lang.StringtoString()Prints the immutable valuePreparedQuerywith attribute values.ImmutablePreparedQuerywithDns(DnsQuery value)Copy the current immutable object by setting a present value for the optionaldnsattribute.ImmutablePreparedQuerywithDns(java.util.Optional<? extends DnsQuery> optional)Copy the current immutable object by setting an optional value for thednsattribute.ImmutablePreparedQuerywithName(java.lang.String value)Copy the current immutable object by setting a value for thenameattribute.ImmutablePreparedQuerywithService(ServiceQuery value)Copy the current immutable object by setting a value for theserviceattribute.ImmutablePreparedQuerywithSession(java.lang.String value)Copy the current immutable object by setting a present value for the optionalsessionattribute.ImmutablePreparedQuerywithSession(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thesessionattribute.ImmutablePreparedQuerywithTemplate(Template value)Copy the current immutable object by setting a present value for the optionaltemplateattribute.ImmutablePreparedQuerywithTemplate(java.util.Optional<? extends Template> optional)Copy the current immutable object by setting an optional value for thetemplateattribute.ImmutablePreparedQuerywithToken(java.lang.String value)Copy the current immutable object by setting a present value for the optionaltokenattribute.ImmutablePreparedQuerywithToken(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thetokenattribute.
-
-
-
Method Detail
-
getTemplate
public java.util.Optional<Template> getTemplate()
- Specified by:
getTemplatein classPreparedQuery- Returns:
- The value of the
templateattribute
-
getName
public java.lang.String getName()
- Specified by:
getNamein classPreparedQuery- Returns:
- The value of the
nameattribute
-
getSession
public java.util.Optional<java.lang.String> getSession()
- Specified by:
getSessionin classPreparedQuery- Returns:
- The value of the
sessionattribute
-
getToken
public java.util.Optional<java.lang.String> getToken()
- Specified by:
getTokenin classPreparedQuery- Returns:
- The value of the
tokenattribute
-
getService
public ServiceQuery getService()
- Specified by:
getServicein classPreparedQuery- Returns:
- The value of the
serviceattribute
-
getDns
public java.util.Optional<DnsQuery> getDns()
- Specified by:
getDnsin classPreparedQuery- Returns:
- The value of the
dnsattribute
-
withTemplate
public final ImmutablePreparedQuery withTemplate(Template value)
Copy the current immutable object by setting a present value for the optionaltemplateattribute.- Parameters:
value- The value for template- Returns:
- A modified copy of
thisobject
-
withTemplate
public final ImmutablePreparedQuery withTemplate(java.util.Optional<? extends Template> optional)
Copy the current immutable object by setting an optional value for thetemplateattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for template- Returns:
- A modified copy of
thisobject
-
withName
public final ImmutablePreparedQuery 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
-
withSession
public final ImmutablePreparedQuery withSession(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalsessionattribute.- Parameters:
value- The value for session- Returns:
- A modified copy of
thisobject
-
withSession
public final ImmutablePreparedQuery withSession(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thesessionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for session- Returns:
- A modified copy of
thisobject
-
withToken
public final ImmutablePreparedQuery withToken(java.lang.String value)
Copy the current immutable object by setting a present value for the optionaltokenattribute.- Parameters:
value- The value for token- Returns:
- A modified copy of
thisobject
-
withToken
public final ImmutablePreparedQuery withToken(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thetokenattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for token- Returns:
- A modified copy of
thisobject
-
withService
public final ImmutablePreparedQuery withService(ServiceQuery value)
Copy the current immutable object by setting a value for theserviceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for service- Returns:
- A modified copy of the
thisobject
-
withDns
public final ImmutablePreparedQuery withDns(DnsQuery value)
Copy the current immutable object by setting a present value for the optionaldnsattribute.- Parameters:
value- The value for dns- Returns:
- A modified copy of
thisobject
-
withDns
public final ImmutablePreparedQuery withDns(java.util.Optional<? extends DnsQuery> optional)
Copy the current immutable object by setting an optional value for thednsattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for dns- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutablePreparedQuerythat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:template,name,session,token,service,dns.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valuePreparedQuerywith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutablePreparedQuery copyOf(PreparedQuery instance)
Creates an immutable copy of aPreparedQueryvalue. 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 PreparedQuery instance
-
builder
public static ImmutablePreparedQuery.Builder builder()
Creates a builder forImmutablePreparedQuery.ImmutablePreparedQuery.builder() .template(com.orbitz.consul.model.query.Template) // optionaltemplate.name(String) // requiredname.session(String) // optionalsession.token(String) // optionaltoken.service(com.orbitz.consul.model.query.ServiceQuery) // requiredservice.dns(com.orbitz.consul.model.query.DnsQuery) // optionaldns.build();- Returns:
- A new ImmutablePreparedQuery builder
-
-