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

commonMain.aws.sdk.kotlin.services.kendra.model.UpdateThesaurusRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kendra.model



public class UpdateThesaurusRequest private constructor(builder: Builder) {
    /**
     * A new description for the thesaurus.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The identifier of the thesaurus you want to update.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The identifier of the index for the thesaurus.
     */
    public val indexId: kotlin.String? = builder.indexId
    /**
     * A new name for the thesaurus.
     */
    public val name: kotlin.String? = builder.name
    /**
     * An IAM role that gives Amazon Kendra permissions to access thesaurus file specified in `SourceS3Path`.
     */
    public val roleArn: kotlin.String? = builder.roleArn
    /**
     * Information required to find a specific file in an Amazon S3 bucket.
     */
    public val sourceS3Path: aws.sdk.kotlin.services.kendra.model.S3Path? = builder.sourceS3Path

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateThesaurusRequest(")
        append("description=$description,")
        append("id=$id,")
        append("indexId=$indexId,")
        append("name=$name,")
        append("roleArn=$roleArn,")
        append("sourceS3Path=$sourceS3Path")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (indexId?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (roleArn?.hashCode() ?: 0)
        result = 31 * result + (sourceS3Path?.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 UpdateThesaurusRequest

        if (description != other.description) return false
        if (id != other.id) return false
        if (indexId != other.indexId) return false
        if (name != other.name) return false
        if (roleArn != other.roleArn) return false
        if (sourceS3Path != other.sourceS3Path) return false

        return true
    }

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

    public class Builder {
        /**
         * A new description for the thesaurus.
         */
        public var description: kotlin.String? = null
        /**
         * The identifier of the thesaurus you want to update.
         */
        public var id: kotlin.String? = null
        /**
         * The identifier of the index for the thesaurus.
         */
        public var indexId: kotlin.String? = null
        /**
         * A new name for the thesaurus.
         */
        public var name: kotlin.String? = null
        /**
         * An IAM role that gives Amazon Kendra permissions to access thesaurus file specified in `SourceS3Path`.
         */
        public var roleArn: kotlin.String? = null
        /**
         * Information required to find a specific file in an Amazon S3 bucket.
         */
        public var sourceS3Path: aws.sdk.kotlin.services.kendra.model.S3Path? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.UpdateThesaurusRequest) : this() {
            this.description = x.description
            this.id = x.id
            this.indexId = x.indexId
            this.name = x.name
            this.roleArn = x.roleArn
            this.sourceS3Path = x.sourceS3Path
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy