Listener.fromXml constructor

Listener.fromXml(
  1. XmlElement elem
)

Implementation

factory Listener.fromXml(_s.XmlElement elem) {
  return Listener(
    alpnPolicy: _s
        .extractXmlChild(elem, 'AlpnPolicy')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    certificates: _s.extractXmlChild(elem, 'Certificates')?.let((elem) => elem
        .findElements('member')
        .map((c) => Certificate.fromXml(c))
        .toList()),
    defaultActions: _s.extractXmlChild(elem, 'DefaultActions')?.let((elem) =>
        elem.findElements('member').map((c) => Action.fromXml(c)).toList()),
    listenerArn: _s.extractXmlStringValue(elem, 'ListenerArn'),
    loadBalancerArn: _s.extractXmlStringValue(elem, 'LoadBalancerArn'),
    port: _s.extractXmlIntValue(elem, 'Port'),
    protocol: _s.extractXmlStringValue(elem, 'Protocol')?.toProtocolEnum(),
    sslPolicy: _s.extractXmlStringValue(elem, 'SslPolicy'),
  );
}