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

commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.Intent.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lexmodelbuildingservice.model



/**
 * Identifies the specific version of an intent.
 */
public class Intent private constructor(builder: Builder) {
    /**
     * The name of the intent.
     */
    public val intentName: kotlin.String = requireNotNull(builder.intentName) { "A non-null value must be provided for intentName" }
    /**
     * The version of the intent.
     */
    public val intentVersion: kotlin.String = requireNotNull(builder.intentVersion) { "A non-null value must be provided for intentVersion" }

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

    override fun toString(): kotlin.String = buildString {
        append("Intent(")
        append("intentName=$intentName,")
        append("intentVersion=$intentVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = intentName.hashCode()
        result = 31 * result + (intentVersion.hashCode())
        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 Intent

        if (intentName != other.intentName) return false
        if (intentVersion != other.intentVersion) return false

        return true
    }

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

    public class Builder {
        /**
         * The name of the intent.
         */
        public var intentName: kotlin.String? = null
        /**
         * The version of the intent.
         */
        public var intentVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.Intent) : this() {
            this.intentName = x.intentName
            this.intentVersion = x.intentVersion
        }

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

        internal fun correctErrors(): Builder {
            if (intentName == null) intentName = ""
            if (intentVersion == null) intentVersion = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy