ReservedCacheNode.fromXml constructor

ReservedCacheNode.fromXml(
  1. XmlElement elem
)

Implementation

factory ReservedCacheNode.fromXml(_s.XmlElement elem) {
  return ReservedCacheNode(
    cacheNodeCount: _s.extractXmlIntValue(elem, 'CacheNodeCount'),
    cacheNodeType: _s.extractXmlStringValue(elem, 'CacheNodeType'),
    duration: _s.extractXmlIntValue(elem, 'Duration'),
    fixedPrice: _s.extractXmlDoubleValue(elem, 'FixedPrice'),
    offeringType: _s.extractXmlStringValue(elem, 'OfferingType'),
    productDescription: _s.extractXmlStringValue(elem, 'ProductDescription'),
    recurringCharges: _s.extractXmlChild(elem, 'RecurringCharges')?.let(
        (elem) => elem
            .findElements('RecurringCharge')
            .map((c) => RecurringCharge.fromXml(c))
            .toList()),
    reservationARN: _s.extractXmlStringValue(elem, 'ReservationARN'),
    reservedCacheNodeId:
        _s.extractXmlStringValue(elem, 'ReservedCacheNodeId'),
    reservedCacheNodesOfferingId:
        _s.extractXmlStringValue(elem, 'ReservedCacheNodesOfferingId'),
    startTime: _s.extractXmlDateTimeValue(elem, 'StartTime'),
    state: _s.extractXmlStringValue(elem, 'State'),
    usagePrice: _s.extractXmlDoubleValue(elem, 'UsagePrice'),
  );
}