Role.fromXml constructor
Role.fromXml(
- XmlElement elem
Implementation
factory Role.fromXml(_s.XmlElement elem) {
return Role(
arn: _s.extractXmlStringValue(elem, 'Arn')!,
createDate: _s.extractXmlDateTimeValue(elem, 'CreateDate')!,
path: _s.extractXmlStringValue(elem, 'Path')!,
roleId: _s.extractXmlStringValue(elem, 'RoleId')!,
roleName: _s.extractXmlStringValue(elem, 'RoleName')!,
assumeRolePolicyDocument:
_s.extractXmlStringValue(elem, 'AssumeRolePolicyDocument'),
description: _s.extractXmlStringValue(elem, 'Description'),
maxSessionDuration: _s.extractXmlIntValue(elem, 'MaxSessionDuration'),
permissionsBoundary: _s
.extractXmlChild(elem, 'PermissionsBoundary')
?.let((e) => AttachedPermissionsBoundary.fromXml(e)),
roleLastUsed: _s
.extractXmlChild(elem, 'RoleLastUsed')
?.let((e) => RoleLastUsed.fromXml(e)),
tags: _s.extractXmlChild(elem, 'Tags')?.let((elem) =>
elem.findElements('member').map((c) => Tag.fromXml(c)).toList()),
);
}