StackInstance.fromXml constructor

StackInstance.fromXml(
  1. XmlElement elem
)

Implementation

factory StackInstance.fromXml(_s.XmlElement elem) {
  return StackInstance(
    account: _s.extractXmlStringValue(elem, 'Account'),
    driftStatus:
        _s.extractXmlStringValue(elem, 'DriftStatus')?.toStackDriftStatus(),
    lastDriftCheckTimestamp:
        _s.extractXmlDateTimeValue(elem, 'LastDriftCheckTimestamp'),
    organizationalUnitId:
        _s.extractXmlStringValue(elem, 'OrganizationalUnitId'),
    parameterOverrides: _s.extractXmlChild(elem, 'ParameterOverrides')?.let(
        (elem) => elem
            .findElements('member')
            .map((c) => Parameter.fromXml(c))
            .toList()),
    region: _s.extractXmlStringValue(elem, 'Region'),
    stackId: _s.extractXmlStringValue(elem, 'StackId'),
    stackInstanceStatus: _s
        .extractXmlChild(elem, 'StackInstanceStatus')
        ?.let((e) => StackInstanceComprehensiveStatus.fromXml(e)),
    stackSetId: _s.extractXmlStringValue(elem, 'StackSetId'),
    status: _s.extractXmlStringValue(elem, 'Status')?.toStackInstanceStatus(),
    statusReason: _s.extractXmlStringValue(elem, 'StatusReason'),
  );
}