commonMain.aws.sdk.kotlin.services.glue.model.DataQualityObservation.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes the observation generated after evaluating the rules and analyzers.
*/
public class DataQualityObservation private constructor(builder: Builder) {
/**
* A description of the data quality observation.
*/
public val description: kotlin.String? = builder.description
/**
* An object of type `MetricBasedObservation` representing the observation that is based on evaluated data quality metrics.
*/
public val metricBasedObservation: aws.sdk.kotlin.services.glue.model.MetricBasedObservation? = builder.metricBasedObservation
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.DataQualityObservation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DataQualityObservation(")
append("description=*** Sensitive Data Redacted ***,")
append("metricBasedObservation=$metricBasedObservation")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (metricBasedObservation?.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 DataQualityObservation
if (description != other.description) return false
if (metricBasedObservation != other.metricBasedObservation) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.DataQualityObservation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description of the data quality observation.
*/
public var description: kotlin.String? = null
/**
* An object of type `MetricBasedObservation` representing the observation that is based on evaluated data quality metrics.
*/
public var metricBasedObservation: aws.sdk.kotlin.services.glue.model.MetricBasedObservation? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.DataQualityObservation) : this() {
this.description = x.description
this.metricBasedObservation = x.metricBasedObservation
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.DataQualityObservation = DataQualityObservation(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.MetricBasedObservation] inside the given [block]
*/
public fun metricBasedObservation(block: aws.sdk.kotlin.services.glue.model.MetricBasedObservation.Builder.() -> kotlin.Unit) {
this.metricBasedObservation = aws.sdk.kotlin.services.glue.model.MetricBasedObservation.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}