Package io.dialob.api.proto
Class ImmutableAction
java.lang.Object
io.dialob.api.proto.ImmutableAction
- All Implemented Interfaces:
Action,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableAction
extends Object
implements Action
Immutable implementation of
Action.
Use the builder to create immutable instances:
ImmutableAction.builder().
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.dialob.api.proto.Action
Action.Type -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableAction.Builderbuilder()Creates a builder forImmutableAction.static ImmutableActionCreates an immutable copy of aActionvalue.booleanThis instance is equal to all instances ofImmutableActionthat have equal attribute values.getError()getId()getIds()getItem()getTrace()getType()getValue()inthashCode()Computes a hash code from attributes:type,id,message,trace,item,error,answer,ids,value,valueSet,serverEvent,resourceId.toString()Prints the immutable valueActionwith attribute values.final ImmutableActionwithAnswer(Object value) Copy the current immutable object by setting a value for theanswerattribute.final ImmutableActionCopy the current immutable object by setting a value for theerrorattribute.final ImmutableActionCopy the current immutable object by setting a value for theidattribute.final ImmutableActionCopy the current immutable object with elements that replace the content ofids.final ImmutableActionCopy the current immutable object with elements that replace the content ofids.final ImmutableActionwithItem(ActionItem value) Copy the current immutable object by setting a value for theitemattribute.final ImmutableActionwithMessage(String value) Copy the current immutable object by setting a value for themessageattribute.final ImmutableActionwithResourceId(String value) Copy the current immutable object by setting a value for theresourceIdattribute.final ImmutableActionwithServerEvent(Boolean value) Copy the current immutable object by setting a value for theserverEventattribute.final ImmutableActionCopy the current immutable object by setting a value for thetraceattribute.final ImmutableActionwithType(Action.Type value) Copy the current immutable object by setting a value for thetypeattribute.final ImmutableActionCopy the current immutable object by setting a value for thevalueattribute.final ImmutableActionwithValueSet(ValueSet value) Copy the current immutable object by setting a value for thevalueSetattribute.
-
Method Details
-
getType
-
getId
-
getMessage
- Specified by:
getMessagein interfaceAction- Returns:
- The value of the
messageattribute
-
getTrace
-
getItem
-
getError
-
getAnswer
-
getIds
-
getValue
-
getValueSet
- Specified by:
getValueSetin interfaceAction- Returns:
- The value of the
valueSetattribute
-
getServerEvent
- Specified by:
getServerEventin interfaceAction- Returns:
- The value of the
serverEventattribute
-
getResourceId
- Specified by:
getResourceIdin interfaceAction- Returns:
- The value of the
resourceIdattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withMessage
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message (can benull)- Returns:
- A modified copy of the
thisobject
-
withTrace
Copy the current immutable object by setting a value for thetraceattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for trace (can benull)- Returns:
- A modified copy of the
thisobject
-
withItem
Copy the current immutable object by setting a value for theitemattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for item (can benull)- Returns:
- A modified copy of the
thisobject
-
withError
Copy the current immutable object by setting a value for theerrorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for error (can benull)- Returns:
- A modified copy of the
thisobject
-
withAnswer
Copy the current immutable object by setting a value for theanswerattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for answer (can benull)- Returns:
- A modified copy of the
thisobject
-
withIds
Copy the current immutable object with elements that replace the content ofids.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withIds
Copy the current immutable object with elements that replace the content ofids. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of ids elements to set- Returns:
- A modified copy of
thisobject
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value (can benull)- Returns:
- A modified copy of the
thisobject
-
withValueSet
Copy the current immutable object by setting a value for thevalueSetattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueSet (can benull)- Returns:
- A modified copy of the
thisobject
-
withServerEvent
Copy the current immutable object by setting a value for theserverEventattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for serverEvent (can benull)- Returns:
- A modified copy of the
thisobject
-
withResourceId
Copy the current immutable object by setting a value for theresourceIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for resourceId (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableActionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,id,message,trace,item,error,answer,ids,value,valueSet,serverEvent,resourceId. -
toString
Prints the immutable valueActionwith attribute values. -
copyOf
Creates an immutable copy of aActionvalue. 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 Action instance
-
builder
Creates a builder forImmutableAction.ImmutableAction.builder() .type(io.dialob.api.proto.Action.Type) // requiredtype.id(String | null) // nullableid.message(String | null) // nullablemessage.trace(String | null) // nullabletrace.item(io.dialob.api.proto.ActionItem | null) // nullableitem.error(io.dialob.api.questionnaire.Error | null) // nullableerror.answer(Object | null) // nullableanswer.ids(List<String> | null) // nullableids.value(Object | null) // nullablevalue.valueSet(io.dialob.api.proto.ValueSet | null) // nullablevalueSet.serverEvent(Boolean | null) // nullableserverEvent.resourceId(String | null) // nullableresourceId.build();- Returns:
- A new ImmutableAction builder
-