TargetGroup.fromXml constructor

TargetGroup.fromXml(
  1. XmlElement elem
)

Implementation

factory TargetGroup.fromXml(_s.XmlElement elem) {
  return TargetGroup(
    healthCheckEnabled: _s.extractXmlBoolValue(elem, 'HealthCheckEnabled'),
    healthCheckIntervalSeconds:
        _s.extractXmlIntValue(elem, 'HealthCheckIntervalSeconds'),
    healthCheckPath: _s.extractXmlStringValue(elem, 'HealthCheckPath'),
    healthCheckPort: _s.extractXmlStringValue(elem, 'HealthCheckPort'),
    healthCheckProtocol: _s
        .extractXmlStringValue(elem, 'HealthCheckProtocol')
        ?.toProtocolEnum(),
    healthCheckTimeoutSeconds:
        _s.extractXmlIntValue(elem, 'HealthCheckTimeoutSeconds'),
    healthyThresholdCount:
        _s.extractXmlIntValue(elem, 'HealthyThresholdCount'),
    loadBalancerArns: _s
        .extractXmlChild(elem, 'LoadBalancerArns')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    matcher:
        _s.extractXmlChild(elem, 'Matcher')?.let((e) => Matcher.fromXml(e)),
    port: _s.extractXmlIntValue(elem, 'Port'),
    protocol: _s.extractXmlStringValue(elem, 'Protocol')?.toProtocolEnum(),
    protocolVersion: _s.extractXmlStringValue(elem, 'ProtocolVersion'),
    targetGroupArn: _s.extractXmlStringValue(elem, 'TargetGroupArn'),
    targetGroupName: _s.extractXmlStringValue(elem, 'TargetGroupName'),
    targetType:
        _s.extractXmlStringValue(elem, 'TargetType')?.toTargetTypeEnum(),
    unhealthyThresholdCount:
        _s.extractXmlIntValue(elem, 'UnhealthyThresholdCount'),
    vpcId: _s.extractXmlStringValue(elem, 'VpcId'),
  );
}