Package com.orbitz.consul.model.query
Class ImmutableStoredQuery
- java.lang.Object
-
- com.orbitz.consul.model.query.StoredQuery
-
- com.orbitz.consul.model.query.ImmutableStoredQuery
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableStoredQuery extends StoredQueryImmutable implementation ofStoredQuery.Use the builder to create immutable instances:
ImmutableStoredQuery.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableStoredQuery.BuilderBuilds instances of typeImmutableStoredQuery.
-
Method Summary
Modifier and Type Method Description static ImmutableStoredQuery.Builderbuilder()Creates a builder forImmutableStoredQuery.static ImmutableStoredQuerycopyOf(StoredQuery instance)Creates an immutable copy of aStoredQueryvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableStoredQuerythat have equal attribute values.DnsQuerygetDns()java.lang.StringgetId()java.lang.StringgetName()ServiceQuerygetService()java.lang.StringgetSession()java.lang.StringgetToken()inthashCode()Computes a hash code from attributes:id,name,session,token,service,dns.java.lang.StringtoString()Prints the immutable valueStoredQuerywith attribute values.ImmutableStoredQuerywithDns(DnsQuery value)Copy the current immutable object by setting a value for thednsattribute.ImmutableStoredQuerywithId(java.lang.String value)Copy the current immutable object by setting a value for theidattribute.ImmutableStoredQuerywithName(java.lang.String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableStoredQuerywithService(ServiceQuery value)Copy the current immutable object by setting a value for theserviceattribute.ImmutableStoredQuerywithSession(java.lang.String value)Copy the current immutable object by setting a value for thesessionattribute.ImmutableStoredQuerywithToken(java.lang.String value)Copy the current immutable object by setting a value for thetokenattribute.
-
-
-
Method Detail
-
getId
public java.lang.String getId()
- Specified by:
getIdin classStoredQuery- Returns:
- The value of the
idattribute
-
getName
public java.lang.String getName()
- Specified by:
getNamein classStoredQuery- Returns:
- The value of the
nameattribute
-
getSession
public java.lang.String getSession()
- Specified by:
getSessionin classStoredQuery- Returns:
- The value of the
sessionattribute
-
getToken
public java.lang.String getToken()
- Specified by:
getTokenin classStoredQuery- Returns:
- The value of the
tokenattribute
-
getService
public ServiceQuery getService()
- Specified by:
getServicein classStoredQuery- Returns:
- The value of the
serviceattribute
-
getDns
public DnsQuery getDns()
- Specified by:
getDnsin classStoredQuery- Returns:
- The value of the
dnsattribute
-
withId
public final ImmutableStoredQuery withId(java.lang.String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withName
public final ImmutableStoredQuery 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 ImmutableStoredQuery withSession(java.lang.String value)
Copy the current immutable object by setting a value for thesessionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for session- Returns:
- A modified copy of the
thisobject
-
withToken
public final ImmutableStoredQuery withToken(java.lang.String value)
Copy the current immutable object by setting a value for thetokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for token- Returns:
- A modified copy of the
thisobject
-
withService
public final ImmutableStoredQuery 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 ImmutableStoredQuery withDns(DnsQuery value)
Copy the current immutable object by setting a value for thednsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for dns- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableStoredQuerythat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,name,session,token,service,dns.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueStoredQuerywith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableStoredQuery copyOf(StoredQuery instance)
Creates an immutable copy of aStoredQueryvalue. 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 StoredQuery instance
-
builder
public static ImmutableStoredQuery.Builder builder()
Creates a builder forImmutableStoredQuery.ImmutableStoredQuery.builder() .id(String) // requiredid.name(String) // requiredname.session(String) // requiredsession.token(String) // requiredtoken.service(com.orbitz.consul.model.query.ServiceQuery) // requiredservice.dns(com.orbitz.consul.model.query.DnsQuery) // requireddns.build();- Returns:
- A new ImmutableStoredQuery builder
-
-