Option.fromXml constructor

Option.fromXml(
  1. XmlElement elem
)

Implementation

factory Option.fromXml(_s.XmlElement elem) {
  return Option(
    dBSecurityGroupMemberships: _s
        .extractXmlChild(elem, 'DBSecurityGroupMemberships')
        ?.let((elem) => elem
            .findElements('DBSecurityGroup')
            .map((c) => DBSecurityGroupMembership.fromXml(c))
            .toList()),
    optionDescription: _s.extractXmlStringValue(elem, 'OptionDescription'),
    optionName: _s.extractXmlStringValue(elem, 'OptionName'),
    optionSettings: _s.extractXmlChild(elem, 'OptionSettings')?.let((elem) =>
        elem
            .findElements('OptionSetting')
            .map((c) => OptionSetting.fromXml(c))
            .toList()),
    permanent: _s.extractXmlBoolValue(elem, 'Permanent'),
    persistent: _s.extractXmlBoolValue(elem, 'Persistent'),
    port: _s.extractXmlIntValue(elem, 'Port'),
    vpcSecurityGroupMemberships: _s
        .extractXmlChild(elem, 'VpcSecurityGroupMemberships')
        ?.let((elem) => elem
            .findElements('VpcSecurityGroupMembership')
            .map((c) => VpcSecurityGroupMembership.fromXml(c))
            .toList()),
  );
}