AnnotateTextResponse.fromJson constructor
AnnotateTextResponse.fromJson(
- Map json_
Implementation
AnnotateTextResponse.fromJson(core.Map json_)
: this(
categories: (json_['categories'] as core.List?)
?.map((value) => ClassificationCategory.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList(),
documentSentiment: json_.containsKey('documentSentiment')
? Sentiment.fromJson(json_['documentSentiment']
as core.Map<core.String, core.dynamic>)
: null,
entities: (json_['entities'] as core.List?)
?.map((value) =>
Entity.fromJson(value as core.Map<core.String, core.dynamic>))
.toList(),
languageCode: json_['languageCode'] as core.String?,
languageSupported: json_['languageSupported'] as core.bool?,
moderationCategories: (json_['moderationCategories'] as core.List?)
?.map((value) => ClassificationCategory.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList(),
sentences: (json_['sentences'] as core.List?)
?.map((value) => Sentence.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList(),
);