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