GetCelebrityRecognitionResponse.fromJson constructor

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

Implementation

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