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

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

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

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

import aws.smithy.kotlin.runtime.time.Instant

public class DescribeThesaurusResponse private constructor(builder: Builder) {
    /**
     * The Unix timestamp when the thesaurus was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * The thesaurus description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * When the `Status` field value is `FAILED`, the `ErrorMessage` field provides more information.
     */
    public val errorMessage: kotlin.String? = builder.errorMessage
    /**
     * The size of the thesaurus file in bytes.
     */
    public val fileSizeBytes: kotlin.Long? = builder.fileSizeBytes
    /**
     * The identifier of the thesaurus.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The identifier of the index for the thesaurus.
     */
    public val indexId: kotlin.String? = builder.indexId
    /**
     * The thesaurus name.
     */
    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
    /**
     * The current status of the thesaurus. When the value is `ACTIVE`, queries are able to use the thesaurus. If the `Status` field value is `FAILED`, the `ErrorMessage` field provides more information.
     *
     * If the status is `ACTIVE_BUT_UPDATE_FAILED`, it means that Amazon Kendra could not ingest the new thesaurus file. The old thesaurus file is still active.
     */
    public val status: aws.sdk.kotlin.services.kendra.model.ThesaurusStatus? = builder.status
    /**
     * The number of synonym rules in the thesaurus file.
     */
    public val synonymRuleCount: kotlin.Long? = builder.synonymRuleCount
    /**
     * The number of unique terms in the thesaurus file. For example, the synonyms `a,b,c` and `a=>d`, the term count would be 4.
     */
    public val termCount: kotlin.Long? = builder.termCount
    /**
     * The Unix timestamp when the thesaurus was last updated.
     */
    public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeThesaurusResponse(")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("errorMessage=$errorMessage,")
        append("fileSizeBytes=$fileSizeBytes,")
        append("id=$id,")
        append("indexId=$indexId,")
        append("name=$name,")
        append("roleArn=$roleArn,")
        append("sourceS3Path=$sourceS3Path,")
        append("status=$status,")
        append("synonymRuleCount=$synonymRuleCount,")
        append("termCount=$termCount,")
        append("updatedAt=$updatedAt")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = createdAt?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (errorMessage?.hashCode() ?: 0)
        result = 31 * result + (fileSizeBytes?.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)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (synonymRuleCount?.hashCode() ?: 0)
        result = 31 * result + (termCount?.hashCode() ?: 0)
        result = 31 * result + (updatedAt?.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 DescribeThesaurusResponse

        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (errorMessage != other.errorMessage) return false
        if (fileSizeBytes != other.fileSizeBytes) 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
        if (status != other.status) return false
        if (synonymRuleCount != other.synonymRuleCount) return false
        if (termCount != other.termCount) return false
        if (updatedAt != other.updatedAt) return false

        return true
    }

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

    public class Builder {
        /**
         * The Unix timestamp when the thesaurus was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The thesaurus description.
         */
        public var description: kotlin.String? = null
        /**
         * When the `Status` field value is `FAILED`, the `ErrorMessage` field provides more information.
         */
        public var errorMessage: kotlin.String? = null
        /**
         * The size of the thesaurus file in bytes.
         */
        public var fileSizeBytes: kotlin.Long? = null
        /**
         * The identifier of the thesaurus.
         */
        public var id: kotlin.String? = null
        /**
         * The identifier of the index for the thesaurus.
         */
        public var indexId: kotlin.String? = null
        /**
         * The thesaurus name.
         */
        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
        /**
         * The current status of the thesaurus. When the value is `ACTIVE`, queries are able to use the thesaurus. If the `Status` field value is `FAILED`, the `ErrorMessage` field provides more information.
         *
         * If the status is `ACTIVE_BUT_UPDATE_FAILED`, it means that Amazon Kendra could not ingest the new thesaurus file. The old thesaurus file is still active.
         */
        public var status: aws.sdk.kotlin.services.kendra.model.ThesaurusStatus? = null
        /**
         * The number of synonym rules in the thesaurus file.
         */
        public var synonymRuleCount: kotlin.Long? = null
        /**
         * The number of unique terms in the thesaurus file. For example, the synonyms `a,b,c` and `a=>d`, the term count would be 4.
         */
        public var termCount: kotlin.Long? = null
        /**
         * The Unix timestamp when the thesaurus was last updated.
         */
        public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.DescribeThesaurusResponse) : this() {
            this.createdAt = x.createdAt
            this.description = x.description
            this.errorMessage = x.errorMessage
            this.fileSizeBytes = x.fileSizeBytes
            this.id = x.id
            this.indexId = x.indexId
            this.name = x.name
            this.roleArn = x.roleArn
            this.sourceS3Path = x.sourceS3Path
            this.status = x.status
            this.synonymRuleCount = x.synonymRuleCount
            this.termCount = x.termCount
            this.updatedAt = x.updatedAt
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.kendra.model.DescribeThesaurusResponse = DescribeThesaurusResponse(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