Class ImmutableInitSession
- java.lang.Object
-
- io.dialob.spring.composer.controllers.ImmutableInitSession
-
- All Implemented Interfaces:
DialobComposerServiceController.InitSession
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableInitSession extends Object implements DialobComposerServiceController.InitSession
Immutable implementation ofDialobComposerServiceController.InitSession.Use the builder to create immutable instances:
ImmutableInitSession.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableInitSession.BuilderBuilds instances of typeImmutableInitSession.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableInitSession.Builderbuilder()Creates a builder forImmutableInitSession.static ImmutableInitSessioncopyOf(DialobComposerServiceController.InitSession instance)Creates an immutable copy of aDialobComposerServiceController.InitSessionvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableInitSessionthat have equal attribute values.com.google.common.collect.ImmutableMap<String,Object>getContextValues()StringgetFormId()StringgetLanguage()inthashCode()Computes a hash code from attributes:formId,language,contextValues.StringtoString()Prints the immutable valueInitSessionwith attribute values.ImmutableInitSessionwithContextValues(Map<String,? extends Object> entries)Copy the current immutable object by replacing thecontextValuesmap with the specified map.ImmutableInitSessionwithFormId(String value)Copy the current immutable object by setting a value for theformIdattribute.ImmutableInitSessionwithLanguage(String value)Copy the current immutable object by setting a value for thelanguageattribute.
-
-
-
Method Detail
-
getFormId
public String getFormId()
- Specified by:
getFormIdin interfaceDialobComposerServiceController.InitSession- Returns:
- The value of the
formIdattribute
-
getLanguage
public String getLanguage()
- Specified by:
getLanguagein interfaceDialobComposerServiceController.InitSession- Returns:
- The value of the
languageattribute
-
getContextValues
public com.google.common.collect.ImmutableMap<String,Object> getContextValues()
- Specified by:
getContextValuesin interfaceDialobComposerServiceController.InitSession- Returns:
- The value of the
contextValuesattribute
-
withFormId
public final ImmutableInitSession withFormId(String value)
Copy the current immutable object by setting a value for theformIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for formId- Returns:
- A modified copy of the
thisobject
-
withLanguage
public final ImmutableInitSession withLanguage(String value)
Copy the current immutable object by setting a value for thelanguageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for language- Returns:
- A modified copy of the
thisobject
-
withContextValues
public final ImmutableInitSession withContextValues(Map<String,? extends Object> entries)
Copy the current immutable object by replacing thecontextValuesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the contextValues map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableInitSessionthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:formId,language,contextValues.
-
toString
public String toString()
Prints the immutable valueInitSessionwith attribute values.
-
copyOf
public static ImmutableInitSession copyOf(DialobComposerServiceController.InitSession instance)
Creates an immutable copy of aDialobComposerServiceController.InitSessionvalue. 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 InitSession instance
-
builder
public static ImmutableInitSession.Builder builder()
Creates a builder forImmutableInitSession.ImmutableInitSession.builder() .formId(String) // requiredformId.language(String) // requiredlanguage.putContextValues|putAllContextValues(String => Object) //contextValuesmappings .build();- Returns:
- A new ImmutableInitSession builder
-
-