AutoScalingInstanceDetails.fromXml constructor

AutoScalingInstanceDetails.fromXml(
  1. XmlElement elem
)

Implementation

factory AutoScalingInstanceDetails.fromXml(_s.XmlElement elem) {
  return AutoScalingInstanceDetails(
    autoScalingGroupName:
        _s.extractXmlStringValue(elem, 'AutoScalingGroupName')!,
    availabilityZone: _s.extractXmlStringValue(elem, 'AvailabilityZone')!,
    healthStatus: _s.extractXmlStringValue(elem, 'HealthStatus')!,
    instanceId: _s.extractXmlStringValue(elem, 'InstanceId')!,
    lifecycleState: _s.extractXmlStringValue(elem, 'LifecycleState')!,
    protectedFromScaleIn:
        _s.extractXmlBoolValue(elem, 'ProtectedFromScaleIn')!,
    instanceType: _s.extractXmlStringValue(elem, 'InstanceType'),
    launchConfigurationName:
        _s.extractXmlStringValue(elem, 'LaunchConfigurationName'),
    launchTemplate: _s
        .extractXmlChild(elem, 'LaunchTemplate')
        ?.let((e) => LaunchTemplateSpecification.fromXml(e)),
    weightedCapacity: _s.extractXmlStringValue(elem, 'WeightedCapacity'),
  );
}