StackResourceDrift.fromXml constructor

StackResourceDrift.fromXml(
  1. XmlElement elem
)

Implementation

factory StackResourceDrift.fromXml(_s.XmlElement elem) {
  return StackResourceDrift(
    logicalResourceId: _s.extractXmlStringValue(elem, 'LogicalResourceId')!,
    resourceType: _s.extractXmlStringValue(elem, 'ResourceType')!,
    stackId: _s.extractXmlStringValue(elem, 'StackId')!,
    stackResourceDriftStatus: _s
        .extractXmlStringValue(elem, 'StackResourceDriftStatus')!
        .toStackResourceDriftStatus(),
    timestamp: _s.extractXmlDateTimeValue(elem, 'Timestamp')!,
    actualProperties: _s.extractXmlStringValue(elem, 'ActualProperties'),
    expectedProperties: _s.extractXmlStringValue(elem, 'ExpectedProperties'),
    moduleInfo: _s
        .extractXmlChild(elem, 'ModuleInfo')
        ?.let((e) => ModuleInfo.fromXml(e)),
    physicalResourceId: _s.extractXmlStringValue(elem, 'PhysicalResourceId'),
    physicalResourceIdContext: _s
        .extractXmlChild(elem, 'PhysicalResourceIdContext')
        ?.let((elem) => elem
            .findElements('member')
            .map((c) => PhysicalResourceIdContextKeyValuePair.fromXml(c))
            .toList()),
    propertyDifferences: _s.extractXmlChild(elem, 'PropertyDifferences')?.let(
        (elem) => elem
            .findElements('member')
            .map((c) => PropertyDifference.fromXml(c))
            .toList()),
  );
}