ModerateTextResponse.fromJson constructor

ModerateTextResponse.fromJson(
  1. Map json_
)

Implementation

ModerateTextResponse.fromJson(core.Map json_)
    : this(
        languageCode: json_.containsKey('languageCode')
            ? json_['languageCode'] as core.String
            : null,
        languageSupported: json_.containsKey('languageSupported')
            ? json_['languageSupported'] as core.bool
            : null,
        moderationCategories: json_.containsKey('moderationCategories')
            ? (json_['moderationCategories'] as core.List)
                .map((value) => ClassificationCategory.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );