toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final enabled = this.enabled;
final bucket = this.bucket;
final format = this.format;
final prefix = this.prefix;
final reportScope = this.reportScope;
final $children = <_s.XmlNode>[
if (bucket != null) _s.encodeXmlStringValue('Bucket', bucket),
if (format != null) _s.encodeXmlStringValue('Format', format.toValue()),
_s.encodeXmlBoolValue('Enabled', enabled),
if (prefix != null) _s.encodeXmlStringValue('Prefix', prefix),
if (reportScope != null)
_s.encodeXmlStringValue('ReportScope', reportScope.toValue()),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}