ReplicationRule.fromXml constructor

ReplicationRule.fromXml(
  1. XmlElement elem
)

Implementation

factory ReplicationRule.fromXml(_s.XmlElement elem) {
  return ReplicationRule(
    destination:
        Destination.fromXml(_s.extractXmlChild(elem, 'Destination')!),
    status:
        _s.extractXmlStringValue(elem, 'Status')!.toReplicationRuleStatus(),
    deleteMarkerReplication: _s
        .extractXmlChild(elem, 'DeleteMarkerReplication')
        ?.let((e) => DeleteMarkerReplication.fromXml(e)),
    existingObjectReplication: _s
        .extractXmlChild(elem, 'ExistingObjectReplication')
        ?.let((e) => ExistingObjectReplication.fromXml(e)),
    filter: _s
        .extractXmlChild(elem, 'Filter')
        ?.let((e) => ReplicationRuleFilter.fromXml(e)),
    id: _s.extractXmlStringValue(elem, 'ID'),
    prefix: _s.extractXmlStringValue(elem, 'Prefix'),
    priority: _s.extractXmlIntValue(elem, 'Priority'),
    sourceSelectionCriteria: _s
        .extractXmlChild(elem, 'SourceSelectionCriteria')
        ?.let((e) => SourceSelectionCriteria.fromXml(e)),
  );
}