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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The result of a `DefineSuggester` request. Contains the status of the newly-configured suggester.
 */
public class DefineSuggesterResponse private constructor(builder: Builder) {
    /**
     * The value of a `Suggester` and its current status.
     */
    public val suggester: aws.sdk.kotlin.services.cloudsearch.model.SuggesterStatus? = builder.suggester

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

    override fun toString(): kotlin.String = buildString {
        append("DefineSuggesterResponse(")
        append("suggester=$suggester")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = suggester?.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 DefineSuggesterResponse

        if (suggester != other.suggester) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The value of a `Suggester` and its current status.
         */
        public var suggester: aws.sdk.kotlin.services.cloudsearch.model.SuggesterStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudsearch.model.DefineSuggesterResponse) : this() {
            this.suggester = x.suggester
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy