toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final destination = this.destination;
final id = this.id;
final includedObjectVersions = this.includedObjectVersions;
final isEnabled = this.isEnabled;
final schedule = this.schedule;
final filter = this.filter;
final optionalFields = this.optionalFields;
final $children = <_s.XmlNode>[
destination.toXml('Destination'),
_s.encodeXmlBoolValue('IsEnabled', isEnabled),
if (filter != null) filter.toXml('Filter'),
_s.encodeXmlStringValue('Id', id),
_s.encodeXmlStringValue(
'IncludedObjectVersions', includedObjectVersions.toValue()),
if (optionalFields != null)
_s.XmlElement(
_s.XmlName('OptionalFields'),
[],
optionalFields
.map((e) => _s.encodeXmlStringValue('Field', e.toValue()))),
schedule.toXml('Schedule'),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}