RoleDetail.fromXml constructor
RoleDetail.fromXml(
- XmlElement elem
Implementation
factory RoleDetail.fromXml(_s.XmlElement elem) {
return RoleDetail(
arn: _s.extractXmlStringValue(elem, 'Arn'),
assumeRolePolicyDocument:
_s.extractXmlStringValue(elem, 'AssumeRolePolicyDocument'),
attachedManagedPolicies: _s
.extractXmlChild(elem, 'AttachedManagedPolicies')
?.let((elem) => elem
.findElements('member')
.map((c) => AttachedPolicy.fromXml(c))
.toList()),
createDate: _s.extractXmlDateTimeValue(elem, 'CreateDate'),
instanceProfileList: _s.extractXmlChild(elem, 'InstanceProfileList')?.let(
(elem) => elem
.findElements('member')
.map((c) => InstanceProfile.fromXml(c))
.toList()),
path: _s.extractXmlStringValue(elem, 'Path'),
permissionsBoundary: _s
.extractXmlChild(elem, 'PermissionsBoundary')
?.let((e) => AttachedPermissionsBoundary.fromXml(e)),
roleId: _s.extractXmlStringValue(elem, 'RoleId'),
roleLastUsed: _s
.extractXmlChild(elem, 'RoleLastUsed')
?.let((e) => RoleLastUsed.fromXml(e)),
roleName: _s.extractXmlStringValue(elem, 'RoleName'),
rolePolicyList: _s.extractXmlChild(elem, 'RolePolicyList')?.let((elem) =>
elem
.findElements('member')
.map((c) => PolicyDetail.fromXml(c))
.toList()),
tags: _s.extractXmlChild(elem, 'Tags')?.let((elem) =>
elem.findElements('member').map((c) => Tag.fromXml(c)).toList()),
);
}