ResourceChange.fromXml constructor

ResourceChange.fromXml(
  1. XmlElement elem
)

Implementation

factory ResourceChange.fromXml(_s.XmlElement elem) {
  return ResourceChange(
    action: _s.extractXmlStringValue(elem, 'Action')?.toChangeAction(),
    changeSetId: _s.extractXmlStringValue(elem, 'ChangeSetId'),
    details: _s.extractXmlChild(elem, 'Details')?.let((elem) => elem
        .findElements('member')
        .map((c) => ResourceChangeDetail.fromXml(c))
        .toList()),
    logicalResourceId: _s.extractXmlStringValue(elem, 'LogicalResourceId'),
    moduleInfo: _s
        .extractXmlChild(elem, 'ModuleInfo')
        ?.let((e) => ModuleInfo.fromXml(e)),
    physicalResourceId: _s.extractXmlStringValue(elem, 'PhysicalResourceId'),
    replacement:
        _s.extractXmlStringValue(elem, 'Replacement')?.toReplacement(),
    resourceType: _s.extractXmlStringValue(elem, 'ResourceType'),
    scope: _s.extractXmlChild(elem, 'Scope')?.let((elem) => _s
        .extractXmlStringListValues(elem, 'member')
        .map((s) => s.toResourceAttribute())
        .toList()),
  );
}