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

commonMain.aws.sdk.kotlin.services.kendra.model.DocumentAttributeValue.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

/**
 * The value of a document attribute. You can only provide one value for a document attribute.
 */
public class DocumentAttributeValue private constructor(builder: Builder) {
    /**
     * A date expressed as an ISO 8601 string.
     *
     * It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
     */
    public val dateValue: aws.smithy.kotlin.runtime.time.Instant? = builder.dateValue
    /**
     * A long integer value.
     */
    public val longValue: kotlin.Long? = builder.longValue
    /**
     * A list of strings. The default maximum length or number of strings is 10.
     */
    public val stringListValue: List? = builder.stringListValue
    /**
     * A string, such as "department".
     */
    public val stringValue: kotlin.String? = builder.stringValue

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

    override fun toString(): kotlin.String = buildString {
        append("DocumentAttributeValue(")
        append("dateValue=$dateValue,")
        append("longValue=$longValue,")
        append("stringListValue=$stringListValue,")
        append("stringValue=$stringValue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dateValue?.hashCode() ?: 0
        result = 31 * result + (longValue?.hashCode() ?: 0)
        result = 31 * result + (stringListValue?.hashCode() ?: 0)
        result = 31 * result + (stringValue?.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 DocumentAttributeValue

        if (dateValue != other.dateValue) return false
        if (longValue != other.longValue) return false
        if (stringListValue != other.stringListValue) return false
        if (stringValue != other.stringValue) return false

        return true
    }

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

    public class Builder {
        /**
         * A date expressed as an ISO 8601 string.
         *
         * It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
         */
        public var dateValue: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A long integer value.
         */
        public var longValue: kotlin.Long? = null
        /**
         * A list of strings. The default maximum length or number of strings is 10.
         */
        public var stringListValue: List? = null
        /**
         * A string, such as "department".
         */
        public var stringValue: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.DocumentAttributeValue) : this() {
            this.dateValue = x.dateValue
            this.longValue = x.longValue
            this.stringListValue = x.stringListValue
            this.stringValue = x.stringValue
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy