StackSet.fromXml constructor

StackSet.fromXml(
  1. XmlElement elem
)

Implementation

factory StackSet.fromXml(_s.XmlElement elem) {
  return StackSet(
    administrationRoleARN:
        _s.extractXmlStringValue(elem, 'AdministrationRoleARN'),
    autoDeployment: _s
        .extractXmlChild(elem, 'AutoDeployment')
        ?.let((e) => AutoDeployment.fromXml(e)),
    capabilities: _s.extractXmlChild(elem, 'Capabilities')?.let((elem) => _s
        .extractXmlStringListValues(elem, 'member')
        .map((s) => s.toCapability())
        .toList()),
    description: _s.extractXmlStringValue(elem, 'Description'),
    executionRoleName: _s.extractXmlStringValue(elem, 'ExecutionRoleName'),
    organizationalUnitIds: _s
        .extractXmlChild(elem, 'OrganizationalUnitIds')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    parameters: _s.extractXmlChild(elem, 'Parameters')?.let((elem) => elem
        .findElements('member')
        .map((c) => Parameter.fromXml(c))
        .toList()),
    permissionModel: _s
        .extractXmlStringValue(elem, 'PermissionModel')
        ?.toPermissionModels(),
    stackSetARN: _s.extractXmlStringValue(elem, 'StackSetARN'),
    stackSetDriftDetectionDetails: _s
        .extractXmlChild(elem, 'StackSetDriftDetectionDetails')
        ?.let((e) => StackSetDriftDetectionDetails.fromXml(e)),
    stackSetId: _s.extractXmlStringValue(elem, 'StackSetId'),
    stackSetName: _s.extractXmlStringValue(elem, 'StackSetName'),
    status: _s.extractXmlStringValue(elem, 'Status')?.toStackSetStatus(),
    tags: _s.extractXmlChild(elem, 'Tags')?.let((elem) =>
        elem.findElements('member').map((c) => Tag.fromXml(c)).toList()),
    templateBody: _s.extractXmlStringValue(elem, 'TemplateBody'),
  );
}