Package com.orbitz.consul.model.session
Class ImmutableSessionInfo
- java.lang.Object
-
- com.orbitz.consul.model.session.SessionInfo
-
- com.orbitz.consul.model.session.ImmutableSessionInfo
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSessionInfo extends SessionInfoImmutable implementation ofSessionInfo.Use the builder to create immutable instances:
ImmutableSessionInfo.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSessionInfo.BuilderBuilds instances of typeImmutableSessionInfo.
-
Method Summary
Modifier and Type Method Description static ImmutableSessionInfo.Builderbuilder()Creates a builder forImmutableSessionInfo.static ImmutableSessionInfocopyOf(SessionInfo instance)Creates an immutable copy of aSessionInfovalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableSessionInfothat have equal attribute values.java.lang.StringgetBehavior()com.google.common.collect.ImmutableList<java.lang.String>getChecks()longgetCreateIndex()java.lang.StringgetId()java.lang.LonggetLockDelay()java.util.Optional<java.lang.String>getName()java.lang.StringgetNode()java.util.Optional<java.lang.String>getTtl()inthashCode()Computes a hash code from attributes:createIndex,lockDelay,name,node,checks,behavior,ttl,id.java.lang.StringtoString()Prints the immutable valueSessionInfowith attribute values.ImmutableSessionInfowithBehavior(java.lang.String value)Copy the current immutable object by setting a value for thebehaviorattribute.ImmutableSessionInfowithChecks(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofchecks.ImmutableSessionInfowithChecks(java.lang.String... elements)Copy the current immutable object with elements that replace the content ofchecks.ImmutableSessionInfowithCreateIndex(long value)Copy the current immutable object by setting a value for thecreateIndexattribute.ImmutableSessionInfowithId(java.lang.String value)Copy the current immutable object by setting a value for theidattribute.ImmutableSessionInfowithLockDelay(java.lang.Long value)Copy the current immutable object by setting a value for thelockDelayattribute.ImmutableSessionInfowithName(java.lang.String value)Copy the current immutable object by setting a present value for the optionalnameattribute.ImmutableSessionInfowithName(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thenameattribute.ImmutableSessionInfowithNode(java.lang.String value)Copy the current immutable object by setting a value for thenodeattribute.ImmutableSessionInfowithTtl(java.lang.String value)Copy the current immutable object by setting a present value for the optionalttlattribute.ImmutableSessionInfowithTtl(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thettlattribute.
-
-
-
Method Detail
-
getCreateIndex
public long getCreateIndex()
- Specified by:
getCreateIndexin classSessionInfo- Returns:
- The value of the
createIndexattribute
-
getLockDelay
public java.lang.Long getLockDelay()
- Specified by:
getLockDelayin classSessionInfo- Returns:
- The value of the
lockDelayattribute
-
getName
public java.util.Optional<java.lang.String> getName()
- Specified by:
getNamein classSessionInfo- Returns:
- The value of the
nameattribute
-
getNode
public java.lang.String getNode()
- Specified by:
getNodein classSessionInfo- Returns:
- The value of the
nodeattribute
-
getChecks
public com.google.common.collect.ImmutableList<java.lang.String> getChecks()
- Specified by:
getChecksin classSessionInfo- Returns:
- The value of the
checksattribute
-
getBehavior
public java.lang.String getBehavior()
- Specified by:
getBehaviorin classSessionInfo- Returns:
- The value of the
behaviorattribute
-
getTtl
public java.util.Optional<java.lang.String> getTtl()
- Specified by:
getTtlin classSessionInfo- Returns:
- The value of the
ttlattribute
-
getId
public java.lang.String getId()
- Specified by:
getIdin classSessionInfo- Returns:
- The value of the
idattribute
-
withCreateIndex
public final ImmutableSessionInfo withCreateIndex(long value)
Copy the current immutable object by setting a value for thecreateIndexattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createIndex- Returns:
- A modified copy of the
thisobject
-
withLockDelay
public final ImmutableSessionInfo withLockDelay(java.lang.Long value)
Copy the current immutable object by setting a value for thelockDelayattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lockDelay- Returns:
- A modified copy of the
thisobject
-
withName
public final ImmutableSessionInfo withName(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalnameattribute.- Parameters:
value- The value for name- Returns:
- A modified copy of
thisobject
-
withName
public final ImmutableSessionInfo withName(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thenameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for name- Returns:
- A modified copy of
thisobject
-
withNode
public final ImmutableSessionInfo withNode(java.lang.String value)
Copy the current immutable object by setting a value for thenodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for node- Returns:
- A modified copy of the
thisobject
-
withChecks
public final ImmutableSessionInfo withChecks(java.lang.String... elements)
Copy the current immutable object with elements that replace the content ofchecks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withChecks
public final ImmutableSessionInfo withChecks(java.lang.Iterable<java.lang.String> elements)
Copy the current immutable object with elements that replace the content ofchecks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of checks elements to set- Returns:
- A modified copy of
thisobject
-
withBehavior
public final ImmutableSessionInfo withBehavior(java.lang.String value)
Copy the current immutable object by setting a value for thebehaviorattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for behavior- Returns:
- A modified copy of the
thisobject
-
withTtl
public final ImmutableSessionInfo withTtl(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalttlattribute.- Parameters:
value- The value for ttl- Returns:
- A modified copy of
thisobject
-
withTtl
public final ImmutableSessionInfo withTtl(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thettlattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for ttl- Returns:
- A modified copy of
thisobject
-
withId
public final ImmutableSessionInfo 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
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableSessionInfothat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:createIndex,lockDelay,name,node,checks,behavior,ttl,id.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueSessionInfowith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableSessionInfo copyOf(SessionInfo instance)
Creates an immutable copy of aSessionInfovalue. 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 SessionInfo instance
-
builder
public static ImmutableSessionInfo.Builder builder()
Creates a builder forImmutableSessionInfo.ImmutableSessionInfo.builder() .createIndex(long) // requiredcreateIndex.lockDelay(Long) // requiredlockDelay.name(String) // optionalname.node(String) // requirednode.addChecks|addAllChecks(String) //checkselements .behavior(String) // requiredbehavior.ttl(String) // optionalttl.id(String) // requiredid.build();- Returns:
- A new ImmutableSessionInfo builder
-
-