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