All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.lexruntimeservice.model.ResponseCard.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.lexruntimeservice.model



/**
 * If you configure a response card when creating your bots, Amazon Lex substitutes the session attributes and slot values that are available, and then returns it. The response card can also come from a Lambda function ( `dialogCodeHook` and `fulfillmentActivity` on an intent).
 */
public class ResponseCard private constructor(builder: Builder) {
    /**
     * The content type of the response.
     */
    public val contentType: aws.sdk.kotlin.services.lexruntimeservice.model.ContentType? = builder.contentType
    /**
     * An array of attachment objects representing options.
     */
    public val genericAttachments: List? = builder.genericAttachments
    /**
     * The version of the response card format.
     */
    public val version: kotlin.String? = builder.version

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimeservice.model.ResponseCard = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ResponseCard(")
        append("contentType=$contentType,")
        append("genericAttachments=$genericAttachments,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contentType?.hashCode() ?: 0
        result = 31 * result + (genericAttachments?.hashCode() ?: 0)
        result = 31 * result + (version?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as ResponseCard

        if (contentType != other.contentType) return false
        if (genericAttachments != other.genericAttachments) return false
        if (version != other.version) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimeservice.model.ResponseCard = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The content type of the response.
         */
        public var contentType: aws.sdk.kotlin.services.lexruntimeservice.model.ContentType? = null
        /**
         * An array of attachment objects representing options.
         */
        public var genericAttachments: List? = null
        /**
         * The version of the response card format.
         */
        public var version: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexruntimeservice.model.ResponseCard) : this() {
            this.contentType = x.contentType
            this.genericAttachments = x.genericAttachments
            this.version = x.version
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lexruntimeservice.model.ResponseCard = ResponseCard(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy