toXml method

XmlNode toXml()

Implementation

XmlNode toXml() {
  final builder = XmlBuilder();
  builder.element('ReplicationRule', nest: () {
    if (deleteMarkerReplication != null) {
      builder.element('DeleteMarkerReplication',
          nest: deleteMarkerReplication!.toXml());
    }
    if (destination != null) {
      builder.element('Destination', nest: destination!.toXml());
    }
    if (existingObjectReplication != null) {
      builder.element('ExistingObjectReplication',
          nest: existingObjectReplication!.toXml());
    }
    if (filter != null) {
      builder.element('Filter', nest: filter!.toXml());
    }
    if (iD != null) {
      builder.element('ID', nest: iD);
    }
    if (prefix != null) {
      builder.element('Prefix', nest: prefix);
    }
    if (priority != null) {
      builder.element('Priority', nest: priority.toString());
    }
    if (sourceSelectionCriteria != null) {
      builder.element('SourceSelectionCriteria',
          nest: sourceSelectionCriteria!.toXml());
    }
    if (status != null) {
      builder.element('Status', nest: status);
    }
  });
  return builder.buildDocument();
}