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

commonMain.aws.sdk.kotlin.services.cleanroomsml.model.ConfiguredAudienceModelOutputConfig.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 necessary for the configure audience model output.
 */
public class ConfiguredAudienceModelOutputConfig private constructor(builder: Builder) {
    /**
     * Defines the Amazon S3 bucket where the configured audience is stored.
     */
    public val destination: aws.sdk.kotlin.services.cleanroomsml.model.AudienceDestination? = builder.destination
    /**
     * The ARN of the IAM role that can write the Amazon S3 bucket.
     */
    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.ConfiguredAudienceModelOutputConfig = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ConfiguredAudienceModelOutputConfig(")
        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 ConfiguredAudienceModelOutputConfig

        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.ConfiguredAudienceModelOutputConfig = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Defines the Amazon S3 bucket where the configured audience is stored.
         */
        public var destination: aws.sdk.kotlin.services.cleanroomsml.model.AudienceDestination? = null
        /**
         * The ARN of the IAM role that can write the Amazon S3 bucket.
         */
        public var roleArn: kotlin.String? = null

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy