EntityRecognizerInputDataConfig.fromJson constructor

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

Implementation

factory EntityRecognizerInputDataConfig.fromJson(Map<String, dynamic> json) {
  return EntityRecognizerInputDataConfig(
    entityTypes: (json['EntityTypes'] as List)
        .whereNotNull()
        .map((e) => EntityTypesListItem.fromJson(e as Map<String, dynamic>))
        .toList(),
    annotations: json['Annotations'] != null
        ? EntityRecognizerAnnotations.fromJson(
            json['Annotations'] as Map<String, dynamic>)
        : null,
    augmentedManifests: (json['AugmentedManifests'] as List?)
        ?.whereNotNull()
        .map((e) =>
            AugmentedManifestsListItem.fromJson(e as Map<String, dynamic>))
        .toList(),
    dataFormat:
        (json['DataFormat'] as String?)?.toEntityRecognizerDataFormat(),
    documents: json['Documents'] != null
        ? EntityRecognizerDocuments.fromJson(
            json['Documents'] as Map<String, dynamic>)
        : null,
    entityList: json['EntityList'] != null
        ? EntityRecognizerEntityList.fromJson(
            json['EntityList'] as Map<String, dynamic>)
        : null,
  );
}