GetJobResponse.fromJson constructor

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

Implementation

factory GetJobResponse.fromJson(Map<String, dynamic> json) {
  return GetJobResponse(
    arn: json['Arn'] as String?,
    createdAt: timeStampFromJson(json['CreatedAt']),
    details: json['Details'] != null
        ? ResponseDetails.fromJson(json['Details'] as Map<String, dynamic>)
        : null,
    errors: (json['Errors'] as List?)
        ?.whereNotNull()
        .map((e) => JobError.fromJson(e as Map<String, dynamic>))
        .toList(),
    id: json['Id'] as String?,
    state: (json['State'] as String?)?.toState(),
    type: (json['Type'] as String?)?.toType(),
    updatedAt: timeStampFromJson(json['UpdatedAt']),
  );
}