tock / ai.tock.bot.engine.event / Event

# Event

`abstract class Event` (source)

The base class for all events or actions.

### Constructors

#### <init> | The base class for all events or actions. `Event(applicationId: String, id: Id<out Event> = newId(), date: Instant = Instant.now(), state: EventState = EventState())`

### Properties

#### applicationId | The bot application id. `val applicationId: String`
#### date | The creation date of the event. `val date: Instant`
#### id | The unique id of the event. `val id: Id<out Event>`
#### state | The state of the event. `val state: EventState`

### Functions

#### hasEntity | Does this event contains specified role entity? `fun hasEntity(role: String): Boolean`
#### hasEntityPredefinedValue | Does this event contains specified predefined value entity? `fun hasEntityPredefinedValue(role: String, value: String): Boolean`

### Inheritors

#### Action | A user (or bot) action. `abstract class Action : Event`
#### EndSessionEvent | The session is ended. dialog context should be cleared. `class EndSessionEvent : Event`
#### GetAppRolesEvent | To get applications roles. `class GetAppRolesEvent : Event`
#### MarkSeenEvent | The "message seen" event. `class MarkSeenEvent : Event`
#### OneToOneEvent | A one to one event is an event that has a source (the user id) and a target (the recipient id). `abstract class OneToOneEvent : Event`
#### StartSessionEvent | A new session is started. `class StartSessionEvent : Event`
#### TypingOffEvent | The "end of typing" event. `class TypingOffEvent : Event`
#### TypingOnEvent | The "start of typing" event. `class TypingOnEvent : Event`