LoadBalancerDescription.fromXml constructor

LoadBalancerDescription.fromXml(
  1. XmlElement elem
)

Implementation

factory LoadBalancerDescription.fromXml(_s.XmlElement elem) {
  return LoadBalancerDescription(
    availabilityZones: _s
        .extractXmlChild(elem, 'AvailabilityZones')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    backendServerDescriptions: _s
        .extractXmlChild(elem, 'BackendServerDescriptions')
        ?.let((elem) => elem
            .findElements('member')
            .map((c) => BackendServerDescription.fromXml(c))
            .toList()),
    canonicalHostedZoneName:
        _s.extractXmlStringValue(elem, 'CanonicalHostedZoneName'),
    canonicalHostedZoneNameID:
        _s.extractXmlStringValue(elem, 'CanonicalHostedZoneNameID'),
    createdTime: _s.extractXmlDateTimeValue(elem, 'CreatedTime'),
    dNSName: _s.extractXmlStringValue(elem, 'DNSName'),
    healthCheck: _s
        .extractXmlChild(elem, 'HealthCheck')
        ?.let((e) => HealthCheck.fromXml(e)),
    instances: _s.extractXmlChild(elem, 'Instances')?.let((elem) =>
        elem.findElements('member').map((c) => Instance.fromXml(c)).toList()),
    listenerDescriptions: _s
        .extractXmlChild(elem, 'ListenerDescriptions')
        ?.let((elem) => elem
            .findElements('member')
            .map((c) => ListenerDescription.fromXml(c))
            .toList()),
    loadBalancerName: _s.extractXmlStringValue(elem, 'LoadBalancerName'),
    policies:
        _s.extractXmlChild(elem, 'Policies')?.let((e) => Policies.fromXml(e)),
    scheme: _s.extractXmlStringValue(elem, 'Scheme'),
    securityGroups: _s
        .extractXmlChild(elem, 'SecurityGroups')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    sourceSecurityGroup: _s
        .extractXmlChild(elem, 'SourceSecurityGroup')
        ?.let((e) => SourceSecurityGroup.fromXml(e)),
    subnets: _s
        .extractXmlChild(elem, 'Subnets')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    vPCId: _s.extractXmlStringValue(elem, 'VPCId'),
  );
}