toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final events = this.events;
final lambdaFunctionArn = this.lambdaFunctionArn;
final filter = this.filter;
final id = this.id;
final $children = <_s.XmlNode>[
if (id != null) _s.encodeXmlStringValue('Id', id),
_s.encodeXmlStringValue('CloudFunction', lambdaFunctionArn),
...events.map((e) => _s.encodeXmlStringValue('Event', e.toValue())),
if (filter != null) filter.toXml('Filter'),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}