UserMessage class
Represents a S3I::B::UserMessage
- used for communication between two
real users.
Constructors
-
UserMessage.new({String? messageId, Set<
String> receivers = const <String>{}, String sender = '', String? replyingToMessage, String? replyToEndpoint, Attachment? attachment, String? subject, String? text}) -
Creates a UserMessage with a newly generated UUIDv4 if
messageId
is not set. -
UserMessage.fromJson(Map<
String, dynamic> json) -
Creates a UserMessage with the information stored in the
json
.factory
Properties
- attachment ↔ Attachment?
-
The optional attachment of an user message.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
The unique identifier of this message (UUIDv4).
no setterinherited
-
receivers
↔ Set<
String> -
All receivers of this message (should be a
s3I:UUIDv4
of the receiving thing).getter/setter pairinherited - replyingToMessage ↔ String?
-
The identifier of the message to which this message is answering.
getter/setter pairinherited
- replyToEndpoint ↔ String?
-
The endpoint to which the answer to this message should be sent.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sender ↔ String
-
The sender of this message (should be a
s3I:UUIDv4
of the publishing thing).getter/setter pairinherited - subject ↔ String?
-
The subject of a user message - should be a short topic (optional).
getter/setter pair
- text ↔ String?
-
The content of the user message (optional).
getter/setter pair
Methods
-
generateFromJson(
Map< String, dynamic> json) → void -
Fills this
Message
with the information stored in thejson
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns the information stored in this object in a way the it could be
encoded via
jsonEncode()
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited