GetBucketWebsiteOutput.fromXml constructor

GetBucketWebsiteOutput.fromXml(
  1. XmlElement elem
)

Implementation

factory GetBucketWebsiteOutput.fromXml(_s.XmlElement elem) {
  return GetBucketWebsiteOutput(
    errorDocument: _s
        .extractXmlChild(elem, 'ErrorDocument')
        ?.let((e) => ErrorDocument.fromXml(e)),
    indexDocument: _s
        .extractXmlChild(elem, 'IndexDocument')
        ?.let((e) => IndexDocument.fromXml(e)),
    redirectAllRequestsTo: _s
        .extractXmlChild(elem, 'RedirectAllRequestsTo')
        ?.let((e) => RedirectAllRequestsTo.fromXml(e)),
    routingRules: _s.extractXmlChild(elem, 'RoutingRules')?.let((elem) => elem
        .findElements('RoutingRule')
        .map((c) => RoutingRule.fromXml(c))
        .toList()),
  );
}