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

aws.sdk.kotlin.services.sagemaker.model.KernelGatewayImageConfig.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.sagemaker.model



/**
 * The configuration for the file system and kernels in a SageMaker image running as a
 * KernelGateway app.
 */
class KernelGatewayImageConfig private constructor(builder: BuilderImpl) {
    /**
     * The Amazon Elastic File System (EFS) storage configuration for a SageMaker image.
     */
    val fileSystemConfig: FileSystemConfig? = builder.fileSystemConfig
    /**
     * The specification of the Jupyter kernels in the image.
     */
    val kernelSpecs: List? = builder.kernelSpecs

    companion object {
        @JvmStatic
        fun fluentBuilder(): FluentBuilder = BuilderImpl()

        internal fun builder(): DslBuilder = BuilderImpl()

        operator fun invoke(block: DslBuilder.() -> kotlin.Unit): KernelGatewayImageConfig = BuilderImpl().apply(block).build()

    }

    override fun toString(): kotlin.String = buildString {
        append("KernelGatewayImageConfig(")
        append("fileSystemConfig=$fileSystemConfig,")
        append("kernelSpecs=$kernelSpecs)")
    }

    override fun hashCode(): kotlin.Int {
        var result = fileSystemConfig?.hashCode() ?: 0
        result = 31 * result + (kernelSpecs?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as KernelGatewayImageConfig

        if (fileSystemConfig != other.fileSystemConfig) return false
        if (kernelSpecs != other.kernelSpecs) return false

        return true
    }

    fun copy(block: DslBuilder.() -> kotlin.Unit = {}): KernelGatewayImageConfig = BuilderImpl(this).apply(block).build()

    interface FluentBuilder {
        fun build(): KernelGatewayImageConfig
        /**
         * The Amazon Elastic File System (EFS) storage configuration for a SageMaker image.
         */
        fun fileSystemConfig(fileSystemConfig: FileSystemConfig): FluentBuilder
        /**
         * The specification of the Jupyter kernels in the image.
         */
        fun kernelSpecs(kernelSpecs: List): FluentBuilder
    }

    interface DslBuilder {
        /**
         * The Amazon Elastic File System (EFS) storage configuration for a SageMaker image.
         */
        var fileSystemConfig: FileSystemConfig?
        /**
         * The specification of the Jupyter kernels in the image.
         */
        var kernelSpecs: List?

        fun build(): KernelGatewayImageConfig
        /**
         * construct an [aws.sdk.kotlin.services.sagemaker.model.FileSystemConfig] inside the given [block]
         */
        fun fileSystemConfig(block: FileSystemConfig.DslBuilder.() -> kotlin.Unit) {
            this.fileSystemConfig = FileSystemConfig.invoke(block)
        }
    }

    private class BuilderImpl() : FluentBuilder, DslBuilder {
        override var fileSystemConfig: FileSystemConfig? = null
        override var kernelSpecs: List? = null

        constructor(x: KernelGatewayImageConfig) : this() {
            this.fileSystemConfig = x.fileSystemConfig
            this.kernelSpecs = x.kernelSpecs
        }

        override fun build(): KernelGatewayImageConfig = KernelGatewayImageConfig(this)
        override fun fileSystemConfig(fileSystemConfig: FileSystemConfig): FluentBuilder = apply { this.fileSystemConfig = fileSystemConfig }
        override fun kernelSpecs(kernelSpecs: List): FluentBuilder = apply { this.kernelSpecs = kernelSpecs }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy