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

commonMain.aws.sdk.kotlin.services.wisdom.model.SessionData.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.wisdom.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about the session.
 */
public class SessionData private constructor(builder: Builder) {
    /**
     * The description of the session.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The configuration information for the session integration.
     */
    public val integrationConfiguration: aws.sdk.kotlin.services.wisdom.model.SessionIntegrationConfiguration? = builder.integrationConfiguration
    /**
     * The name of the session.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The Amazon Resource Name (ARN) of the session.
     */
    public val sessionArn: kotlin.String = requireNotNull(builder.sessionArn) { "A non-null value must be provided for sessionArn" }
    /**
     * The identifier of the session.
     */
    public val sessionId: kotlin.String = requireNotNull(builder.sessionId) { "A non-null value must be provided for sessionId" }
    /**
     * The tags used to organize, track, or control access for this resource.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("SessionData(")
        append("description=$description,")
        append("integrationConfiguration=$integrationConfiguration,")
        append("name=$name,")
        append("sessionArn=$sessionArn,")
        append("sessionId=$sessionId,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (integrationConfiguration?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (sessionArn.hashCode())
        result = 31 * result + (sessionId.hashCode())
        result = 31 * result + (tags?.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 SessionData

        if (description != other.description) return false
        if (integrationConfiguration != other.integrationConfiguration) return false
        if (name != other.name) return false
        if (sessionArn != other.sessionArn) return false
        if (sessionId != other.sessionId) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The description of the session.
         */
        public var description: kotlin.String? = null
        /**
         * The configuration information for the session integration.
         */
        public var integrationConfiguration: aws.sdk.kotlin.services.wisdom.model.SessionIntegrationConfiguration? = null
        /**
         * The name of the session.
         */
        public var name: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the session.
         */
        public var sessionArn: kotlin.String? = null
        /**
         * The identifier of the session.
         */
        public var sessionId: kotlin.String? = null
        /**
         * The tags used to organize, track, or control access for this resource.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wisdom.model.SessionData) : this() {
            this.description = x.description
            this.integrationConfiguration = x.integrationConfiguration
            this.name = x.name
            this.sessionArn = x.sessionArn
            this.sessionId = x.sessionId
            this.tags = x.tags
        }

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

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

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            if (sessionArn == null) sessionArn = ""
            if (sessionId == null) sessionId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy