JobDescriptor.fromXml constructor
JobDescriptor.fromXml(
- XmlElement elem
Implementation
factory JobDescriptor.fromXml(_s.XmlElement elem) {
return JobDescriptor(
confirmationRequired:
_s.extractXmlBoolValue(elem, 'ConfirmationRequired'),
creationTime: _s.extractXmlDateTimeValue(elem, 'CreationTime'),
description: _s.extractXmlStringValue(elem, 'Description'),
failureReasons: _s.extractXmlChild(elem, 'FailureReasons')?.let((elem) =>
elem
.findElements('member')
.map((c) => JobFailure.fromXml(c))
.toList()),
jobArn: _s.extractXmlStringValue(elem, 'JobArn'),
jobId: _s.extractXmlStringValue(elem, 'JobId'),
manifest: _s
.extractXmlChild(elem, 'Manifest')
?.let((e) => JobManifest.fromXml(e)),
operation: _s
.extractXmlChild(elem, 'Operation')
?.let((e) => JobOperation.fromXml(e)),
priority: _s.extractXmlIntValue(elem, 'Priority'),
progressSummary: _s
.extractXmlChild(elem, 'ProgressSummary')
?.let((e) => JobProgressSummary.fromXml(e)),
report:
_s.extractXmlChild(elem, 'Report')?.let((e) => JobReport.fromXml(e)),
roleArn: _s.extractXmlStringValue(elem, 'RoleArn'),
status: _s.extractXmlStringValue(elem, 'Status')?.toJobStatus(),
statusUpdateReason: _s.extractXmlStringValue(elem, 'StatusUpdateReason'),
suspendedCause: _s.extractXmlStringValue(elem, 'SuspendedCause'),
suspendedDate: _s.extractXmlDateTimeValue(elem, 'SuspendedDate'),
terminationDate: _s.extractXmlDateTimeValue(elem, 'TerminationDate'),
);
}