tock / ai.tock.bot.engine.dialog / EntityStateValue

EntityStateValue

data class EntityStateValue (source)

EntityStateValue is the current value of an entity with its history.

Constructors

<init>

EntityStateValue(action: Action, entityValue: EntityValue)
EntityStateValue(entity: Entity, value: Value)

EntityStateValue is the current value of an entity with its history.

EntityStateValue(currentValue: EntityValue?, currentHistory: MutableList<ArchivedEntityValue> = mutableListOf(), initialUpdate: Instant = now(), stateValueId: Id<EntityStateValue>? = null, oldActionsMap: Map<Id<Action>, Action> = emptyMap())

Properties

hasBeanUpdatedInBus

Is this state has been updated in current BotBus?

val hasBeanUpdatedInBus: Boolean

history

Entity's all history. First is older. Last in current value. Could be empty if there is no history and current value is null.

val history: List<ArchivedEntityValue>

lastUpdate

The last update date of the value.

val lastUpdate: Instant

newValues

All values for the current request when merge is not applicable.

val newValues: List<EntityValue>

penultimateValue

Returns the penultimate value.

val penultimateValue: ArchivedEntityValue?

previousValues

Previous values for this entity.

val previousValues: List<ArchivedEntityValue>

stateValueId

State value id if any.

val stateValueId: Id<EntityStateValue>?

value

Current entity value

val value: EntityValue?

Functions

toString

fun toString(): String