Event.fromXml constructor

Event.fromXml(
  1. XmlElement elem
)

Implementation

factory Event.fromXml(_s.XmlElement elem) {
  return Event(
    date: _s.extractXmlDateTimeValue(elem, 'Date'),
    eventCategories: _s
        .extractXmlChild(elem, 'EventCategories')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'EventCategory')),
    message: _s.extractXmlStringValue(elem, 'Message'),
    sourceArn: _s.extractXmlStringValue(elem, 'SourceArn'),
    sourceIdentifier: _s.extractXmlStringValue(elem, 'SourceIdentifier'),
    sourceType: _s.extractXmlStringValue(elem, 'SourceType')?.toSourceType(),
  );
}