JobEntry.fromJson constructor

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

Implementation

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