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

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

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

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



class CreateBotRequest private constructor(builder: Builder) {
    /**
     * The name of the bot. The bot name must be unique in the account that
     * creates the bot.
     */
    val botName: kotlin.String? = builder.botName
    /**
     * A list of tags to add to the bot. You can only add tags when you
     * create a bot. You can't use the UpdateBot operation to
     * update tags. To update tags, use the TagResource
     * operation.
     */
    val botTags: Map? = builder.botTags
    /**
     * Provides information on additional privacy protections Amazon Lex should
     * use with the bot's data.
     */
    val dataPrivacy: aws.sdk.kotlin.services.lexmodelsv2.model.DataPrivacy? = builder.dataPrivacy
    /**
     * A description of the bot. It appears in lists to help you identify a
     * particular bot.
     */
    val description: kotlin.String? = builder.description
    /**
     * The time, in seconds, that Amazon Lex should keep information about a
     * user's conversation with the bot.
     * A user interaction remains active for the amount of time specified.
     * If no conversation occurs during this time, the session expires and
     * Amazon Lex deletes any data provided before the timeout.
     * You can specify between 60 (1 minute) and 86,400 (24 hours)
     * seconds.
     */
    val idleSessionTtlInSeconds: kotlin.Int? = builder.idleSessionTtlInSeconds
    /**
     * The Amazon Resource Name (ARN) of an IAM role that has permission to
     * access the bot.
     */
    val roleArn: kotlin.String? = builder.roleArn
    /**
     * A list of tags to add to the test alias for a bot. You can only add
     * tags when you create a bot. You can't use the UpdateAlias
     * operation to update tags. To update tags on the test alias, use the
     * TagResource operation.
     */
    val testBotAliasTags: Map? = builder.testBotAliasTags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateBotRequest(")
        append("botName=$botName,")
        append("botTags=$botTags,")
        append("dataPrivacy=$dataPrivacy,")
        append("description=$description,")
        append("idleSessionTtlInSeconds=$idleSessionTtlInSeconds,")
        append("roleArn=$roleArn,")
        append("testBotAliasTags=$testBotAliasTags)")
    }

    override fun hashCode(): kotlin.Int {
        var result = botName?.hashCode() ?: 0
        result = 31 * result + (botTags?.hashCode() ?: 0)
        result = 31 * result + (dataPrivacy?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (idleSessionTtlInSeconds ?: 0)
        result = 31 * result + (roleArn?.hashCode() ?: 0)
        result = 31 * result + (testBotAliasTags?.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 CreateBotRequest

        if (botName != other.botName) return false
        if (botTags != other.botTags) return false
        if (dataPrivacy != other.dataPrivacy) return false
        if (description != other.description) return false
        if (idleSessionTtlInSeconds != other.idleSessionTtlInSeconds) return false
        if (roleArn != other.roleArn) return false
        if (testBotAliasTags != other.testBotAliasTags) return false

        return true
    }

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

    class Builder {
        /**
         * The name of the bot. The bot name must be unique in the account that
         * creates the bot.
         */
        var botName: kotlin.String? = null
        /**
         * A list of tags to add to the bot. You can only add tags when you
         * create a bot. You can't use the UpdateBot operation to
         * update tags. To update tags, use the TagResource
         * operation.
         */
        var botTags: Map? = null
        /**
         * Provides information on additional privacy protections Amazon Lex should
         * use with the bot's data.
         */
        var dataPrivacy: aws.sdk.kotlin.services.lexmodelsv2.model.DataPrivacy? = null
        /**
         * A description of the bot. It appears in lists to help you identify a
         * particular bot.
         */
        var description: kotlin.String? = null
        /**
         * The time, in seconds, that Amazon Lex should keep information about a
         * user's conversation with the bot.
         * A user interaction remains active for the amount of time specified.
         * If no conversation occurs during this time, the session expires and
         * Amazon Lex deletes any data provided before the timeout.
         * You can specify between 60 (1 minute) and 86,400 (24 hours)
         * seconds.
         */
        var idleSessionTtlInSeconds: kotlin.Int? = null
        /**
         * The Amazon Resource Name (ARN) of an IAM role that has permission to
         * access the bot.
         */
        var roleArn: kotlin.String? = null
        /**
         * A list of tags to add to the test alias for a bot. You can only add
         * tags when you create a bot. You can't use the UpdateAlias
         * operation to update tags. To update tags on the test alias, use the
         * TagResource operation.
         */
        var testBotAliasTags: Map? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexmodelsv2.model.CreateBotRequest) : this() {
            this.botName = x.botName
            this.botTags = x.botTags
            this.dataPrivacy = x.dataPrivacy
            this.description = x.description
            this.idleSessionTtlInSeconds = x.idleSessionTtlInSeconds
            this.roleArn = x.roleArn
            this.testBotAliasTags = x.testBotAliasTags
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy