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

aws.sdk.kotlin.services.sagemaker.model.UpdateNotebookInstanceLifecycleConfigRequest.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



class UpdateNotebookInstanceLifecycleConfigRequest private constructor(builder: BuilderImpl) {
    /**
     * The name of the lifecycle configuration.
     */
    val notebookInstanceLifecycleConfigName: String? = builder.notebookInstanceLifecycleConfigName
    /**
     * The shell script that runs only once, when you create a notebook instance. The shell
     * script must be a base64-encoded string.
     */
    val onCreate: List? = builder.onCreate
    /**
     * The shell script that runs every time you start a notebook instance, including when
     * you create the notebook instance. The shell script must be a base64-encoded
     * string.
     */
    val onStart: List? = builder.onStart

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

        internal fun builder(): DslBuilder = BuilderImpl()

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

    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateNotebookInstanceLifecycleConfigRequest(")
        append("notebookInstanceLifecycleConfigName=$notebookInstanceLifecycleConfigName,")
        append("onCreate=$onCreate,")
        append("onStart=$onStart)")
    }

    override fun hashCode(): kotlin.Int {
        var result = notebookInstanceLifecycleConfigName?.hashCode() ?: 0
        result = 31 * result + (onCreate?.hashCode() ?: 0)
        result = 31 * result + (onStart?.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 UpdateNotebookInstanceLifecycleConfigRequest

        if (notebookInstanceLifecycleConfigName != other.notebookInstanceLifecycleConfigName) return false
        if (onCreate != other.onCreate) return false
        if (onStart != other.onStart) return false

        return true
    }

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

    interface FluentBuilder {
        fun build(): UpdateNotebookInstanceLifecycleConfigRequest
        /**
         * The name of the lifecycle configuration.
         */
        fun notebookInstanceLifecycleConfigName(notebookInstanceLifecycleConfigName: String): FluentBuilder
        /**
         * The shell script that runs only once, when you create a notebook instance. The shell
         * script must be a base64-encoded string.
         */
        fun onCreate(onCreate: List): FluentBuilder
        /**
         * The shell script that runs every time you start a notebook instance, including when
         * you create the notebook instance. The shell script must be a base64-encoded
         * string.
         */
        fun onStart(onStart: List): FluentBuilder
    }

    interface DslBuilder {
        /**
         * The name of the lifecycle configuration.
         */
        var notebookInstanceLifecycleConfigName: String?
        /**
         * The shell script that runs only once, when you create a notebook instance. The shell
         * script must be a base64-encoded string.
         */
        var onCreate: List?
        /**
         * The shell script that runs every time you start a notebook instance, including when
         * you create the notebook instance. The shell script must be a base64-encoded
         * string.
         */
        var onStart: List?

        fun build(): UpdateNotebookInstanceLifecycleConfigRequest
    }

    private class BuilderImpl() : FluentBuilder, DslBuilder {
        override var notebookInstanceLifecycleConfigName: String? = null
        override var onCreate: List? = null
        override var onStart: List? = null

        constructor(x: UpdateNotebookInstanceLifecycleConfigRequest) : this() {
            this.notebookInstanceLifecycleConfigName = x.notebookInstanceLifecycleConfigName
            this.onCreate = x.onCreate
            this.onStart = x.onStart
        }

        override fun build(): UpdateNotebookInstanceLifecycleConfigRequest = UpdateNotebookInstanceLifecycleConfigRequest(this)
        override fun notebookInstanceLifecycleConfigName(notebookInstanceLifecycleConfigName: String): FluentBuilder = apply { this.notebookInstanceLifecycleConfigName = notebookInstanceLifecycleConfigName }
        override fun onCreate(onCreate: List): FluentBuilder = apply { this.onCreate = onCreate }
        override fun onStart(onStart: List): FluentBuilder = apply { this.onStart = onStart }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy