Stack.fromXml constructor

Stack.fromXml(
  1. XmlElement elem
)

Implementation

factory Stack.fromXml(_s.XmlElement elem) {
  return Stack(
    creationTime: _s.extractXmlDateTimeValue(elem, 'CreationTime')!,
    stackName: _s.extractXmlStringValue(elem, 'StackName')!,
    stackStatus:
        _s.extractXmlStringValue(elem, 'StackStatus')!.toStackStatus(),
    capabilities: _s.extractXmlChild(elem, 'Capabilities')?.let((elem) => _s
        .extractXmlStringListValues(elem, 'member')
        .map((s) => s.toCapability())
        .toList()),
    changeSetId: _s.extractXmlStringValue(elem, 'ChangeSetId'),
    deletionTime: _s.extractXmlDateTimeValue(elem, 'DeletionTime'),
    description: _s.extractXmlStringValue(elem, 'Description'),
    disableRollback: _s.extractXmlBoolValue(elem, 'DisableRollback'),
    driftInformation: _s
        .extractXmlChild(elem, 'DriftInformation')
        ?.let((e) => StackDriftInformation.fromXml(e)),
    enableTerminationProtection:
        _s.extractXmlBoolValue(elem, 'EnableTerminationProtection'),
    lastUpdatedTime: _s.extractXmlDateTimeValue(elem, 'LastUpdatedTime'),
    notificationARNs: _s
        .extractXmlChild(elem, 'NotificationARNs')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    outputs: _s.extractXmlChild(elem, 'Outputs')?.let((elem) =>
        elem.findElements('member').map((c) => Output.fromXml(c)).toList()),
    parameters: _s.extractXmlChild(elem, 'Parameters')?.let((elem) => elem
        .findElements('member')
        .map((c) => Parameter.fromXml(c))
        .toList()),
    parentId: _s.extractXmlStringValue(elem, 'ParentId'),
    roleARN: _s.extractXmlStringValue(elem, 'RoleARN'),
    rollbackConfiguration: _s
        .extractXmlChild(elem, 'RollbackConfiguration')
        ?.let((e) => RollbackConfiguration.fromXml(e)),
    rootId: _s.extractXmlStringValue(elem, 'RootId'),
    stackId: _s.extractXmlStringValue(elem, 'StackId'),
    stackStatusReason: _s.extractXmlStringValue(elem, 'StackStatusReason'),
    tags: _s.extractXmlChild(elem, 'Tags')?.let((elem) =>
        elem.findElements('member').map((c) => Tag.fromXml(c)).toList()),
    timeoutInMinutes: _s.extractXmlIntValue(elem, 'TimeoutInMinutes'),
  );
}