toXml method

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

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final accountLevel = this.accountLevel;
  final id = this.id;
  final isEnabled = this.isEnabled;
  final awsOrg = this.awsOrg;
  final dataExport = this.dataExport;
  final exclude = this.exclude;
  final include = this.include;
  final storageLensArn = this.storageLensArn;
  final $children = <_s.XmlNode>[
    _s.encodeXmlStringValue('Id', id),
    accountLevel.toXml('AccountLevel'),
    if (include != null) include.toXml('Include'),
    if (exclude != null) exclude.toXml('Exclude'),
    if (dataExport != null) dataExport.toXml('DataExport'),
    _s.encodeXmlBoolValue('IsEnabled', isEnabled),
    if (awsOrg != null) awsOrg.toXml('AwsOrg'),
    if (storageLensArn != null)
      _s.encodeXmlStringValue('StorageLensArn', storageLensArn),
  ];
  final $attributes = <_s.XmlAttribute>[
    ...?attributes,
  ];
  return _s.XmlElement(
    _s.XmlName(elemName),
    $attributes,
    $children,
  );
}