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