EventDestination.fromXml constructor

EventDestination.fromXml(
  1. XmlElement elem
)

Implementation

factory EventDestination.fromXml(_s.XmlElement elem) {
  return EventDestination(
    matchingEventTypes: _s
        .extractXmlStringListValues(
            _s.extractXmlChild(elem, 'MatchingEventTypes')!, 'member')
        .map((s) => s.toEventType())
        .toList(),
    name: _s.extractXmlStringValue(elem, 'Name')!,
    cloudWatchDestination: _s
        .extractXmlChild(elem, 'CloudWatchDestination')
        ?.let((e) => CloudWatchDestination.fromXml(e)),
    enabled: _s.extractXmlBoolValue(elem, 'Enabled'),
    kinesisFirehoseDestination: _s
        .extractXmlChild(elem, 'KinesisFirehoseDestination')
        ?.let((e) => KinesisFirehoseDestination.fromXml(e)),
    sNSDestination: _s
        .extractXmlChild(elem, 'SNSDestination')
        ?.let((e) => SNSDestination.fromXml(e)),
  );
}