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

commonMain.aws.sdk.kotlin.services.glue.model.CreateMlTransformRequest.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

public class CreateMlTransformRequest private constructor(builder: Builder) {
    /**
     * A description of the machine learning transform that is being defined. The default is an empty string.
     */
    public val description: kotlin.String? = builder.description
    /**
     * This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see [Glue Versions](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions) in the developer guide.
     */
    public val glueVersion: kotlin.String? = builder.glueVersion
    /**
     * A list of Glue table definitions used by the transform.
     */
    public val inputRecordTables: List? = builder.inputRecordTables
    /**
     * The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the [Glue pricing page](https://aws.amazon.com/glue/pricing/).
     *
     * `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
     * + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
     * + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
     * + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
     * + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
     *
     * When the `WorkerType` field is set to a value other than `Standard`, the `MaxCapacity` field is set automatically and becomes read-only.
     *
     * When the `WorkerType` field is set to a value other than `Standard`, the `MaxCapacity` field is set automatically and becomes read-only.
     */
    public val maxCapacity: kotlin.Double? = builder.maxCapacity
    /**
     * The maximum number of times to retry a task for this transform after a task run fails.
     */
    public val maxRetries: kotlin.Int? = builder.maxRetries
    /**
     * The unique name that you give the transform when you create it.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The number of workers of a defined `workerType` that are allocated when this task runs.
     *
     * If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
     */
    public val numberOfWorkers: kotlin.Int? = builder.numberOfWorkers
    /**
     * The algorithmic parameters that are specific to the transform type used. Conditionally dependent on the transform type.
     */
    public val parameters: aws.sdk.kotlin.services.glue.model.TransformParameters? = builder.parameters
    /**
     * The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required permissions include both Glue service role permissions to Glue resources, and Amazon S3 permissions required by the transform.
     * + This role needs Glue service role permissions to allow access to resources in Glue. See [Attach a Policy to IAM Users That Access Glue](https://docs.aws.amazon.com/glue/latest/dg/attach-policy-iam-user.html).
     * + This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.
     */
    public val role: kotlin.String? = builder.role
    /**
     * The tags to use with this machine learning transform. You may use tags to limit access to the machine learning transform. For more information about tags in Glue, see [Amazon Web Services Tags in Glue](https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in the developer guide.
     */
    public val tags: Map? = builder.tags
    /**
     * The timeout of the task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters `TIMEOUT` status. The default is 2,880 minutes (48 hours).
     */
    public val timeout: kotlin.Int? = builder.timeout
    /**
     * The encryption-at-rest settings of the transform that apply to accessing user data. Machine learning transforms can access user data encrypted in Amazon S3 using KMS.
     */
    public val transformEncryption: aws.sdk.kotlin.services.glue.model.TransformEncryption? = builder.transformEncryption
    /**
     * The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.
     * + For the `Standard` worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
     * + For the `G.1X` worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.
     * + For the `G.2X` worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.
     *
     * `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
     * + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
     * + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
     * + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
     * + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
     */
    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.CreateMlTransformRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateMlTransformRequest(")
        append("description=$description,")
        append("glueVersion=$glueVersion,")
        append("inputRecordTables=$inputRecordTables,")
        append("maxCapacity=$maxCapacity,")
        append("maxRetries=$maxRetries,")
        append("name=$name,")
        append("numberOfWorkers=$numberOfWorkers,")
        append("parameters=$parameters,")
        append("role=$role,")
        append("tags=$tags,")
        append("timeout=$timeout,")
        append("transformEncryption=$transformEncryption,")
        append("workerType=$workerType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (glueVersion?.hashCode() ?: 0)
        result = 31 * result + (inputRecordTables?.hashCode() ?: 0)
        result = 31 * result + (maxCapacity?.hashCode() ?: 0)
        result = 31 * result + (maxRetries ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (numberOfWorkers ?: 0)
        result = 31 * result + (parameters?.hashCode() ?: 0)
        result = 31 * result + (role?.hashCode() ?: 0)
        result = 31 * result + (tags?.hashCode() ?: 0)
        result = 31 * result + (timeout ?: 0)
        result = 31 * result + (transformEncryption?.hashCode() ?: 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 CreateMlTransformRequest

        if (description != other.description) return false
        if (glueVersion != other.glueVersion) return false
        if (inputRecordTables != other.inputRecordTables) return false
        if (!(maxCapacity?.equals(other.maxCapacity) ?: (other.maxCapacity == null))) return false
        if (maxRetries != other.maxRetries) return false
        if (name != other.name) return false
        if (numberOfWorkers != other.numberOfWorkers) return false
        if (parameters != other.parameters) return false
        if (role != other.role) return false
        if (tags != other.tags) return false
        if (timeout != other.timeout) return false
        if (transformEncryption != other.transformEncryption) return false
        if (workerType != other.workerType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A description of the machine learning transform that is being defined. The default is an empty string.
         */
        public var description: kotlin.String? = null
        /**
         * This value determines which version of Glue this machine learning transform is compatible with. Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see [Glue Versions](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html#release-notes-versions) in the developer guide.
         */
        public var glueVersion: kotlin.String? = null
        /**
         * A list of Glue table definitions used by the transform.
         */
        public var inputRecordTables: List? = null
        /**
         * The number of Glue data processing units (DPUs) that are allocated to task runs for this transform. You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the [Glue pricing page](https://aws.amazon.com/glue/pricing/).
         *
         * `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
         * + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
         * + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
         * + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
         * + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
         *
         * When the `WorkerType` field is set to a value other than `Standard`, the `MaxCapacity` field is set automatically and becomes read-only.
         *
         * When the `WorkerType` field is set to a value other than `Standard`, the `MaxCapacity` field is set automatically and becomes read-only.
         */
        public var maxCapacity: kotlin.Double? = null
        /**
         * The maximum number of times to retry a task for this transform after a task run fails.
         */
        public var maxRetries: kotlin.Int? = null
        /**
         * The unique name that you give the transform when you create it.
         */
        public var name: kotlin.String? = null
        /**
         * The number of workers of a defined `workerType` that are allocated when this task runs.
         *
         * If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
         */
        public var numberOfWorkers: kotlin.Int? = null
        /**
         * The algorithmic parameters that are specific to the transform type used. Conditionally dependent on the transform type.
         */
        public var parameters: aws.sdk.kotlin.services.glue.model.TransformParameters? = null
        /**
         * The name or Amazon Resource Name (ARN) of the IAM role with the required permissions. The required permissions include both Glue service role permissions to Glue resources, and Amazon S3 permissions required by the transform.
         * + This role needs Glue service role permissions to allow access to resources in Glue. See [Attach a Policy to IAM Users That Access Glue](https://docs.aws.amazon.com/glue/latest/dg/attach-policy-iam-user.html).
         * + This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.
         */
        public var role: kotlin.String? = null
        /**
         * The tags to use with this machine learning transform. You may use tags to limit access to the machine learning transform. For more information about tags in Glue, see [Amazon Web Services Tags in Glue](https://docs.aws.amazon.com/glue/latest/dg/monitor-tags.html) in the developer guide.
         */
        public var tags: Map? = null
        /**
         * The timeout of the task run for this transform in minutes. This is the maximum time that a task run for this transform can consume resources before it is terminated and enters `TIMEOUT` status. The default is 2,880 minutes (48 hours).
         */
        public var timeout: kotlin.Int? = null
        /**
         * The encryption-at-rest settings of the transform that apply to accessing user data. Machine learning transforms can access user data encrypted in Amazon S3 using KMS.
         */
        public var transformEncryption: aws.sdk.kotlin.services.glue.model.TransformEncryption? = null
        /**
         * The type of predefined worker that is allocated when this task runs. Accepts a value of Standard, G.1X, or G.2X.
         * + For the `Standard` worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
         * + For the `G.1X` worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.
         * + For the `G.2X` worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.
         *
         * `MaxCapacity` is a mutually exclusive option with `NumberOfWorkers` and `WorkerType`.
         * + If either `NumberOfWorkers` or `WorkerType` is set, then `MaxCapacity` cannot be set.
         * + If `MaxCapacity` is set then neither `NumberOfWorkers` or `WorkerType` can be set.
         * + If `WorkerType` is set, then `NumberOfWorkers` is required (and vice versa).
         * + `MaxCapacity` and `NumberOfWorkers` must both be at least 1.
         */
        public var workerType: aws.sdk.kotlin.services.glue.model.WorkerType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.CreateMlTransformRequest) : this() {
            this.description = x.description
            this.glueVersion = x.glueVersion
            this.inputRecordTables = x.inputRecordTables
            this.maxCapacity = x.maxCapacity
            this.maxRetries = x.maxRetries
            this.name = x.name
            this.numberOfWorkers = x.numberOfWorkers
            this.parameters = x.parameters
            this.role = x.role
            this.tags = x.tags
            this.timeout = x.timeout
            this.transformEncryption = x.transformEncryption
            this.workerType = x.workerType
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy