@file:Suppress("HardCodedStringLiteral")

package eu.gaudian.translator.model.communication

data class Request(
    val model: String,
    val messages: List<Message>
) {
    data class Message(
        val role: String,
        val content: String
    )
}

data class ApiResponse(
    val choices: List<Choice>
) {
    data class Choice(
        val message: Message
    ) {
        data class Message(
            val content: String
        )
    }

    fun getResponse(): String {
        return choices.firstOrNull()?.message?.content ?: "No response available"
    }
}

data class GeminiRequest(
    val contents: List<GeminiContent>
)

data class GeminiResponse(
    val candidates: List<GeminiCandidate>?
) {
    fun getResponse(): String {
        return candidates?.firstOrNull()?.content?.parts?.firstOrNull()?.text ?: "No response available"
    }
}

data class GeminiCandidate(
    val content: GeminiContent
)

data class GeminiContent(
    val role: String?,
    val parts: List<GeminiPart>
)

data class GeminiPart(
    val text: String
)