
commonMain.aws.sdk.kotlin.services.personalizeevents.model.MetricAttribution.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.personalizeevents.model
/**
* Contains information about a metric attribution associated with an event. For more information about metric attributions, see [Measuring impact of recommendations](https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html).
*/
public class MetricAttribution private constructor(builder: Builder) {
/**
* The source of the event, such as a third party.
*/
public val eventAttributionSource: kotlin.String = requireNotNull(builder.eventAttributionSource) { "A non-null value must be provided for eventAttributionSource" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalizeevents.model.MetricAttribution = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MetricAttribution(")
append("eventAttributionSource=$eventAttributionSource")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = eventAttributionSource.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 MetricAttribution
if (eventAttributionSource != other.eventAttributionSource) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalizeevents.model.MetricAttribution = Builder(this).apply(block).build()
public class Builder {
/**
* The source of the event, such as a third party.
*/
public var eventAttributionSource: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalizeevents.model.MetricAttribution) : this() {
this.eventAttributionSource = x.eventAttributionSource
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalizeevents.model.MetricAttribution = MetricAttribution(this)
internal fun correctErrors(): Builder {
if (eventAttributionSource == null) eventAttributionSource = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy