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

commonMain.aws.sdk.kotlin.services.pipes.model.BatchContainerOverrides.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pipes.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The overrides that are sent to a container.
 */
public class BatchContainerOverrides private constructor(builder: Builder) {
    /**
     * The command to send to the container that overrides the default command from the Docker image or the task definition.
     */
    public val command: List? = builder.command
    /**
     * The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
     *
     * Environment variables cannot start with "`Batch`". This naming convention is reserved for variables that Batch sets.
     */
    public val environment: List? = builder.environment
    /**
     * The instance type to use for a multi-node parallel job.
     *
     * This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided.
     */
    public val instanceType: kotlin.String? = builder.instanceType
    /**
     * The type and amount of resources to assign to a container. This overrides the settings in the job definition. The supported resources include `GPU`, `MEMORY`, and `VCPU`.
     */
    public val resourceRequirements: List? = builder.resourceRequirements

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

    override fun toString(): kotlin.String = buildString {
        append("BatchContainerOverrides(")
        append("command=$command,")
        append("environment=$environment,")
        append("instanceType=$instanceType,")
        append("resourceRequirements=$resourceRequirements")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = command?.hashCode() ?: 0
        result = 31 * result + (environment?.hashCode() ?: 0)
        result = 31 * result + (instanceType?.hashCode() ?: 0)
        result = 31 * result + (resourceRequirements?.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 BatchContainerOverrides

        if (command != other.command) return false
        if (environment != other.environment) return false
        if (instanceType != other.instanceType) return false
        if (resourceRequirements != other.resourceRequirements) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The command to send to the container that overrides the default command from the Docker image or the task definition.
         */
        public var command: List? = null
        /**
         * The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
         *
         * Environment variables cannot start with "`Batch`". This naming convention is reserved for variables that Batch sets.
         */
        public var environment: List? = null
        /**
         * The instance type to use for a multi-node parallel job.
         *
         * This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided.
         */
        public var instanceType: kotlin.String? = null
        /**
         * The type and amount of resources to assign to a container. This overrides the settings in the job definition. The supported resources include `GPU`, `MEMORY`, and `VCPU`.
         */
        public var resourceRequirements: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pipes.model.BatchContainerOverrides) : this() {
            this.command = x.command
            this.environment = x.environment
            this.instanceType = x.instanceType
            this.resourceRequirements = x.resourceRequirements
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy