ResourceRecordSet.fromXml constructor
ResourceRecordSet.fromXml(
- XmlElement elem
Implementation
factory ResourceRecordSet.fromXml(_s.XmlElement elem) {
return ResourceRecordSet(
name: _s.extractXmlStringValue(elem, 'Name')!,
type: _s.extractXmlStringValue(elem, 'Type')!.toRRType(),
aliasTarget: _s
.extractXmlChild(elem, 'AliasTarget')
?.let((e) => AliasTarget.fromXml(e)),
failover: _s
.extractXmlStringValue(elem, 'Failover')
?.toResourceRecordSetFailover(),
geoLocation: _s
.extractXmlChild(elem, 'GeoLocation')
?.let((e) => GeoLocation.fromXml(e)),
healthCheckId: _s.extractXmlStringValue(elem, 'HealthCheckId'),
multiValueAnswer: _s.extractXmlBoolValue(elem, 'MultiValueAnswer'),
region:
_s.extractXmlStringValue(elem, 'Region')?.toResourceRecordSetRegion(),
resourceRecords: _s.extractXmlChild(elem, 'ResourceRecords')?.let(
(elem) => elem
.findElements('ResourceRecord')
.map((c) => ResourceRecord.fromXml(c))
.toList()),
setIdentifier: _s.extractXmlStringValue(elem, 'SetIdentifier'),
ttl: _s.extractXmlIntValue(elem, 'TTL'),
trafficPolicyInstanceId:
_s.extractXmlStringValue(elem, 'TrafficPolicyInstanceId'),
weight: _s.extractXmlIntValue(elem, 'Weight'),
);
}