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

commonMain.aws.sdk.kotlin.services.athena.model.GetSessionResponse.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

public class GetSessionResponse private constructor(builder: Builder) {
    /**
     * The session description.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Contains engine configuration information like DPU usage.
     */
    public val engineConfiguration: aws.sdk.kotlin.services.athena.model.EngineConfiguration? = builder.engineConfiguration
    /**
     * The engine version used by the session (for example, `PySpark engine version 3`). You can get a list of engine versions by calling ListEngineVersions.
     */
    public val engineVersion: kotlin.String? = builder.engineVersion
    /**
     * The notebook version.
     */
    public val notebookVersion: kotlin.String? = builder.notebookVersion
    /**
     * Contains the workgroup configuration information used by the session.
     */
    public val sessionConfiguration: aws.sdk.kotlin.services.athena.model.SessionConfiguration? = builder.sessionConfiguration
    /**
     * The session ID.
     */
    public val sessionId: kotlin.String? = builder.sessionId
    /**
     * Contains the DPU execution time.
     */
    public val statistics: aws.sdk.kotlin.services.athena.model.SessionStatistics? = builder.statistics
    /**
     * Contains information about the status of the session.
     */
    public val status: aws.sdk.kotlin.services.athena.model.SessionStatus? = builder.status
    /**
     * The workgroup to which the session belongs.
     */
    public val workGroup: kotlin.String? = builder.workGroup

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

    override fun toString(): kotlin.String = buildString {
        append("GetSessionResponse(")
        append("description=$description,")
        append("engineConfiguration=$engineConfiguration,")
        append("engineVersion=$engineVersion,")
        append("notebookVersion=$notebookVersion,")
        append("sessionConfiguration=$sessionConfiguration,")
        append("sessionId=$sessionId,")
        append("statistics=$statistics,")
        append("status=$status,")
        append("workGroup=$workGroup")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (engineConfiguration?.hashCode() ?: 0)
        result = 31 * result + (engineVersion?.hashCode() ?: 0)
        result = 31 * result + (notebookVersion?.hashCode() ?: 0)
        result = 31 * result + (sessionConfiguration?.hashCode() ?: 0)
        result = 31 * result + (sessionId?.hashCode() ?: 0)
        result = 31 * result + (statistics?.hashCode() ?: 0)
        result = 31 * result + (status?.hashCode() ?: 0)
        result = 31 * result + (workGroup?.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 GetSessionResponse

        if (description != other.description) return false
        if (engineConfiguration != other.engineConfiguration) return false
        if (engineVersion != other.engineVersion) return false
        if (notebookVersion != other.notebookVersion) return false
        if (sessionConfiguration != other.sessionConfiguration) return false
        if (sessionId != other.sessionId) return false
        if (statistics != other.statistics) return false
        if (status != other.status) return false
        if (workGroup != other.workGroup) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The session description.
         */
        public var description: kotlin.String? = null
        /**
         * Contains engine configuration information like DPU usage.
         */
        public var engineConfiguration: aws.sdk.kotlin.services.athena.model.EngineConfiguration? = null
        /**
         * The engine version used by the session (for example, `PySpark engine version 3`). You can get a list of engine versions by calling ListEngineVersions.
         */
        public var engineVersion: kotlin.String? = null
        /**
         * The notebook version.
         */
        public var notebookVersion: kotlin.String? = null
        /**
         * Contains the workgroup configuration information used by the session.
         */
        public var sessionConfiguration: aws.sdk.kotlin.services.athena.model.SessionConfiguration? = null
        /**
         * The session ID.
         */
        public var sessionId: kotlin.String? = null
        /**
         * Contains the DPU execution time.
         */
        public var statistics: aws.sdk.kotlin.services.athena.model.SessionStatistics? = null
        /**
         * Contains information about the status of the session.
         */
        public var status: aws.sdk.kotlin.services.athena.model.SessionStatus? = null
        /**
         * The workgroup to which the session belongs.
         */
        public var workGroup: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.athena.model.GetSessionResponse) : this() {
            this.description = x.description
            this.engineConfiguration = x.engineConfiguration
            this.engineVersion = x.engineVersion
            this.notebookVersion = x.notebookVersion
            this.sessionConfiguration = x.sessionConfiguration
            this.sessionId = x.sessionId
            this.statistics = x.statistics
            this.status = x.status
            this.workGroup = x.workGroup
        }

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy