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

commonMain.aws.sdk.kotlin.services.personalize.model.CreateMetricAttributionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.personalize.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateMetricAttributionRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the destination dataset group for the metric attribution.
     */
    public val datasetGroupArn: kotlin.String? = builder.datasetGroupArn
    /**
     * A list of metric attributes for the metric attribution. Each metric attribute specifies an event type to track and a function. Available functions are `SUM()` or `SAMPLECOUNT()`. For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).
     */
    public val metrics: List? = builder.metrics
    /**
     * The output configuration details for the metric attribution.
     */
    public val metricsOutputConfig: aws.sdk.kotlin.services.personalize.model.MetricAttributionOutput? = builder.metricsOutputConfig
    /**
     * A name for the metric attribution.
     */
    public val name: kotlin.String? = builder.name

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

    override fun toString(): kotlin.String = buildString {
        append("CreateMetricAttributionRequest(")
        append("datasetGroupArn=$datasetGroupArn,")
        append("metrics=$metrics,")
        append("metricsOutputConfig=$metricsOutputConfig,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = datasetGroupArn?.hashCode() ?: 0
        result = 31 * result + (metrics?.hashCode() ?: 0)
        result = 31 * result + (metricsOutputConfig?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        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 CreateMetricAttributionRequest

        if (datasetGroupArn != other.datasetGroupArn) return false
        if (metrics != other.metrics) return false
        if (metricsOutputConfig != other.metricsOutputConfig) return false
        if (name != other.name) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the destination dataset group for the metric attribution.
         */
        public var datasetGroupArn: kotlin.String? = null
        /**
         * A list of metric attributes for the metric attribution. Each metric attribute specifies an event type to track and a function. Available functions are `SUM()` or `SAMPLECOUNT()`. For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).
         */
        public var metrics: List? = null
        /**
         * The output configuration details for the metric attribution.
         */
        public var metricsOutputConfig: aws.sdk.kotlin.services.personalize.model.MetricAttributionOutput? = null
        /**
         * A name for the metric attribution.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.personalize.model.CreateMetricAttributionRequest) : this() {
            this.datasetGroupArn = x.datasetGroupArn
            this.metrics = x.metrics
            this.metricsOutputConfig = x.metricsOutputConfig
            this.name = x.name
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy