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

commonMain.aws.sdk.kotlin.services.glue.model.StatementOutput.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The code execution output in JSON format.
 */
public class StatementOutput private constructor(builder: Builder) {
    /**
     * The code execution output.
     */
    public val data: aws.sdk.kotlin.services.glue.model.StatementOutputData? = builder.data
    /**
     * The name of the error in the output.
     */
    public val errorName: kotlin.String? = builder.errorName
    /**
     * The error value of the output.
     */
    public val errorValue: kotlin.String? = builder.errorValue
    /**
     * The execution count of the output.
     */
    public val executionCount: kotlin.Int = builder.executionCount
    /**
     * The status of the code execution output.
     */
    public val status: aws.sdk.kotlin.services.glue.model.StatementState? = builder.status
    /**
     * The traceback of the output.
     */
    public val traceback: List? = builder.traceback

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

    override fun toString(): kotlin.String = buildString {
        append("StatementOutput(")
        append("data=$data,")
        append("errorName=$errorName,")
        append("errorValue=$errorValue,")
        append("executionCount=$executionCount,")
        append("status=$status,")
        append("traceback=$traceback")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = data?.hashCode() ?: 0
        result = 31 * result + (errorName?.hashCode() ?: 0)
        result = 31 * result + (errorValue?.hashCode() ?: 0)
        result = 31 * result + (executionCount)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (traceback?.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 StatementOutput

        if (data != other.data) return false
        if (errorName != other.errorName) return false
        if (errorValue != other.errorValue) return false
        if (executionCount != other.executionCount) return false
        if (status != other.status) return false
        if (traceback != other.traceback) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The code execution output.
         */
        public var data: aws.sdk.kotlin.services.glue.model.StatementOutputData? = null
        /**
         * The name of the error in the output.
         */
        public var errorName: kotlin.String? = null
        /**
         * The error value of the output.
         */
        public var errorValue: kotlin.String? = null
        /**
         * The execution count of the output.
         */
        public var executionCount: kotlin.Int = 0
        /**
         * The status of the code execution output.
         */
        public var status: aws.sdk.kotlin.services.glue.model.StatementState? = null
        /**
         * The traceback of the output.
         */
        public var traceback: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.StatementOutput) : this() {
            this.data = x.data
            this.errorName = x.errorName
            this.errorValue = x.errorValue
            this.executionCount = x.executionCount
            this.status = x.status
            this.traceback = x.traceback
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy