Message class
Message is one unit of communication between client and server.
It is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id.
Constructors
Properties
-
content
↔ List<
Part> ? -
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container
of the message content.
getter/setter pair
- contextId ↔ String?
-
The context id of the message.
getter/setter pair
-
extensions
↔ List<
String> ? -
The URIs of extensions that are present or contributed to this Message.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- messageId ↔ String?
-
The unique identifier (e.g. UUID)of the message.
getter/setter pair
-
metadata
↔ Map<
String, Object?> ? -
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to
provide along with the message.
getter/setter pair
- role ↔ String?
-
A role for the message.
Possible string values are:
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taskId ↔ String?
-
The task id of the message.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited