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

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

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies code that runs when a job is run.
 */
public class JobCommand private constructor(builder: Builder) {
    /**
     * The name of the job command. For an Apache Spark ETL job, this must be `glueetl`. For a Python shell job, it must be `pythonshell`. For an Apache Spark streaming ETL job, this must be `gluestreaming`. For a Ray job, this must be `glueray`.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The Python version being used to run a Python shell job. Allowed values are 2 or 3.
     */
    public val pythonVersion: kotlin.String? = builder.pythonVersion
    /**
     * In Ray jobs, Runtime is used to specify the versions of Ray, Python and additional libraries available in your environment. This field is not used in other job types. For supported runtime environment values, see [Supported Ray runtime environments](https://docs.aws.amazon.com/glue/latest/dg/ray-jobs-section.html) in the Glue Developer Guide.
     */
    public val runtime: kotlin.String? = builder.runtime
    /**
     * Specifies the Amazon Simple Storage Service (Amazon S3) path to a script that runs a job.
     */
    public val scriptLocation: kotlin.String? = builder.scriptLocation

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

    override fun toString(): kotlin.String = buildString {
        append("JobCommand(")
        append("name=$name,")
        append("pythonVersion=$pythonVersion,")
        append("runtime=$runtime,")
        append("scriptLocation=$scriptLocation")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.hashCode() ?: 0
        result = 31 * result + (pythonVersion?.hashCode() ?: 0)
        result = 31 * result + (runtime?.hashCode() ?: 0)
        result = 31 * result + (scriptLocation?.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 JobCommand

        if (name != other.name) return false
        if (pythonVersion != other.pythonVersion) return false
        if (runtime != other.runtime) return false
        if (scriptLocation != other.scriptLocation) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the job command. For an Apache Spark ETL job, this must be `glueetl`. For a Python shell job, it must be `pythonshell`. For an Apache Spark streaming ETL job, this must be `gluestreaming`. For a Ray job, this must be `glueray`.
         */
        public var name: kotlin.String? = null
        /**
         * The Python version being used to run a Python shell job. Allowed values are 2 or 3.
         */
        public var pythonVersion: kotlin.String? = null
        /**
         * In Ray jobs, Runtime is used to specify the versions of Ray, Python and additional libraries available in your environment. This field is not used in other job types. For supported runtime environment values, see [Supported Ray runtime environments](https://docs.aws.amazon.com/glue/latest/dg/ray-jobs-section.html) in the Glue Developer Guide.
         */
        public var runtime: kotlin.String? = null
        /**
         * Specifies the Amazon Simple Storage Service (Amazon S3) path to a script that runs a job.
         */
        public var scriptLocation: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.JobCommand) : this() {
            this.name = x.name
            this.pythonVersion = x.pythonVersion
            this.runtime = x.runtime
            this.scriptLocation = x.scriptLocation
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy