LifecycleRule.fromXml constructor
LifecycleRule.fromXml(
- XmlElement elem
Implementation
factory LifecycleRule.fromXml(_s.XmlElement elem) {
return LifecycleRule(
status: _s.extractXmlStringValue(elem, 'Status')!.toExpirationStatus(),
abortIncompleteMultipartUpload: _s
.extractXmlChild(elem, 'AbortIncompleteMultipartUpload')
?.let((e) => AbortIncompleteMultipartUpload.fromXml(e)),
expiration: _s
.extractXmlChild(elem, 'Expiration')
?.let((e) => LifecycleExpiration.fromXml(e)),
filter: _s
.extractXmlChild(elem, 'Filter')
?.let((e) => LifecycleRuleFilter.fromXml(e)),
id: _s.extractXmlStringValue(elem, 'ID'),
noncurrentVersionExpiration: _s
.extractXmlChild(elem, 'NoncurrentVersionExpiration')
?.let((e) => NoncurrentVersionExpiration.fromXml(e)),
noncurrentVersionTransitions: _s
.extractXmlChild(elem, 'NoncurrentVersionTransitions')
?.let((elem) => elem
.findElements('NoncurrentVersionTransition')
.map((c) => NoncurrentVersionTransition.fromXml(c))
.toList()),
transitions: _s.extractXmlChild(elem, 'Transitions')?.let((elem) => elem
.findElements('Transition')
.map((c) => Transition.fromXml(c))
.toList()),
);
}