commonMain.aws.sdk.kotlin.services.athena.model.SessionConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athena-jvm Show documentation
Show all versions of athena-jvm Show documentation
The AWS SDK for Kotlin client for Athena
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
/**
* Contains session configuration information.
*/
public class SessionConfiguration private constructor(builder: Builder) {
/**
* If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, `SSE_KMS` or `CSE_KMS`) and key information.
*/
public val encryptionConfiguration: aws.sdk.kotlin.services.athena.model.EncryptionConfiguration? = builder.encryptionConfiguration
/**
* The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
*/
public val executionRole: kotlin.String? = builder.executionRole
/**
* The idle timeout in seconds for the session.
*/
public val idleTimeoutSeconds: kotlin.Long? = builder.idleTimeoutSeconds
/**
* The Amazon S3 location that stores information for the notebook.
*/
public val workingDirectory: kotlin.String? = builder.workingDirectory
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.athena.model.SessionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SessionConfiguration(")
append("encryptionConfiguration=$encryptionConfiguration,")
append("executionRole=$executionRole,")
append("idleTimeoutSeconds=$idleTimeoutSeconds,")
append("workingDirectory=$workingDirectory")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = encryptionConfiguration?.hashCode() ?: 0
result = 31 * result + (executionRole?.hashCode() ?: 0)
result = 31 * result + (idleTimeoutSeconds?.hashCode() ?: 0)
result = 31 * result + (workingDirectory?.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 SessionConfiguration
if (encryptionConfiguration != other.encryptionConfiguration) return false
if (executionRole != other.executionRole) return false
if (idleTimeoutSeconds != other.idleTimeoutSeconds) return false
if (workingDirectory != other.workingDirectory) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.SessionConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, `SSE_KMS` or `CSE_KMS`) and key information.
*/
public var encryptionConfiguration: aws.sdk.kotlin.services.athena.model.EncryptionConfiguration? = null
/**
* The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
*/
public var executionRole: kotlin.String? = null
/**
* The idle timeout in seconds for the session.
*/
public var idleTimeoutSeconds: kotlin.Long? = null
/**
* The Amazon S3 location that stores information for the notebook.
*/
public var workingDirectory: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.athena.model.SessionConfiguration) : this() {
this.encryptionConfiguration = x.encryptionConfiguration
this.executionRole = x.executionRole
this.idleTimeoutSeconds = x.idleTimeoutSeconds
this.workingDirectory = x.workingDirectory
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.athena.model.SessionConfiguration = SessionConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.athena.model.EncryptionConfiguration] inside the given [block]
*/
public fun encryptionConfiguration(block: aws.sdk.kotlin.services.athena.model.EncryptionConfiguration.Builder.() -> kotlin.Unit) {
this.encryptionConfiguration = aws.sdk.kotlin.services.athena.model.EncryptionConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}