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

aws.sdk.kotlin.services.lexmodelsv2.model.CodeHookSpecification.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lexmodelsv2.model



/**
 * Contains information about code hooks that Amazon Lex calls during a
 * conversation.
 */
class CodeHookSpecification private constructor(builder: Builder) {
    /**
     * Specifies a Lambda function that verifies requests to a bot or
     * fulfills the user's request to a bot.
     */
    val lambdaCodeHook: aws.sdk.kotlin.services.lexmodelsv2.model.LambdaCodeHook? = builder.lambdaCodeHook

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

    override fun toString(): kotlin.String = buildString {
        append("CodeHookSpecification(")
        append("lambdaCodeHook=$lambdaCodeHook)")
    }

    override fun hashCode(): kotlin.Int {
        var result = lambdaCodeHook?.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 CodeHookSpecification

        if (lambdaCodeHook != other.lambdaCodeHook) return false

        return true
    }

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

    class Builder {
        /**
         * Specifies a Lambda function that verifies requests to a bot or
         * fulfills the user's request to a bot.
         */
        var lambdaCodeHook: aws.sdk.kotlin.services.lexmodelsv2.model.LambdaCodeHook? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexmodelsv2.model.CodeHookSpecification) : this() {
            this.lambdaCodeHook = x.lambdaCodeHook
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy