commonMain.aws.sdk.kotlin.services.personalize.model.UpdateMetricAttributionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personalize-jvm Show documentation
Show all versions of personalize-jvm Show documentation
The AWS SDK for Kotlin client for Personalize
The 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 UpdateMetricAttributionRequest private constructor(builder: Builder) {
/**
* Add new metric attributes to the metric attribution.
*/
public val addMetrics: List? = builder.addMetrics
/**
* The Amazon Resource Name (ARN) for the metric attribution to update.
*/
public val metricAttributionArn: kotlin.String? = builder.metricAttributionArn
/**
* An output config for the metric attribution.
*/
public val metricsOutputConfig: aws.sdk.kotlin.services.personalize.model.MetricAttributionOutput? = builder.metricsOutputConfig
/**
* Remove metric attributes from the metric attribution.
*/
public val removeMetrics: List? = builder.removeMetrics
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalize.model.UpdateMetricAttributionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateMetricAttributionRequest(")
append("addMetrics=$addMetrics,")
append("metricAttributionArn=$metricAttributionArn,")
append("metricsOutputConfig=$metricsOutputConfig,")
append("removeMetrics=$removeMetrics")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = addMetrics?.hashCode() ?: 0
result = 31 * result + (metricAttributionArn?.hashCode() ?: 0)
result = 31 * result + (metricsOutputConfig?.hashCode() ?: 0)
result = 31 * result + (removeMetrics?.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 UpdateMetricAttributionRequest
if (addMetrics != other.addMetrics) return false
if (metricAttributionArn != other.metricAttributionArn) return false
if (metricsOutputConfig != other.metricsOutputConfig) return false
if (removeMetrics != other.removeMetrics) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalize.model.UpdateMetricAttributionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Add new metric attributes to the metric attribution.
*/
public var addMetrics: List? = null
/**
* The Amazon Resource Name (ARN) for the metric attribution to update.
*/
public var metricAttributionArn: kotlin.String? = null
/**
* An output config for the metric attribution.
*/
public var metricsOutputConfig: aws.sdk.kotlin.services.personalize.model.MetricAttributionOutput? = null
/**
* Remove metric attributes from the metric attribution.
*/
public var removeMetrics: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalize.model.UpdateMetricAttributionRequest) : this() {
this.addMetrics = x.addMetrics
this.metricAttributionArn = x.metricAttributionArn
this.metricsOutputConfig = x.metricsOutputConfig
this.removeMetrics = x.removeMetrics
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalize.model.UpdateMetricAttributionRequest = UpdateMetricAttributionRequest(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
}
}
}