ReservedDBInstance.fromXml constructor

ReservedDBInstance.fromXml(
  1. XmlElement elem
)

Implementation

factory ReservedDBInstance.fromXml(_s.XmlElement elem) {
  return ReservedDBInstance(
    currencyCode: _s.extractXmlStringValue(elem, 'CurrencyCode'),
    dBInstanceClass: _s.extractXmlStringValue(elem, 'DBInstanceClass'),
    dBInstanceCount: _s.extractXmlIntValue(elem, 'DBInstanceCount'),
    duration: _s.extractXmlIntValue(elem, 'Duration'),
    fixedPrice: _s.extractXmlDoubleValue(elem, 'FixedPrice'),
    multiAZ: _s.extractXmlBoolValue(elem, 'MultiAZ'),
    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()),
    reservedDBInstanceId:
        _s.extractXmlStringValue(elem, 'ReservedDBInstanceId'),
    reservedDBInstancesOfferingId:
        _s.extractXmlStringValue(elem, 'ReservedDBInstancesOfferingId'),
    startTime: _s.extractXmlDateTimeValue(elem, 'StartTime'),
    state: _s.extractXmlStringValue(elem, 'State'),
    usagePrice: _s.extractXmlDoubleValue(elem, 'UsagePrice'),
  );
}