toXml method

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

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final days = this.days;
  final description = this.description;
  final glacierJobParameters = this.glacierJobParameters;
  final outputLocation = this.outputLocation;
  final selectParameters = this.selectParameters;
  final tier = this.tier;
  final type = this.type;
  final $children = <_s.XmlNode>[
    if (days != null) _s.encodeXmlIntValue('Days', days),
    if (glacierJobParameters != null)
      glacierJobParameters.toXml('GlacierJobParameters'),
    if (type != null) _s.encodeXmlStringValue('Type', type.toValue()),
    if (tier != null) _s.encodeXmlStringValue('Tier', tier.toValue()),
    if (description != null)
      _s.encodeXmlStringValue('Description', description),
    if (selectParameters != null) selectParameters.toXml('SelectParameters'),
    if (outputLocation != null) outputLocation.toXml('OutputLocation'),
  ];
  final $attributes = <_s.XmlAttribute>[
    ...?attributes,
  ];
  return _s.XmlElement(
    _s.XmlName(elemName),
    $attributes,
    $children,
  );
}