GetPersonTrackingResponse.fromJson constructor

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

Implementation

factory GetPersonTrackingResponse.fromJson(Map<String, dynamic> json) {
  return GetPersonTrackingResponse(
    jobStatus: (json['JobStatus'] as String?)?.toVideoJobStatus(),
    nextToken: json['NextToken'] as String?,
    persons: (json['Persons'] as List?)
        ?.whereNotNull()
        .map((e) => PersonDetection.fromJson(e as Map<String, dynamic>))
        .toList(),
    statusMessage: json['StatusMessage'] as String?,
    videoMetadata: json['VideoMetadata'] != null
        ? VideoMetadata.fromJson(
            json['VideoMetadata'] as Map<String, dynamic>)
        : null,
  );
}