DetectEntitiesResponse.fromJson constructor

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

Implementation

factory DetectEntitiesResponse.fromJson(Map<String, dynamic> json) {
  return DetectEntitiesResponse(
    entities: (json['Entities'] as List)
        .whereNotNull()
        .map((e) => Entity.fromJson(e as Map<String, dynamic>))
        .toList(),
    modelVersion: json['ModelVersion'] as String,
    paginationToken: json['PaginationToken'] as String?,
    unmappedAttributes: (json['UnmappedAttributes'] as List?)
        ?.whereNotNull()
        .map((e) => UnmappedAttribute.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}