toXml method

XmlElement toXml(
  1. String elemName, {
  2. List<XmlAttribute>? attributes,
})

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final events = this.events;
  final queueArn = this.queueArn;
  final filter = this.filter;
  final id = this.id;
  final $children = <_s.XmlNode>[
    if (id != null) _s.encodeXmlStringValue('Id', id),
    _s.encodeXmlStringValue('Queue', queueArn),
    ...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,
  );
}