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

commonMain.aws.sdk.kotlin.services.connect.model.LexBotConfig.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.connect.model



/**
 * Configuration information of an Amazon Lex or Amazon Lex V2 bot.
 */
public class LexBotConfig private constructor(builder: Builder) {
    /**
     * Configuration information of an Amazon Lex bot.
     */
    public val lexBot: aws.sdk.kotlin.services.connect.model.LexBot? = builder.lexBot
    /**
     * Configuration information of an Amazon Lex V2 bot.
     */
    public val lexV2Bot: aws.sdk.kotlin.services.connect.model.LexV2Bot? = builder.lexV2Bot

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

    override fun toString(): kotlin.String = buildString {
        append("LexBotConfig(")
        append("lexBot=$lexBot,")
        append("lexV2Bot=$lexV2Bot")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lexBot?.hashCode() ?: 0
        result = 31 * result + (lexV2Bot?.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 LexBotConfig

        if (lexBot != other.lexBot) return false
        if (lexV2Bot != other.lexV2Bot) return false

        return true
    }

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

    public class Builder {
        /**
         * Configuration information of an Amazon Lex bot.
         */
        public var lexBot: aws.sdk.kotlin.services.connect.model.LexBot? = null
        /**
         * Configuration information of an Amazon Lex V2 bot.
         */
        public var lexV2Bot: aws.sdk.kotlin.services.connect.model.LexV2Bot? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connect.model.LexBotConfig) : this() {
            this.lexBot = x.lexBot
            this.lexV2Bot = x.lexV2Bot
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.connect.model.LexBot] inside the given [block]
         */
        public fun lexBot(block: aws.sdk.kotlin.services.connect.model.LexBot.Builder.() -> kotlin.Unit) {
            this.lexBot = aws.sdk.kotlin.services.connect.model.LexBot.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.connect.model.LexV2Bot] inside the given [block]
         */
        public fun lexV2Bot(block: aws.sdk.kotlin.services.connect.model.LexV2Bot.Builder.() -> kotlin.Unit) {
            this.lexV2Bot = aws.sdk.kotlin.services.connect.model.LexV2Bot.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy