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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Request to create a new session.
 */
public class CreateSessionRequest private constructor(builder: Builder) {
    /**
     * The `SessionCommand` that runs the job.
     */
    public val command: aws.sdk.kotlin.services.glue.model.SessionCommand? = builder.command
    /**
     * The number of connections to use for the session.
     */
    public val connections: aws.sdk.kotlin.services.glue.model.ConnectionsList? = builder.connections
    /**
     * A map array of key-value pairs. Max is 75 pairs.
     */
    public val defaultArguments: Map? = builder.defaultArguments
    /**
     * The description of the session.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
     */
    public val glueVersion: kotlin.String? = builder.glueVersion
    /**
     * The ID of the session request.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.
     */
    public val idleTimeout: kotlin.Int? = builder.idleTimeout
    /**
     * The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
     */
    public val maxCapacity: kotlin.Double? = builder.maxCapacity
    /**
     * The number of workers of a defined `WorkerType` to use for the session.
     */
    public val numberOfWorkers: kotlin.Int? = builder.numberOfWorkers
    /**
     * The origin of the request.
     */
    public val requestOrigin: kotlin.String? = builder.requestOrigin
    /**
     * The IAM Role ARN
     */
    public val role: kotlin.String? = builder.role
    /**
     * The name of the SecurityConfiguration structure to be used with the session
     */
    public val securityConfiguration: kotlin.String? = builder.securityConfiguration
    /**
     * The map of key value pairs (tags) belonging to the session.
     */
    public val tags: Map? = builder.tags
    /**
     * The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes), the maximum session lifetime for this job type. Consult the documentation for other job types.
     */
    public val timeout: kotlin.Int? = builder.timeout
    /**
     * The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.
     * + For the `G.1X` worker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 84GB disk (approximately 34GB free), and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.
     * + For the `G.2X` worker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 128GB disk (approximately 77GB free), and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.
     * + For the `G.4X` worker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk (approximately 235GB free), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).
     * + For the `G.8X` worker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk (approximately 487GB free), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs, in the same Amazon Web Services Regions as supported for the `G.4X` worker type.
     * + For the `Z.2X` worker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk (approximately 120GB free), and provides up to 8 Ray workers based on the autoscaler.
     */
    public val workerType: aws.sdk.kotlin.services.glue.model.WorkerType? = builder.workerType

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

    override fun toString(): kotlin.String = buildString {
        append("CreateSessionRequest(")
        append("command=$command,")
        append("connections=$connections,")
        append("defaultArguments=$defaultArguments,")
        append("description=$description,")
        append("glueVersion=$glueVersion,")
        append("id=$id,")
        append("idleTimeout=$idleTimeout,")
        append("maxCapacity=$maxCapacity,")
        append("numberOfWorkers=$numberOfWorkers,")
        append("requestOrigin=$requestOrigin,")
        append("role=$role,")
        append("securityConfiguration=$securityConfiguration,")
        append("tags=$tags,")
        append("timeout=$timeout,")
        append("workerType=$workerType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = command?.hashCode() ?: 0
        result = 31 * result + (connections?.hashCode() ?: 0)
        result = 31 * result + (defaultArguments?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (glueVersion?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (idleTimeout ?: 0)
        result = 31 * result + (maxCapacity?.hashCode() ?: 0)
        result = 31 * result + (numberOfWorkers ?: 0)
        result = 31 * result + (requestOrigin?.hashCode() ?: 0)
        result = 31 * result + (role?.hashCode() ?: 0)
        result = 31 * result + (securityConfiguration?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (timeout ?: 0)
        result = 31 * result + (workerType?.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 CreateSessionRequest

        if (command != other.command) return false
        if (connections != other.connections) return false
        if (defaultArguments != other.defaultArguments) return false
        if (description != other.description) return false
        if (glueVersion != other.glueVersion) return false
        if (id != other.id) return false
        if (idleTimeout != other.idleTimeout) return false
        if (!(maxCapacity?.equals(other.maxCapacity) ?: (other.maxCapacity == null))) return false
        if (numberOfWorkers != other.numberOfWorkers) return false
        if (requestOrigin != other.requestOrigin) return false
        if (role != other.role) return false
        if (securityConfiguration != other.securityConfiguration) return false
        if (tags != other.tags) return false
        if (timeout != other.timeout) return false
        if (workerType != other.workerType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The `SessionCommand` that runs the job.
         */
        public var command: aws.sdk.kotlin.services.glue.model.SessionCommand? = null
        /**
         * The number of connections to use for the session.
         */
        public var connections: aws.sdk.kotlin.services.glue.model.ConnectionsList? = null
        /**
         * A map array of key-value pairs. Max is 75 pairs.
         */
        public var defaultArguments: Map? = null
        /**
         * The description of the session.
         */
        public var description: kotlin.String? = null
        /**
         * The Glue version determines the versions of Apache Spark and Python that Glue supports. The GlueVersion must be greater than 2.0.
         */
        public var glueVersion: kotlin.String? = null
        /**
         * The ID of the session request.
         */
        public var id: kotlin.String? = null
        /**
         * The number of minutes when idle before session times out. Default for Spark ETL jobs is value of Timeout. Consult the documentation for other job types.
         */
        public var idleTimeout: kotlin.Int? = null
        /**
         * The number of Glue data processing units (DPUs) that can be allocated when the job runs. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB memory.
         */
        public var maxCapacity: kotlin.Double? = null
        /**
         * The number of workers of a defined `WorkerType` to use for the session.
         */
        public var numberOfWorkers: kotlin.Int? = null
        /**
         * The origin of the request.
         */
        public var requestOrigin: kotlin.String? = null
        /**
         * The IAM Role ARN
         */
        public var role: kotlin.String? = null
        /**
         * The name of the SecurityConfiguration structure to be used with the session
         */
        public var securityConfiguration: kotlin.String? = null
        /**
         * The map of key value pairs (tags) belonging to the session.
         */
        public var tags: Map? = null
        /**
         * The number of minutes before session times out. Default for Spark ETL jobs is 48 hours (2880 minutes), the maximum session lifetime for this job type. Consult the documentation for other job types.
         */
        public var timeout: kotlin.Int? = null
        /**
         * The type of predefined worker that is allocated when a job runs. Accepts a value of G.1X, G.2X, G.4X, or G.8X for Spark jobs. Accepts the value Z.2X for Ray notebooks.
         * + For the `G.1X` worker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 84GB disk (approximately 34GB free), and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.
         * + For the `G.2X` worker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 128GB disk (approximately 77GB free), and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.
         * + For the `G.4X` worker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk (approximately 235GB free), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).
         * + For the `G.8X` worker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk (approximately 487GB free), and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs, in the same Amazon Web Services Regions as supported for the `G.4X` worker type.
         * + For the `Z.2X` worker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk (approximately 120GB free), and provides up to 8 Ray workers based on the autoscaler.
         */
        public var workerType: aws.sdk.kotlin.services.glue.model.WorkerType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.CreateSessionRequest) : this() {
            this.command = x.command
            this.connections = x.connections
            this.defaultArguments = x.defaultArguments
            this.description = x.description
            this.glueVersion = x.glueVersion
            this.id = x.id
            this.idleTimeout = x.idleTimeout
            this.maxCapacity = x.maxCapacity
            this.numberOfWorkers = x.numberOfWorkers
            this.requestOrigin = x.requestOrigin
            this.role = x.role
            this.securityConfiguration = x.securityConfiguration
            this.tags = x.tags
            this.timeout = x.timeout
            this.workerType = x.workerType
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy