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

commonMain.aws.sdk.kotlin.services.emr.model.Command.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.emr.model



/**
 * An entity describing an executable that runs on a cluster.
 */
public class Command private constructor(builder: Builder) {
    /**
     * Arguments for Amazon EMR to pass to the command for execution.
     */
    public val args: List? = builder.args
    /**
     * The name of the command.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The Amazon S3 location of the command script.
     */
    public val scriptPath: kotlin.String? = builder.scriptPath

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

    override fun toString(): kotlin.String = buildString {
        append("Command(")
        append("args=$args,")
        append("name=$name,")
        append("scriptPath=$scriptPath)")
    }

    override fun hashCode(): kotlin.Int {
        var result = args?.hashCode() ?: 0
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (scriptPath?.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 Command

        if (args != other.args) return false
        if (name != other.name) return false
        if (scriptPath != other.scriptPath) return false

        return true
    }

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

    public class Builder {
        /**
         * Arguments for Amazon EMR to pass to the command for execution.
         */
        public var args: List? = null
        /**
         * The name of the command.
         */
        public var name: kotlin.String? = null
        /**
         * The Amazon S3 location of the command script.
         */
        public var scriptPath: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.Command) : this() {
            this.args = x.args
            this.name = x.name
            this.scriptPath = x.scriptPath
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.emr.model.Command = Command(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy