EventSubscription.fromXml constructor

EventSubscription.fromXml(
  1. XmlElement elem
)

Implementation

factory EventSubscription.fromXml(_s.XmlElement elem) {
  return EventSubscription(
    custSubscriptionId: _s.extractXmlStringValue(elem, 'CustSubscriptionId'),
    customerAwsId: _s.extractXmlStringValue(elem, 'CustomerAwsId'),
    enabled: _s.extractXmlBoolValue(elem, 'Enabled'),
    eventCategoriesList: _s
        .extractXmlChild(elem, 'EventCategoriesList')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'EventCategory')),
    severity: _s.extractXmlStringValue(elem, 'Severity'),
    snsTopicArn: _s.extractXmlStringValue(elem, 'SnsTopicArn'),
    sourceIdsList: _s
        .extractXmlChild(elem, 'SourceIdsList')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'SourceId')),
    sourceType: _s.extractXmlStringValue(elem, 'SourceType'),
    status: _s.extractXmlStringValue(elem, 'Status'),
    subscriptionCreationTime:
        _s.extractXmlDateTimeValue(elem, 'SubscriptionCreationTime'),
    tags: _s.extractXmlChild(elem, 'Tags')?.let((elem) =>
        elem.findElements('Tag').map((c) => Tag.fromXml(c)).toList()),
  );
}