Rule.fromXml constructor

Rule.fromXml(
  1. XmlElement elem
)

Implementation

factory Rule.fromXml(_s.XmlElement elem) {
  return Rule(
    actions: _s.extractXmlChild(elem, 'Actions')?.let((elem) =>
        elem.findElements('member').map((c) => Action.fromXml(c)).toList()),
    conditions: _s.extractXmlChild(elem, 'Conditions')?.let((elem) => elem
        .findElements('member')
        .map((c) => RuleCondition.fromXml(c))
        .toList()),
    isDefault: _s.extractXmlBoolValue(elem, 'IsDefault'),
    priority: _s.extractXmlStringValue(elem, 'Priority'),
    ruleArn: _s.extractXmlStringValue(elem, 'RuleArn'),
  );
}