commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutBotAliasRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexmodelbuildingservice.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutBotAliasRequest private constructor(builder: Builder) {
/**
* The name of the bot.
*/
public val botName: kotlin.String? = builder.botName
/**
* The version of the bot.
*/
public val botVersion: kotlin.String? = builder.botVersion
/**
* Identifies a specific revision of the `$LATEST` version.
*
* When you create a new bot alias, leave the `checksum` field blank. If you specify a checksum you get a `BadRequestException` exception.
*
* When you want to update a bot alias, set the `checksum` field to the checksum of the most recent revision of the `$LATEST` version. If you don't specify the ` checksum` field, or if the checksum does not match the `$LATEST` version, you get a `PreconditionFailedException` exception.
*/
public val checksum: kotlin.String? = builder.checksum
/**
* Settings for conversation logs for the alias.
*/
public val conversationLogs: aws.sdk.kotlin.services.lexmodelbuildingservice.model.ConversationLogsRequest? = builder.conversationLogs
/**
* A description of the alias.
*/
public val description: kotlin.String? = builder.description
/**
* The name of the alias. The name is *not* case sensitive.
*/
public val name: kotlin.String? = builder.name
/**
* A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the `PutBotAlias` operation to update the tags on a bot alias. To update tags, use the `TagResource` operation.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutBotAliasRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutBotAliasRequest(")
append("botName=$botName,")
append("botVersion=$botVersion,")
append("checksum=$checksum,")
append("conversationLogs=$conversationLogs,")
append("description=$description,")
append("name=$name,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = botName?.hashCode() ?: 0
result = 31 * result + (botVersion?.hashCode() ?: 0)
result = 31 * result + (checksum?.hashCode() ?: 0)
result = 31 * result + (conversationLogs?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (tags?.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 PutBotAliasRequest
if (botName != other.botName) return false
if (botVersion != other.botVersion) return false
if (checksum != other.checksum) return false
if (conversationLogs != other.conversationLogs) return false
if (description != other.description) return false
if (name != other.name) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutBotAliasRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the bot.
*/
public var botName: kotlin.String? = null
/**
* The version of the bot.
*/
public var botVersion: kotlin.String? = null
/**
* Identifies a specific revision of the `$LATEST` version.
*
* When you create a new bot alias, leave the `checksum` field blank. If you specify a checksum you get a `BadRequestException` exception.
*
* When you want to update a bot alias, set the `checksum` field to the checksum of the most recent revision of the `$LATEST` version. If you don't specify the ` checksum` field, or if the checksum does not match the `$LATEST` version, you get a `PreconditionFailedException` exception.
*/
public var checksum: kotlin.String? = null
/**
* Settings for conversation logs for the alias.
*/
public var conversationLogs: aws.sdk.kotlin.services.lexmodelbuildingservice.model.ConversationLogsRequest? = null
/**
* A description of the alias.
*/
public var description: kotlin.String? = null
/**
* The name of the alias. The name is *not* case sensitive.
*/
public var name: kotlin.String? = null
/**
* A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the `PutBotAlias` operation to update the tags on a bot alias. To update tags, use the `TagResource` operation.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutBotAliasRequest) : this() {
this.botName = x.botName
this.botVersion = x.botVersion
this.checksum = x.checksum
this.conversationLogs = x.conversationLogs
this.description = x.description
this.name = x.name
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexmodelbuildingservice.model.PutBotAliasRequest = PutBotAliasRequest(this)
/**
* construct an [aws.sdk.kotlin.services.lexmodelbuildingservice.model.ConversationLogsRequest] inside the given [block]
*/
public fun conversationLogs(block: aws.sdk.kotlin.services.lexmodelbuildingservice.model.ConversationLogsRequest.Builder.() -> kotlin.Unit) {
this.conversationLogs = aws.sdk.kotlin.services.lexmodelbuildingservice.model.ConversationLogsRequest.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy