RealtimeTranslationSessionClosedEvent.fromJson constructor
Creates from JSON.
Implementation
factory RealtimeTranslationSessionClosedEvent.fromJson(
Map<String, dynamic> json,
) {
if (json['type'] != 'session.closed') {
throw FormatException(
'RealtimeTranslationSessionClosedEvent.fromJson expected type '
'"session.closed", got ${json['type']}',
);
}
return RealtimeTranslationSessionClosedEvent(
eventId: json['event_id'] as String,
);
}