GetDocumentAnalysisResponse.fromJson constructor

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

Implementation

factory GetDocumentAnalysisResponse.fromJson(Map<String, dynamic> json) {
  return GetDocumentAnalysisResponse(
    analyzeDocumentModelVersion:
        json['AnalyzeDocumentModelVersion'] as String?,
    blocks: (json['Blocks'] as List?)
        ?.whereNotNull()
        .map((e) => Block.fromJson(e as Map<String, dynamic>))
        .toList(),
    documentMetadata: json['DocumentMetadata'] != null
        ? DocumentMetadata.fromJson(
            json['DocumentMetadata'] as Map<String, dynamic>)
        : null,
    jobStatus: (json['JobStatus'] as String?)?.toJobStatus(),
    nextToken: json['NextToken'] as String?,
    statusMessage: json['StatusMessage'] as String?,
    warnings: (json['Warnings'] as List?)
        ?.whereNotNull()
        .map((e) => Warning.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}