SingleInstanceHealth.fromXml constructor

SingleInstanceHealth.fromXml(
  1. XmlElement elem
)

Implementation

factory SingleInstanceHealth.fromXml(_s.XmlElement elem) {
  return SingleInstanceHealth(
    applicationMetrics: _s
        .extractXmlChild(elem, 'ApplicationMetrics')
        ?.let((e) => ApplicationMetrics.fromXml(e)),
    availabilityZone: _s.extractXmlStringValue(elem, 'AvailabilityZone'),
    causes: _s
        .extractXmlChild(elem, 'Causes')
        ?.let((elem) => _s.extractXmlStringListValues(elem, 'member')),
    color: _s.extractXmlStringValue(elem, 'Color'),
    deployment: _s
        .extractXmlChild(elem, 'Deployment')
        ?.let((e) => Deployment.fromXml(e)),
    healthStatus: _s.extractXmlStringValue(elem, 'HealthStatus'),
    instanceId: _s.extractXmlStringValue(elem, 'InstanceId'),
    instanceType: _s.extractXmlStringValue(elem, 'InstanceType'),
    launchedAt: _s.extractXmlDateTimeValue(elem, 'LaunchedAt'),
    system: _s
        .extractXmlChild(elem, 'System')
        ?.let((e) => SystemStatus.fromXml(e)),
  );
}