GetTemplateSummaryOutput.fromXml constructor

GetTemplateSummaryOutput.fromXml(
  1. XmlElement elem
)

Implementation

factory GetTemplateSummaryOutput.fromXml(_s.XmlElement elem) {
  return GetTemplateSummaryOutput(
    capabilities: _s.extractXmlChild(elem, 'Capabilities')?.let((elem) => _s
        .extractXmlStringListValues(elem, 'member')
        .map((s) => s.toCapability())
        .toList()),
    capabilitiesReason: _s.extractXmlStringValue(elem, 'CapabilitiesReason'),
    declaredTransforms: _s
        .extractXmlChild(elem, 'DeclaredTransforms')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    description: _s.extractXmlStringValue(elem, 'Description'),
    metadata: _s.extractXmlStringValue(elem, 'Metadata'),
    parameters: _s.extractXmlChild(elem, 'Parameters')?.let((elem) => elem
        .findElements('member')
        .map((c) => ParameterDeclaration.fromXml(c))
        .toList()),
    resourceIdentifierSummaries: _s
        .extractXmlChild(elem, 'ResourceIdentifierSummaries')
        ?.let((elem) => elem
            .findElements('member')
            .map((c) => ResourceIdentifierSummary.fromXml(c))
            .toList()),
    resourceTypes: _s
        .extractXmlChild(elem, 'ResourceTypes')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    version: _s.extractXmlStringValue(elem, 'Version'),
  );
}