commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.CreateIntentVersionRequest.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 CreateIntentVersionRequest private constructor(builder: Builder) {
/**
* Checksum of the `$LATEST` version of the intent that should be used to create the new version. If you specify a checksum and the `$LATEST` version of the intent has a different checksum, Amazon Lex returns a `PreconditionFailedException` exception and doesn't publish a new version. If you don't specify a checksum, Amazon Lex publishes the `$LATEST` version.
*/
public val checksum: kotlin.String? = builder.checksum
/**
* The name of the intent that you want to create a new version of. The name is case sensitive.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexmodelbuildingservice.model.CreateIntentVersionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateIntentVersionRequest(")
append("checksum=$checksum,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = checksum?.hashCode() ?: 0
result = 31 * result + (name?.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 CreateIntentVersionRequest
if (checksum != other.checksum) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexmodelbuildingservice.model.CreateIntentVersionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Checksum of the `$LATEST` version of the intent that should be used to create the new version. If you specify a checksum and the `$LATEST` version of the intent has a different checksum, Amazon Lex returns a `PreconditionFailedException` exception and doesn't publish a new version. If you don't specify a checksum, Amazon Lex publishes the `$LATEST` version.
*/
public var checksum: kotlin.String? = null
/**
* The name of the intent that you want to create a new version of. The name is case sensitive.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.CreateIntentVersionRequest) : this() {
this.checksum = x.checksum
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexmodelbuildingservice.model.CreateIntentVersionRequest = CreateIntentVersionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy