toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final type = this.type;
final alarmIdentifier = this.alarmIdentifier;
final childHealthChecks = this.childHealthChecks;
final disabled = this.disabled;
final enableSNI = this.enableSNI;
final failureThreshold = this.failureThreshold;
final fullyQualifiedDomainName = this.fullyQualifiedDomainName;
final healthThreshold = this.healthThreshold;
final iPAddress = this.iPAddress;
final insufficientDataHealthStatus = this.insufficientDataHealthStatus;
final inverted = this.inverted;
final measureLatency = this.measureLatency;
final port = this.port;
final regions = this.regions;
final requestInterval = this.requestInterval;
final resourcePath = this.resourcePath;
final searchString = this.searchString;
final $children = <_s.XmlNode>[
if (iPAddress != null) _s.encodeXmlStringValue('IPAddress', iPAddress),
if (port != null) _s.encodeXmlIntValue('Port', port),
_s.encodeXmlStringValue('Type', type.toValue()),
if (resourcePath != null)
_s.encodeXmlStringValue('ResourcePath', resourcePath),
if (fullyQualifiedDomainName != null)
_s.encodeXmlStringValue(
'FullyQualifiedDomainName', fullyQualifiedDomainName),
if (searchString != null)
_s.encodeXmlStringValue('SearchString', searchString),
if (requestInterval != null)
_s.encodeXmlIntValue('RequestInterval', requestInterval),
if (failureThreshold != null)
_s.encodeXmlIntValue('FailureThreshold', failureThreshold),
if (measureLatency != null)
_s.encodeXmlBoolValue('MeasureLatency', measureLatency),
if (inverted != null) _s.encodeXmlBoolValue('Inverted', inverted),
if (disabled != null) _s.encodeXmlBoolValue('Disabled', disabled),
if (healthThreshold != null)
_s.encodeXmlIntValue('HealthThreshold', healthThreshold),
if (childHealthChecks != null)
_s.XmlElement(
_s.XmlName('ChildHealthChecks'),
[],
childHealthChecks
.map((e) => _s.encodeXmlStringValue('ChildHealthCheck', e))),
if (enableSNI != null) _s.encodeXmlBoolValue('EnableSNI', enableSNI),
if (regions != null)
_s.XmlElement(_s.XmlName('Regions'), [],
regions.map((e) => _s.encodeXmlStringValue('Region', e.toValue()))),
if (alarmIdentifier != null) alarmIdentifier.toXml('AlarmIdentifier'),
if (insufficientDataHealthStatus != null)
_s.encodeXmlStringValue('InsufficientDataHealthStatus',
insufficientDataHealthStatus.toValue()),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}