Cluster.fromXml constructor

Cluster.fromXml(
  1. XmlElement elem
)

Implementation

factory Cluster.fromXml(_s.XmlElement elem) {
  return Cluster(
    allowVersionUpgrade: _s.extractXmlBoolValue(elem, 'AllowVersionUpgrade'),
    automatedSnapshotRetentionPeriod:
        _s.extractXmlIntValue(elem, 'AutomatedSnapshotRetentionPeriod'),
    availabilityZone: _s.extractXmlStringValue(elem, 'AvailabilityZone'),
    availabilityZoneRelocationStatus:
        _s.extractXmlStringValue(elem, 'AvailabilityZoneRelocationStatus'),
    clusterAvailabilityStatus:
        _s.extractXmlStringValue(elem, 'ClusterAvailabilityStatus'),
    clusterCreateTime: _s.extractXmlDateTimeValue(elem, 'ClusterCreateTime'),
    clusterIdentifier: _s.extractXmlStringValue(elem, 'ClusterIdentifier'),
    clusterNamespaceArn:
        _s.extractXmlStringValue(elem, 'ClusterNamespaceArn'),
    clusterNodes: _s.extractXmlChild(elem, 'ClusterNodes')?.let((elem) => elem
        .findElements('member')
        .map((c) => ClusterNode.fromXml(c))
        .toList()),
    clusterParameterGroups: _s
        .extractXmlChild(elem, 'ClusterParameterGroups')
        ?.let((elem) => elem
            .findElements('ClusterParameterGroup')
            .map((c) => ClusterParameterGroupStatus.fromXml(c))
            .toList()),
    clusterPublicKey: _s.extractXmlStringValue(elem, 'ClusterPublicKey'),
    clusterRevisionNumber:
        _s.extractXmlStringValue(elem, 'ClusterRevisionNumber'),
    clusterSecurityGroups: _s
        .extractXmlChild(elem, 'ClusterSecurityGroups')
        ?.let((elem) => elem
            .findElements('ClusterSecurityGroup')
            .map((c) => ClusterSecurityGroupMembership.fromXml(c))
            .toList()),
    clusterSnapshotCopyStatus: _s
        .extractXmlChild(elem, 'ClusterSnapshotCopyStatus')
        ?.let((e) => ClusterSnapshotCopyStatus.fromXml(e)),
    clusterStatus: _s.extractXmlStringValue(elem, 'ClusterStatus'),
    clusterSubnetGroupName:
        _s.extractXmlStringValue(elem, 'ClusterSubnetGroupName'),
    clusterVersion: _s.extractXmlStringValue(elem, 'ClusterVersion'),
    dBName: _s.extractXmlStringValue(elem, 'DBName'),
    dataTransferProgress: _s
        .extractXmlChild(elem, 'DataTransferProgress')
        ?.let((e) => DataTransferProgress.fromXml(e)),
    deferredMaintenanceWindows: _s
        .extractXmlChild(elem, 'DeferredMaintenanceWindows')
        ?.let((elem) => elem
            .findElements('DeferredMaintenanceWindow')
            .map((c) => DeferredMaintenanceWindow.fromXml(c))
            .toList()),
    elasticIpStatus: _s
        .extractXmlChild(elem, 'ElasticIpStatus')
        ?.let((e) => ElasticIpStatus.fromXml(e)),
    elasticResizeNumberOfNodeOptions:
        _s.extractXmlStringValue(elem, 'ElasticResizeNumberOfNodeOptions'),
    encrypted: _s.extractXmlBoolValue(elem, 'Encrypted'),
    endpoint:
        _s.extractXmlChild(elem, 'Endpoint')?.let((e) => Endpoint.fromXml(e)),
    enhancedVpcRouting: _s.extractXmlBoolValue(elem, 'EnhancedVpcRouting'),
    expectedNextSnapshotScheduleTime:
        _s.extractXmlDateTimeValue(elem, 'ExpectedNextSnapshotScheduleTime'),
    expectedNextSnapshotScheduleTimeStatus: _s.extractXmlStringValue(
        elem, 'ExpectedNextSnapshotScheduleTimeStatus'),
    hsmStatus: _s
        .extractXmlChild(elem, 'HsmStatus')
        ?.let((e) => HsmStatus.fromXml(e)),
    iamRoles: _s.extractXmlChild(elem, 'IamRoles')?.let((elem) => elem
        .findElements('ClusterIamRole')
        .map((c) => ClusterIamRole.fromXml(c))
        .toList()),
    kmsKeyId: _s.extractXmlStringValue(elem, 'KmsKeyId'),
    maintenanceTrackName:
        _s.extractXmlStringValue(elem, 'MaintenanceTrackName'),
    manualSnapshotRetentionPeriod:
        _s.extractXmlIntValue(elem, 'ManualSnapshotRetentionPeriod'),
    masterUsername: _s.extractXmlStringValue(elem, 'MasterUsername'),
    modifyStatus: _s.extractXmlStringValue(elem, 'ModifyStatus'),
    nextMaintenanceWindowStartTime:
        _s.extractXmlDateTimeValue(elem, 'NextMaintenanceWindowStartTime'),
    nodeType: _s.extractXmlStringValue(elem, 'NodeType'),
    numberOfNodes: _s.extractXmlIntValue(elem, 'NumberOfNodes'),
    pendingActions: _s
        .extractXmlChild(elem, 'PendingActions')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    pendingModifiedValues: _s
        .extractXmlChild(elem, 'PendingModifiedValues')
        ?.let((e) => PendingModifiedValues.fromXml(e)),
    preferredMaintenanceWindow:
        _s.extractXmlStringValue(elem, 'PreferredMaintenanceWindow'),
    publiclyAccessible: _s.extractXmlBoolValue(elem, 'PubliclyAccessible'),
    resizeInfo: _s
        .extractXmlChild(elem, 'ResizeInfo')
        ?.let((e) => ResizeInfo.fromXml(e)),
    restoreStatus: _s
        .extractXmlChild(elem, 'RestoreStatus')
        ?.let((e) => RestoreStatus.fromXml(e)),
    snapshotScheduleIdentifier:
        _s.extractXmlStringValue(elem, 'SnapshotScheduleIdentifier'),
    snapshotScheduleState: _s
        .extractXmlStringValue(elem, 'SnapshotScheduleState')
        ?.toScheduleState(),
    tags: _s.extractXmlChild(elem, 'Tags')?.let((elem) =>
        elem.findElements('Tag').map((c) => Tag.fromXml(c)).toList()),
    vpcId: _s.extractXmlStringValue(elem, 'VpcId'),
    vpcSecurityGroups: _s.extractXmlChild(elem, 'VpcSecurityGroups')?.let(
        (elem) => elem
            .findElements('VpcSecurityGroup')
            .map((c) => VpcSecurityGroupMembership.fromXml(c))
            .toList()),
  );
}