override fun deserialize()

in ses-plugin-server/src/main/kotlin/jetbrains/buildServer/sesPlugin/sqs/SQSNotificationParserImpl.kt [45:60]


        override fun deserialize(element: JsonElement, type: Type, context: JsonDeserializationContext): AmazonSQSNotification {
            val obj = element.asJsonObject

            val Type = obj["Type"]?.asString ?: throw JsonParseException("Type not found")
            val MessageId = obj["MessageId"]?.asString ?: throw JsonParseException("MessageId not found")
            val TopicArn = obj["TopicArn"]?.asString ?: throw JsonParseException("TopicArn not found")
            val Subject = obj["Subject"]?.asString ?: throw JsonParseException("Subject not found")
            val Message = obj["Message"]?.asString ?: throw JsonParseException("Message not found")
            val Timestamp = obj["Timestamp"].asString ?: throw JsonParseException("Timestamp not found")
            val SignatureVersion = obj["SignatureVersion"].asString ?: throw JsonParseException("SignatureVersion not found")
            val Signature = obj["Signature"].asString ?: throw JsonParseException("Signature not found")
            val SigningCertURL = obj["SigningCertURL"].asString ?: throw JsonParseException("SigningCertURL not found")
            val UnsubscribeURL = obj["UnsubscribeURL"]?.asString

            return AmazonSQSNotification(Type, MessageId, TopicArn, Subject, Message, Timestamp, SignatureVersion, Signature, SigningCertURL, UnsubscribeURL)
        }