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

commonMain.aws.sdk.kotlin.services.cleanroomsml.model.MlOutputConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cleanroomsml.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Configuration information about how the exported model artifacts are stored.
 */
public class MlOutputConfiguration private constructor(builder: Builder) {
    /**
     * The Amazon S3 location where exported model artifacts are stored.
     */
    public val destination: aws.sdk.kotlin.services.cleanroomsml.model.Destination? = builder.destination
    /**
     * The Amazon Resource Name (ARN) of the service access role that is used to store the model artifacts.
     */
    public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }

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

    override fun toString(): kotlin.String = buildString {
        append("MlOutputConfiguration(")
        append("destination=$destination,")
        append("roleArn=$roleArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = destination?.hashCode() ?: 0
        result = 31 * result + (roleArn.hashCode())
        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 MlOutputConfiguration

        if (destination != other.destination) return false
        if (roleArn != other.roleArn) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon S3 location where exported model artifacts are stored.
         */
        public var destination: aws.sdk.kotlin.services.cleanroomsml.model.Destination? = null
        /**
         * The Amazon Resource Name (ARN) of the service access role that is used to store the model artifacts.
         */
        public var roleArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.MlOutputConfiguration) : this() {
            this.destination = x.destination
            this.roleArn = x.roleArn
        }

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

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

        internal fun correctErrors(): Builder {
            if (roleArn == null) roleArn = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy