/*
 * TextPart.kt
 *
 * This code was generated by json-kotlin-schema-codegen - JSON Schema Code Generator
 * See https://github.com/pwall567/json-kotlin-schema-codegen
 *
 * It is not advisable to modify generated code as any modifications will be lost
 * when the generation process is re-run.
 *
 * This was generated from A2A Schema: https://raw.githubusercontent.com/google/A2A/refs/heads/main/specification/json/a2a.json
 */
package dev.mokksy.aimocks.a2a.model

import kotlinx.serialization.EncodeDefault
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
@SerialName("text")
public data class TextPart
    @JvmOverloads
    constructor(
        @SerialName("kind")
        @EncodeDefault
        val kind: String = "text",
        @SerialName("text")
        val text: String,
        @SerialName("metadata")
        val metadata: Metadata? = null,
    ) : Part {
        override fun toString(): String =
            if (metadata == null) {
                "TextPart(text='$text')"
            } else {
                "TextPart(text='$text', metadata=$metadata)"
            }
    }
