in aws-runtime/protocols/aws-xml-protocols/common/src/aws/sdk/kotlin/runtime/protocol/xml/Ec2QueryErrorDeserializer.kt [42:70]
suspend fun deserialize(deserializer: Deserializer): Ec2QueryErrorResponse {
var errors = listOf<Ec2QueryError>()
var requestId: String? = null
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@ while (true) {
when (findNextFieldIndex()) {
ERRORS_DESCRIPTOR.index -> errors = deserializer.deserializeList(ERRORS_DESCRIPTOR) {
val collection = mutableListOf<Ec2QueryError>()
while (hasNextElement()) {
if (nextHasValue()) {
val element = Ec2QueryErrorDeserializer.deserialize(deserializer)
collection.add(element)
} else {
deserializeNull()
continue
}
}
collection
}
REQUESTID_DESCRIPTOR.index -> requestId = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
return Ec2QueryErrorResponse(errors, requestId)
}