LoadBalancer.fromXml constructor
LoadBalancer.fromXml(
- XmlElement elem
Implementation
factory LoadBalancer.fromXml(_s.XmlElement elem) {
return LoadBalancer(
availabilityZones: _s.extractXmlChild(elem, 'AvailabilityZones')?.let(
(elem) => elem
.findElements('member')
.map((c) => AvailabilityZone.fromXml(c))
.toList()),
canonicalHostedZoneId:
_s.extractXmlStringValue(elem, 'CanonicalHostedZoneId'),
createdTime: _s.extractXmlDateTimeValue(elem, 'CreatedTime'),
customerOwnedIpv4Pool:
_s.extractXmlStringValue(elem, 'CustomerOwnedIpv4Pool'),
dNSName: _s.extractXmlStringValue(elem, 'DNSName'),
ipAddressType:
_s.extractXmlStringValue(elem, 'IpAddressType')?.toIpAddressType(),
loadBalancerArn: _s.extractXmlStringValue(elem, 'LoadBalancerArn'),
loadBalancerName: _s.extractXmlStringValue(elem, 'LoadBalancerName'),
scheme:
_s.extractXmlStringValue(elem, 'Scheme')?.toLoadBalancerSchemeEnum(),
securityGroups: _s
.extractXmlChild(elem, 'SecurityGroups')
?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
state: _s
.extractXmlChild(elem, 'State')
?.let((e) => LoadBalancerState.fromXml(e)),
type: _s.extractXmlStringValue(elem, 'Type')?.toLoadBalancerTypeEnum(),
vpcId: _s.extractXmlStringValue(elem, 'VpcId'),
);
}