GetTextDetectionResponse.fromJson constructor

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

Implementation

factory GetTextDetectionResponse.fromJson(Map<String, dynamic> json) {
  return GetTextDetectionResponse(
    jobStatus: (json['JobStatus'] as String?)?.toVideoJobStatus(),
    nextToken: json['NextToken'] as String?,
    statusMessage: json['StatusMessage'] as String?,
    textDetections: (json['TextDetections'] as List?)
        ?.whereNotNull()
        .map((e) => TextDetectionResult.fromJson(e as Map<String, dynamic>))
        .toList(),
    textModelVersion: json['TextModelVersion'] as String?,
    videoMetadata: json['VideoMetadata'] != null
        ? VideoMetadata.fromJson(
            json['VideoMetadata'] as Map<String, dynamic>)
        : null,
  );
}