spotInstanceRequestConv :: (MonadThrow m, Applicative m)
    => XmlElement -> m SpotInstanceRequest
spotInstanceRequestConv = conv
  where
    conv e = SpotInstanceRequest
        <$> e .< "spotInstanceRequestId"
        <*> e .< "spotPrice"
        <*> e .< "type"
        <*> e .< "state"
        <*> elementM "fault" faultConv e
        <*> element "status" statusConv e
        <*> e .< "validFrom"
        <*> e .< "validUntil"
        <*> e .< "launchGroup"
        <*> e .< "availabilityZoneGroup"
        <*> spotInstanceLaunchSpecificationConv "launchSpecification" e
        <*> e .< "instanceId"
        <*> e .< "createTime"
        <*> e .< "productDescription"
        <*> resourceTagConv e
        <*> e .< "launchedAvailabilityZone"
    faultConv e = SpotInstanceFault
        <$> e .< "code"
        <*> e .< "message"
    statusConv e = SpotInstanceStatus
        <$> e .< "code"
        <*> e .< "updateTime"
        <*> e .< "message"
spotInstanceRequestConv :: (MonadThrow m, Applicative m)
    => XmlElement -> m SpotInstanceRequest
spotInstanceRequestConv = conv
  where
    conv e = SpotInstanceRequest
        <$> e .< "spotInstanceRequestId"
        <*> e .< "spotPrice"
        <*> e .< "type"
        <*> e .< "state"
        <*> elementM "fault" faultConv e
        <*> element "status" statusConv e
        <*> e .< "validFrom"
        <*> e .< "validUntil"
        <*> e .< "launchGroup"
        <*> e .< "availabilityZoneGroup"
        <*> spotInstanceLaunchSpecificationConv "launchSpecification" e
        <*> e .< "instanceId"
        <*> e .< "createTime"
        <*> e .< "productDescription"
        <*> resourceTagConv e
        <*> e .< "launchedAvailabilityZone"
    faultConv e = SpotInstanceFault
        <$> e .< "code"
        <*> e .< "message"
    statusConv e = SpotInstanceStatus
        <$> e .< "code"
        <*> e .< "updateTime"
        <*> e .< "message"
spotInstanceRequestConv = conv
  where
    conv e = SpotInstanceRequest
        <$> e .< "spotInstanceRequestId"
        <*> e .< "spotPrice"
        <*> e .< "type"
        <*> e .< "state"
        <*> elementM "fault" faultConv e
        <*> element "status" statusConv e
        <*> e .< "validFrom"
        <*> e .< "validUntil"
        <*> e .< "launchGroup"
        <*> e .< "availabilityZoneGroup"
        <*> spotInstanceLaunchSpecificationConv "launchSpecification" e
        <*> e .< "instanceId"
        <*> e .< "createTime"
        <*> e .< "productDescription"
        <*> resourceTagConv e
        <*> e .< "launchedAvailabilityZone"
    faultConv e = SpotInstanceFault
        <$> e .< "code"
        <*> e .< "message"
    statusConv e = SpotInstanceStatus
        <$> e .< "code"
        <*> e .< "updateTime"
        <*> e .< "message"