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

commonMain.aws.sdk.kotlin.services.cloudsearch.model.IntOptions.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudsearch.model



/**
 * Options for a 64-bit signed integer field. Present if `IndexFieldType` specifies the field is of type `int`. All options are enabled by default.
 */
public class IntOptions private constructor(builder: Builder) {
    /**
     * A value to use for the field if the field isn't specified for a document. This can be important if you are using the field in an expression and that field is not present in every document.
     */
    public val defaultValue: kotlin.Long? = builder.defaultValue
    /**
     * Whether facet information can be returned for the field.
     */
    public val facetEnabled: kotlin.Boolean? = builder.facetEnabled
    /**
     * Whether the contents of the field can be returned in the search results.
     */
    public val returnEnabled: kotlin.Boolean? = builder.returnEnabled
    /**
     * Whether the contents of the field are searchable.
     */
    public val searchEnabled: kotlin.Boolean? = builder.searchEnabled
    /**
     * Whether the field can be used to sort the search results.
     */
    public val sortEnabled: kotlin.Boolean? = builder.sortEnabled
    /**
     * The name of the source field to map to the field.
     */
    public val sourceField: kotlin.String? = builder.sourceField

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

    override fun toString(): kotlin.String = buildString {
        append("IntOptions(")
        append("defaultValue=$defaultValue,")
        append("facetEnabled=$facetEnabled,")
        append("returnEnabled=$returnEnabled,")
        append("searchEnabled=$searchEnabled,")
        append("sortEnabled=$sortEnabled,")
        append("sourceField=$sourceField")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = defaultValue?.hashCode() ?: 0
        result = 31 * result + (facetEnabled?.hashCode() ?: 0)
        result = 31 * result + (returnEnabled?.hashCode() ?: 0)
        result = 31 * result + (searchEnabled?.hashCode() ?: 0)
        result = 31 * result + (sortEnabled?.hashCode() ?: 0)
        result = 31 * result + (sourceField?.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 IntOptions

        if (defaultValue != other.defaultValue) return false
        if (facetEnabled != other.facetEnabled) return false
        if (returnEnabled != other.returnEnabled) return false
        if (searchEnabled != other.searchEnabled) return false
        if (sortEnabled != other.sortEnabled) return false
        if (sourceField != other.sourceField) return false

        return true
    }

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

    public class Builder {
        /**
         * A value to use for the field if the field isn't specified for a document. This can be important if you are using the field in an expression and that field is not present in every document.
         */
        public var defaultValue: kotlin.Long? = null
        /**
         * Whether facet information can be returned for the field.
         */
        public var facetEnabled: kotlin.Boolean? = null
        /**
         * Whether the contents of the field can be returned in the search results.
         */
        public var returnEnabled: kotlin.Boolean? = null
        /**
         * Whether the contents of the field are searchable.
         */
        public var searchEnabled: kotlin.Boolean? = null
        /**
         * Whether the field can be used to sort the search results.
         */
        public var sortEnabled: kotlin.Boolean? = null
        /**
         * The name of the source field to map to the field.
         */
        public var sourceField: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudsearch.model.IntOptions) : this() {
            this.defaultValue = x.defaultValue
            this.facetEnabled = x.facetEnabled
            this.returnEnabled = x.returnEnabled
            this.searchEnabled = x.searchEnabled
            this.sortEnabled = x.sortEnabled
            this.sourceField = x.sourceField
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.cloudsearch.model.IntOptions = IntOptions(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy