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

commonMain.aws.sdk.kotlin.services.athena.model.ResultReuseConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.athena.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies the query result reuse behavior for the query.
 */
public class ResultReuseConfiguration private constructor(builder: Builder) {
    /**
     * Specifies whether previous query results are reused, and if so, their maximum age.
     */
    public val resultReuseByAgeConfiguration: aws.sdk.kotlin.services.athena.model.ResultReuseByAgeConfiguration? = builder.resultReuseByAgeConfiguration

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

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

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

        if (resultReuseByAgeConfiguration != other.resultReuseByAgeConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies whether previous query results are reused, and if so, their maximum age.
         */
        public var resultReuseByAgeConfiguration: aws.sdk.kotlin.services.athena.model.ResultReuseByAgeConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.athena.model.ResultReuseConfiguration) : this() {
            this.resultReuseByAgeConfiguration = x.resultReuseByAgeConfiguration
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy