Class ImmutableQuestionnaireSession.DispatchActionsResult
- java.lang.Object
-
- io.dialob.questionnaire.service.api.session.ImmutableQuestionnaireSession.DispatchActionsResult
-
- All Implemented Interfaces:
QuestionnaireSession.DispatchActionsResult
- Enclosing class:
- ImmutableQuestionnaireSession
@Immutable public static final class ImmutableQuestionnaireSession.DispatchActionsResult extends Object implements QuestionnaireSession.DispatchActionsResult
Immutable implementation ofQuestionnaireSession.DispatchActionsResult.Use the builder to create immutable instances:
ImmutableQuestionnaireSession.DispatchActionsResult.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableQuestionnaireSession.DispatchActionsResult.BuilderBuilds instances of typeDispatchActionsResult.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableQuestionnaireSession.DispatchActionsResult.Builderbuilder()Creates a builder forDispatchActionsResult.static ImmutableQuestionnaireSession.DispatchActionsResultcopyOf(QuestionnaireSession.DispatchActionsResult instance)Creates an immutable copy of aQuestionnaireSession.DispatchActionsResultvalue.booleanequals(Object another)This instance is equal to all instances ofDispatchActionsResultthat have equal attribute values.io.dialob.api.proto.ActionsgetActions()inthashCode()Computes a hash code from attributes:actions,isDidComplete.booleanisDidComplete()StringtoString()Prints the immutable valueDispatchActionsResultwith attribute values.ImmutableQuestionnaireSession.DispatchActionsResultwithActions(io.dialob.api.proto.Actions value)Copy the current immutable object by setting a value for theactionsattribute.ImmutableQuestionnaireSession.DispatchActionsResultwithIsDidComplete(boolean value)Copy the current immutable object by setting a value for theisDidCompleteattribute.
-
-
-
Method Detail
-
getActions
public io.dialob.api.proto.Actions getActions()
- Specified by:
getActionsin interfaceQuestionnaireSession.DispatchActionsResult- Returns:
- The value of the
actionsattribute
-
isDidComplete
public boolean isDidComplete()
- Specified by:
isDidCompletein interfaceQuestionnaireSession.DispatchActionsResult- Returns:
- The value of the
isDidCompleteattribute
-
withActions
public final ImmutableQuestionnaireSession.DispatchActionsResult withActions(io.dialob.api.proto.Actions value)
Copy the current immutable object by setting a value for theactionsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for actions- Returns:
- A modified copy of the
thisobject
-
withIsDidComplete
public final ImmutableQuestionnaireSession.DispatchActionsResult withIsDidComplete(boolean value)
Copy the current immutable object by setting a value for theisDidCompleteattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isDidComplete- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofDispatchActionsResultthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:actions,isDidComplete.
-
toString
public String toString()
Prints the immutable valueDispatchActionsResultwith attribute values.
-
copyOf
public static ImmutableQuestionnaireSession.DispatchActionsResult copyOf(QuestionnaireSession.DispatchActionsResult instance)
Creates an immutable copy of aQuestionnaireSession.DispatchActionsResultvalue. 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 DispatchActionsResult instance
-
builder
public static ImmutableQuestionnaireSession.DispatchActionsResult.Builder builder()
Creates a builder forDispatchActionsResult.ImmutableQuestionnaireSession.DispatchActionsResult.builder() .actions(io.dialob.api.proto.Actions) // requiredactions.isDidComplete(boolean) // requiredisDidComplete.build();- Returns:
- A new DispatchActionsResult builder
-
-