commonMain.aws.sdk.kotlin.services.cleanroomsml.model.RelevanceMetric.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanroomsml-jvm Show documentation
Show all versions of cleanroomsml-jvm Show documentation
The AWS SDK for Kotlin client for CleanRoomsML
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanroomsml.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The relevance score of a generated audience.
*/
public class RelevanceMetric private constructor(builder: Builder) {
/**
* The size of the generated audience. Must match one of the sizes in the configured audience model.
*/
public val audienceSize: aws.sdk.kotlin.services.cleanroomsml.model.AudienceSize? = builder.audienceSize
/**
* The relevance score of the generated audience.
*/
public val score: kotlin.Double? = builder.score
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanroomsml.model.RelevanceMetric = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RelevanceMetric(")
append("audienceSize=$audienceSize,")
append("score=$score")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = audienceSize?.hashCode() ?: 0
result = 31 * result + (score?.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 RelevanceMetric
if (audienceSize != other.audienceSize) return false
if (!(score?.equals(other.score) ?: (other.score == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanroomsml.model.RelevanceMetric = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The size of the generated audience. Must match one of the sizes in the configured audience model.
*/
public var audienceSize: aws.sdk.kotlin.services.cleanroomsml.model.AudienceSize? = null
/**
* The relevance score of the generated audience.
*/
public var score: kotlin.Double? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.RelevanceMetric) : this() {
this.audienceSize = x.audienceSize
this.score = x.score
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanroomsml.model.RelevanceMetric = RelevanceMetric(this)
/**
* construct an [aws.sdk.kotlin.services.cleanroomsml.model.AudienceSize] inside the given [block]
*/
public fun audienceSize(block: aws.sdk.kotlin.services.cleanroomsml.model.AudienceSize.Builder.() -> kotlin.Unit) {
this.audienceSize = aws.sdk.kotlin.services.cleanroomsml.model.AudienceSize.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}