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

commonMain.aws.sdk.kotlin.services.batch.model.EksVolume.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.batch.model



/**
 * Specifies an Amazon EKS volume for a job definition.
 */
public class EksVolume private constructor(builder: Builder) {
    /**
     * Specifies the configuration of a Kubernetes `emptyDir` volume. For more information, see [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) in the *Kubernetes documentation*.
     */
    public val emptyDir: aws.sdk.kotlin.services.batch.model.EksEmptyDir? = builder.emptyDir
    /**
     * Specifies the configuration of a Kubernetes `hostPath` volume. For more information, see [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) in the *Kubernetes documentation*.
     */
    public val hostPath: aws.sdk.kotlin.services.batch.model.EksHostPath? = builder.hostPath
    /**
     * The name of the volume. The name must be allowed as a DNS subdomain name. For more information, see [DNS subdomain names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names) in the *Kubernetes documentation*.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Specifies the configuration of a Kubernetes `secret` volume. For more information, see [secret](https://kubernetes.io/docs/concepts/storage/volumes/#secret) in the *Kubernetes documentation*.
     */
    public val secret: aws.sdk.kotlin.services.batch.model.EksSecret? = builder.secret

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

    override fun toString(): kotlin.String = buildString {
        append("EksVolume(")
        append("emptyDir=$emptyDir,")
        append("hostPath=$hostPath,")
        append("name=$name,")
        append("secret=$secret")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = emptyDir?.hashCode() ?: 0
        result = 31 * result + (hostPath?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (secret?.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 EksVolume

        if (emptyDir != other.emptyDir) return false
        if (hostPath != other.hostPath) return false
        if (name != other.name) return false
        if (secret != other.secret) return false

        return true
    }

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

    public class Builder {
        /**
         * Specifies the configuration of a Kubernetes `emptyDir` volume. For more information, see [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) in the *Kubernetes documentation*.
         */
        public var emptyDir: aws.sdk.kotlin.services.batch.model.EksEmptyDir? = null
        /**
         * Specifies the configuration of a Kubernetes `hostPath` volume. For more information, see [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) in the *Kubernetes documentation*.
         */
        public var hostPath: aws.sdk.kotlin.services.batch.model.EksHostPath? = null
        /**
         * The name of the volume. The name must be allowed as a DNS subdomain name. For more information, see [DNS subdomain names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names) in the *Kubernetes documentation*.
         */
        public var name: kotlin.String? = null
        /**
         * Specifies the configuration of a Kubernetes `secret` volume. For more information, see [secret](https://kubernetes.io/docs/concepts/storage/volumes/#secret) in the *Kubernetes documentation*.
         */
        public var secret: aws.sdk.kotlin.services.batch.model.EksSecret? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.batch.model.EksVolume) : this() {
            this.emptyDir = x.emptyDir
            this.hostPath = x.hostPath
            this.name = x.name
            this.secret = x.secret
        }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy