ReplicationGroup.fromXml constructor

ReplicationGroup.fromXml(
  1. XmlElement elem
)

Implementation

factory ReplicationGroup.fromXml(_s.XmlElement elem) {
  return ReplicationGroup(
    arn: _s.extractXmlStringValue(elem, 'ARN'),
    atRestEncryptionEnabled:
        _s.extractXmlBoolValue(elem, 'AtRestEncryptionEnabled'),
    authTokenEnabled: _s.extractXmlBoolValue(elem, 'AuthTokenEnabled'),
    authTokenLastModifiedDate:
        _s.extractXmlDateTimeValue(elem, 'AuthTokenLastModifiedDate'),
    automaticFailover: _s
        .extractXmlStringValue(elem, 'AutomaticFailover')
        ?.toAutomaticFailoverStatus(),
    cacheNodeType: _s.extractXmlStringValue(elem, 'CacheNodeType'),
    clusterEnabled: _s.extractXmlBoolValue(elem, 'ClusterEnabled'),
    configurationEndpoint: _s
        .extractXmlChild(elem, 'ConfigurationEndpoint')
        ?.let((e) => Endpoint.fromXml(e)),
    description: _s.extractXmlStringValue(elem, 'Description'),
    globalReplicationGroupInfo: _s
        .extractXmlChild(elem, 'GlobalReplicationGroupInfo')
        ?.let((e) => GlobalReplicationGroupInfo.fromXml(e)),
    kmsKeyId: _s.extractXmlStringValue(elem, 'KmsKeyId'),
    memberClusters: _s
        .extractXmlChild(elem, 'MemberClusters')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'ClusterId')),
    memberClustersOutpostArns: _s
        .extractXmlChild(elem, 'MemberClustersOutpostArns')
        ?.let((elem) => _s.extractXmlStringListValues(
            elem, 'ReplicationGroupOutpostArn')),
    multiAZ: _s.extractXmlStringValue(elem, 'MultiAZ')?.toMultiAZStatus(),
    nodeGroups: _s.extractXmlChild(elem, 'NodeGroups')?.let((elem) => elem
        .findElements('NodeGroup')
        .map((c) => NodeGroup.fromXml(c))
        .toList()),
    pendingModifiedValues: _s
        .extractXmlChild(elem, 'PendingModifiedValues')
        ?.let((e) => ReplicationGroupPendingModifiedValues.fromXml(e)),
    replicationGroupId: _s.extractXmlStringValue(elem, 'ReplicationGroupId'),
    snapshotRetentionLimit:
        _s.extractXmlIntValue(elem, 'SnapshotRetentionLimit'),
    snapshotWindow: _s.extractXmlStringValue(elem, 'SnapshotWindow'),
    snapshottingClusterId:
        _s.extractXmlStringValue(elem, 'SnapshottingClusterId'),
    status: _s.extractXmlStringValue(elem, 'Status'),
    transitEncryptionEnabled:
        _s.extractXmlBoolValue(elem, 'TransitEncryptionEnabled'),
    userGroupIds: _s
        .extractXmlChild(elem, 'UserGroupIds')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
  );
}