SessionEvent.fromJson constructor
SessionEvent.fromJson(
- Object? j
Implementation
factory SessionEvent.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return SessionEvent(
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
author: switch (json['author']) {
null => '',
Object $1 => decodeString($1),
},
content: switch (json['content']) {
null => null,
Object $1 => Content.fromJson($1),
},
invocationId: switch (json['invocationId']) {
null => '',
Object $1 => decodeString($1),
},
actions: switch (json['actions']) {
null => null,
Object $1 => EventActions.fromJson($1),
},
timestamp: switch (json['timestamp']) {
null => null,
Object $1 => protobuf.Timestamp.fromJson($1),
},
errorCode: switch (json['errorCode']) {
null => '',
Object $1 => decodeString($1),
},
errorMessage: switch (json['errorMessage']) {
null => '',
Object $1 => decodeString($1),
},
eventMetadata: switch (json['eventMetadata']) {
null => null,
Object $1 => EventMetadata.fromJson($1),
},
);
}