ResourceSpecificResult.fromXml constructor
ResourceSpecificResult.fromXml(
- XmlElement elem
Implementation
factory ResourceSpecificResult.fromXml(_s.XmlElement elem) {
return ResourceSpecificResult(
evalResourceDecision: _s
.extractXmlStringValue(elem, 'EvalResourceDecision')!
.toPolicyEvaluationDecisionType(),
evalResourceName: _s.extractXmlStringValue(elem, 'EvalResourceName')!,
evalDecisionDetails: Map.fromEntries(
elem.getElement('EvalDecisionDetails')?.findElements('entry').map(
(c) => MapEntry(
_s.extractXmlStringValue(c, 'key')!,
_s
.extractXmlStringValue(c, 'value')!
.toPolicyEvaluationDecisionType(),
),
) ??
{},
),
matchedStatements: _s.extractXmlChild(elem, 'MatchedStatements')?.let(
(elem) => elem
.findElements('member')
.map((c) => Statement.fromXml(c))
.toList()),
missingContextValues: _s
.extractXmlChild(elem, 'MissingContextValues')
?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
permissionsBoundaryDecisionDetail: _s
.extractXmlChild(elem, 'PermissionsBoundaryDecisionDetail')
?.let((e) => PermissionsBoundaryDecisionDetail.fromXml(e)),
);
}