TranslateTextResponse.fromJson constructor

TranslateTextResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TranslateTextResponse.fromJson(Map<String, dynamic> json) {
  return TranslateTextResponse(
    sourceLanguageCode: json['SourceLanguageCode'] as String,
    targetLanguageCode: json['TargetLanguageCode'] as String,
    translatedText: json['TranslatedText'] as String,
    appliedTerminologies: (json['AppliedTerminologies'] as List?)
        ?.whereNotNull()
        .map((e) => AppliedTerminology.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}