Class ImmutableSessionCreatedResponse
java.lang.Object
org.kiwiproject.consul.model.session.SessionCreatedResponse
org.kiwiproject.consul.model.session.ImmutableSessionCreatedResponse
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableSessionCreatedResponse
extends SessionCreatedResponse
Immutable implementation of
SessionCreatedResponse.
Use the builder to create immutable instances:
ImmutableSessionCreatedResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableSessionCreatedResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableSessionCreatedResponse.copyOf(SessionCreatedResponse instance) Creates an immutable copy of aSessionCreatedResponsevalue.booleanThis instance is equal to all instances ofImmutableSessionCreatedResponsethat have equal attribute values.getId()inthashCode()Computes a hash code from attributes:id.toString()Prints the immutable valueSessionCreatedResponsewith attribute values.Copy the current immutable object by setting a value for theidattribute.
-
Method Details
-
getId
- Specified by:
getIdin classSessionCreatedResponse- Returns:
- The value of the
idattribute
-
withId
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
This instance is equal to all instances ofImmutableSessionCreatedResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id. -
toString
Prints the immutable valueSessionCreatedResponsewith attribute values. -
copyOf
Creates an immutable copy of aSessionCreatedResponsevalue. 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 SessionCreatedResponse instance
-
builder
Creates a builder forImmutableSessionCreatedResponse.ImmutableSessionCreatedResponse.builder() .id(String) // requiredid.build();- Returns:
- A new ImmutableSessionCreatedResponse builder
-