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

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



/**
 * Specifies the ARN's of a SageMaker image and SageMaker image version, and the instance type that
 * the version runs on.
 */
class ResourceSpec private constructor(builder: BuilderImpl) {
    /**
     * The instance type that the image version runs on.
     */
    val instanceType: AppInstanceType? = builder.instanceType
    /**
     * The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.
     */
    val lifecycleConfigArn: String? = builder.lifecycleConfigArn
    /**
     * The ARN of the SageMaker image that the image version belongs to.
     */
    val sageMakerImageArn: String? = builder.sageMakerImageArn
    /**
     * The ARN of the image version created on the instance.
     */
    val sageMakerImageVersionArn: String? = builder.sageMakerImageVersionArn

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

        internal fun builder(): DslBuilder = BuilderImpl()

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

    }

    override fun toString(): kotlin.String = buildString {
        append("ResourceSpec(")
        append("instanceType=$instanceType,")
        append("lifecycleConfigArn=$lifecycleConfigArn,")
        append("sageMakerImageArn=$sageMakerImageArn,")
        append("sageMakerImageVersionArn=$sageMakerImageVersionArn)")
    }

    override fun hashCode(): kotlin.Int {
        var result = instanceType?.hashCode() ?: 0
        result = 31 * result + (lifecycleConfigArn?.hashCode() ?: 0)
        result = 31 * result + (sageMakerImageArn?.hashCode() ?: 0)
        result = 31 * result + (sageMakerImageVersionArn?.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 ResourceSpec

        if (instanceType != other.instanceType) return false
        if (lifecycleConfigArn != other.lifecycleConfigArn) return false
        if (sageMakerImageArn != other.sageMakerImageArn) return false
        if (sageMakerImageVersionArn != other.sageMakerImageVersionArn) return false

        return true
    }

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

    interface FluentBuilder {
        fun build(): ResourceSpec
        /**
         * The instance type that the image version runs on.
         */
        fun instanceType(instanceType: AppInstanceType): FluentBuilder
        /**
         * The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.
         */
        fun lifecycleConfigArn(lifecycleConfigArn: String): FluentBuilder
        /**
         * The ARN of the SageMaker image that the image version belongs to.
         */
        fun sageMakerImageArn(sageMakerImageArn: String): FluentBuilder
        /**
         * The ARN of the image version created on the instance.
         */
        fun sageMakerImageVersionArn(sageMakerImageVersionArn: String): FluentBuilder
    }

    interface DslBuilder {
        /**
         * The instance type that the image version runs on.
         */
        var instanceType: AppInstanceType?
        /**
         * The Amazon Resource Name (ARN) of the Lifecycle Configuration attached to the Resource.
         */
        var lifecycleConfigArn: String?
        /**
         * The ARN of the SageMaker image that the image version belongs to.
         */
        var sageMakerImageArn: String?
        /**
         * The ARN of the image version created on the instance.
         */
        var sageMakerImageVersionArn: String?

        fun build(): ResourceSpec
    }

    private class BuilderImpl() : FluentBuilder, DslBuilder {
        override var instanceType: AppInstanceType? = null
        override var lifecycleConfigArn: String? = null
        override var sageMakerImageArn: String? = null
        override var sageMakerImageVersionArn: String? = null

        constructor(x: ResourceSpec) : this() {
            this.instanceType = x.instanceType
            this.lifecycleConfigArn = x.lifecycleConfigArn
            this.sageMakerImageArn = x.sageMakerImageArn
            this.sageMakerImageVersionArn = x.sageMakerImageVersionArn
        }

        override fun build(): ResourceSpec = ResourceSpec(this)
        override fun instanceType(instanceType: AppInstanceType): FluentBuilder = apply { this.instanceType = instanceType }
        override fun lifecycleConfigArn(lifecycleConfigArn: String): FluentBuilder = apply { this.lifecycleConfigArn = lifecycleConfigArn }
        override fun sageMakerImageArn(sageMakerImageArn: String): FluentBuilder = apply { this.sageMakerImageArn = sageMakerImageArn }
        override fun sageMakerImageVersionArn(sageMakerImageVersionArn: String): FluentBuilder = apply { this.sageMakerImageVersionArn = sageMakerImageVersionArn }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy