instanceStatusConv :: (MonadThrow m, Applicative m)
    => XmlElement -> m InstanceStatus
instanceStatusConv = conv
  where
    conv e = InstanceStatus
        <$> e .< "instanceId"
        <*> e .< "availabilityZone"
        <*> itemsSet "eventsSet" eventConv e
        <*> instanceStateConv "instanceState" e
        <*> instanceStatusTypeConv "systemStatus" e
        <*> instanceStatusTypeConv "instanceStatus" e
    eventConv e = InstanceStatusEvent
        <$> e .< "code"
        <*> e .< "description"
        <*> e .< "notBefore"
        <*> e .< "notAfter"
instanceStatusConv :: (MonadThrow m, Applicative m)
    => XmlElement -> m InstanceStatus
instanceStatusConv = conv
  where
    conv e = InstanceStatus
        <$> e .< "instanceId"
        <*> e .< "availabilityZone"
        <*> itemsSet "eventsSet" eventConv e
        <*> instanceStateConv "instanceState" e
        <*> instanceStatusTypeConv "systemStatus" e
        <*> instanceStatusTypeConv "instanceStatus" e
    eventConv e = InstanceStatusEvent
        <$> e .< "code"
        <*> e .< "description"
        <*> e .< "notBefore"
        <*> e .< "notAfter"
instanceStatusConv = conv
  where
    conv e = InstanceStatus
        <$> e .< "instanceId"
        <*> e .< "availabilityZone"
        <*> itemsSet "eventsSet" eventConv e
        <*> instanceStateConv "instanceState" e
        <*> instanceStatusTypeConv "systemStatus" e
        <*> instanceStatusTypeConv "instanceStatus" e
    eventConv e = InstanceStatusEvent
        <$> e .< "code"
        <*> e .< "description"
        <*> e .< "notBefore"
        <*> e .< "notAfter"