toXml method

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

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final callerReference = this.callerReference;
  final comment = this.comment;
  final enabled = this.enabled;
  final s3Origin = this.s3Origin;
  final trustedSigners = this.trustedSigners;
  final aliases = this.aliases;
  final logging = this.logging;
  final priceClass = this.priceClass;
  final $children = <_s.XmlNode>[
    _s.encodeXmlStringValue('CallerReference', callerReference),
    s3Origin.toXml('S3Origin'),
    if (aliases != null) aliases.toXml('Aliases'),
    _s.encodeXmlStringValue('Comment', comment),
    if (logging != null) logging.toXml('Logging'),
    trustedSigners.toXml('TrustedSigners'),
    if (priceClass != null)
      _s.encodeXmlStringValue('PriceClass', priceClass.toValue()),
    _s.encodeXmlBoolValue('Enabled', enabled),
  ];
  final $attributes = <_s.XmlAttribute>[
    ...?attributes,
  ];
  return _s.XmlElement(
    _s.XmlName(elemName),
    $attributes,
    $children,
  );
}