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

commonMain.aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementResult.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.qldbsession.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the details of the executed statement.
 */
public class ExecuteStatementResult private constructor(builder: Builder) {
    /**
     * Contains metrics about the number of I/O requests that were consumed.
     */
    public val consumedIos: aws.sdk.kotlin.services.qldbsession.model.IoUsage? = builder.consumedIos
    /**
     * Contains the details of the first fetched page.
     */
    public val firstPage: aws.sdk.kotlin.services.qldbsession.model.Page? = builder.firstPage
    /**
     * Contains server-side performance information for the command.
     */
    public val timingInformation: aws.sdk.kotlin.services.qldbsession.model.TimingInformation? = builder.timingInformation

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

    override fun toString(): kotlin.String = buildString {
        append("ExecuteStatementResult(")
        append("consumedIos=$consumedIos,")
        append("firstPage=$firstPage,")
        append("timingInformation=$timingInformation")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = consumedIos?.hashCode() ?: 0
        result = 31 * result + (firstPage?.hashCode() ?: 0)
        result = 31 * result + (timingInformation?.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 ExecuteStatementResult

        if (consumedIos != other.consumedIos) return false
        if (firstPage != other.firstPage) return false
        if (timingInformation != other.timingInformation) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Contains metrics about the number of I/O requests that were consumed.
         */
        public var consumedIos: aws.sdk.kotlin.services.qldbsession.model.IoUsage? = null
        /**
         * Contains the details of the first fetched page.
         */
        public var firstPage: aws.sdk.kotlin.services.qldbsession.model.Page? = null
        /**
         * Contains server-side performance information for the command.
         */
        public var timingInformation: aws.sdk.kotlin.services.qldbsession.model.TimingInformation? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qldbsession.model.ExecuteStatementResult) : this() {
            this.consumedIos = x.consumedIos
            this.firstPage = x.firstPage
            this.timingInformation = x.timingInformation
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy