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

commonMain.aws.sdk.kotlin.services.timestreamquery.model.PrepareQueryRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.timestreamquery.model

import aws.smithy.kotlin.runtime.SdkDsl

public class PrepareQueryRequest private constructor(builder: Builder) {
    /**
     * The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string `@` character followed by an identifier.
     */
    public val queryString: kotlin.String? = builder.queryString
    /**
     * By setting this value to `true`, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.
     */
    public val validateOnly: kotlin.Boolean? = builder.validateOnly

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

    override fun toString(): kotlin.String = buildString {
        append("PrepareQueryRequest(")
        append("queryString=*** Sensitive Data Redacted ***,")
        append("validateOnly=$validateOnly")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = queryString?.hashCode() ?: 0
        result = 31 * result + (validateOnly?.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 PrepareQueryRequest

        if (queryString != other.queryString) return false
        if (validateOnly != other.validateOnly) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string `@` character followed by an identifier.
         */
        public var queryString: kotlin.String? = null
        /**
         * By setting this value to `true`, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.
         */
        public var validateOnly: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.PrepareQueryRequest) : this() {
            this.queryString = x.queryString
            this.validateOnly = x.validateOnly
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy