DBInstance.fromXml constructor

DBInstance.fromXml(
  1. XmlElement elem
)

Implementation

factory DBInstance.fromXml(_s.XmlElement elem) {
  return DBInstance(
    allocatedStorage: _s.extractXmlIntValue(elem, 'AllocatedStorage'),
    autoMinorVersionUpgrade:
        _s.extractXmlBoolValue(elem, 'AutoMinorVersionUpgrade'),
    availabilityZone: _s.extractXmlStringValue(elem, 'AvailabilityZone'),
    backupRetentionPeriod:
        _s.extractXmlIntValue(elem, 'BackupRetentionPeriod'),
    characterSetName: _s.extractXmlStringValue(elem, 'CharacterSetName'),
    dBInstanceClass: _s.extractXmlStringValue(elem, 'DBInstanceClass'),
    dBInstanceIdentifier:
        _s.extractXmlStringValue(elem, 'DBInstanceIdentifier'),
    dBInstanceStatus: _s.extractXmlStringValue(elem, 'DBInstanceStatus'),
    dBName: _s.extractXmlStringValue(elem, 'DBName'),
    dBParameterGroups: _s.extractXmlChild(elem, 'DBParameterGroups')?.let(
        (elem) => elem
            .findElements('DBParameterGroup')
            .map((c) => DBParameterGroupStatus.fromXml(c))
            .toList()),
    dBSecurityGroups: _s.extractXmlChild(elem, 'DBSecurityGroups')?.let(
        (elem) => elem
            .findElements('DBSecurityGroup')
            .map((c) => DBSecurityGroupMembership.fromXml(c))
            .toList()),
    dBSubnetGroup: _s
        .extractXmlChild(elem, 'DBSubnetGroup')
        ?.let((e) => DBSubnetGroup.fromXml(e)),
    endpoint:
        _s.extractXmlChild(elem, 'Endpoint')?.let((e) => Endpoint.fromXml(e)),
    engine: _s.extractXmlStringValue(elem, 'Engine'),
    engineVersion: _s.extractXmlStringValue(elem, 'EngineVersion'),
    instanceCreateTime:
        _s.extractXmlDateTimeValue(elem, 'InstanceCreateTime'),
    iops: _s.extractXmlIntValue(elem, 'Iops'),
    latestRestorableTime:
        _s.extractXmlDateTimeValue(elem, 'LatestRestorableTime'),
    licenseModel: _s.extractXmlStringValue(elem, 'LicenseModel'),
    masterUsername: _s.extractXmlStringValue(elem, 'MasterUsername'),
    multiAZ: _s.extractXmlBoolValue(elem, 'MultiAZ'),
    optionGroupMemberships: _s
        .extractXmlChild(elem, 'OptionGroupMemberships')
        ?.let((elem) => elem
            .findElements('OptionGroupMembership')
            .map((c) => OptionGroupMembership.fromXml(c))
            .toList()),
    pendingModifiedValues: _s
        .extractXmlChild(elem, 'PendingModifiedValues')
        ?.let((e) => PendingModifiedValues.fromXml(e)),
    preferredBackupWindow:
        _s.extractXmlStringValue(elem, 'PreferredBackupWindow'),
    preferredMaintenanceWindow:
        _s.extractXmlStringValue(elem, 'PreferredMaintenanceWindow'),
    publiclyAccessible: _s.extractXmlBoolValue(elem, 'PubliclyAccessible'),
    readReplicaDBInstanceIdentifiers: _s
        .extractXmlChild(elem, 'ReadReplicaDBInstanceIdentifiers')
        ?.let((elem) => _s.extractXmlStringListValues(
            elem, 'ReadReplicaDBInstanceIdentifier')),
    readReplicaSourceDBInstanceIdentifier: _s.extractXmlStringValue(
        elem, 'ReadReplicaSourceDBInstanceIdentifier'),
    secondaryAvailabilityZone:
        _s.extractXmlStringValue(elem, 'SecondaryAvailabilityZone'),
    vpcSecurityGroups: _s.extractXmlChild(elem, 'VpcSecurityGroups')?.let(
        (elem) => elem
            .findElements('VpcSecurityGroupMembership')
            .map((c) => VpcSecurityGroupMembership.fromXml(c))
            .toList()),
  );
}