Job.fromJson constructor
Implementation
factory Job.fromJson(Map<String, dynamic> json) {
return Job(
abortConfig: json['abortConfig'] != null
? AbortConfig.fromJson(json['abortConfig'] as Map<String, dynamic>)
: null,
comment: json['comment'] as String?,
completedAt: timeStampFromJson(json['completedAt']),
createdAt: timeStampFromJson(json['createdAt']),
description: json['description'] as String?,
forceCanceled: json['forceCanceled'] as bool?,
jobArn: json['jobArn'] as String?,
jobExecutionsRolloutConfig: json['jobExecutionsRolloutConfig'] != null
? JobExecutionsRolloutConfig.fromJson(
json['jobExecutionsRolloutConfig'] as Map<String, dynamic>)
: null,
jobId: json['jobId'] as String?,
jobProcessDetails: json['jobProcessDetails'] != null
? JobProcessDetails.fromJson(
json['jobProcessDetails'] as Map<String, dynamic>)
: null,
lastUpdatedAt: timeStampFromJson(json['lastUpdatedAt']),
namespaceId: json['namespaceId'] as String?,
presignedUrlConfig: json['presignedUrlConfig'] != null
? PresignedUrlConfig.fromJson(
json['presignedUrlConfig'] as Map<String, dynamic>)
: null,
reasonCode: json['reasonCode'] as String?,
status: (json['status'] as String?)?.toJobStatus(),
targetSelection:
(json['targetSelection'] as String?)?.toTargetSelection(),
targets: (json['targets'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
timeoutConfig: json['timeoutConfig'] != null
? TimeoutConfig.fromJson(
json['timeoutConfig'] as Map<String, dynamic>)
: null,
);
}