commonMain.aws.sdk.kotlin.services.databrew.model.Threshold.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databrew-jvm Show documentation
Show all versions of databrew-jvm Show documentation
The AWS Kotlin client for DataBrew
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databrew.model
/**
* The threshold used with a non-aggregate check expression. The non-aggregate check expression will be applied to each row in a specific column. Then the threshold will be used to determine whether the validation succeeds.
*/
public class Threshold private constructor(builder: Builder) {
/**
* The type of a threshold. Used for comparison of an actual count of rows that satisfy the rule to the threshold value.
*/
public val type: aws.sdk.kotlin.services.databrew.model.ThresholdType? = builder.type
/**
* Unit of threshold value. Can be either a COUNT or PERCENTAGE of the full sample size used for validation.
*/
public val unit: aws.sdk.kotlin.services.databrew.model.ThresholdUnit? = builder.unit
/**
* The value of a threshold.
*/
public val value: kotlin.Double = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.databrew.model.Threshold = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Threshold(")
append("type=$type,")
append("unit=$unit,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = type?.hashCode() ?: 0
result = 31 * result + (unit?.hashCode() ?: 0)
result = 31 * result + (value.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 Threshold
if (type != other.type) return false
if (unit != other.unit) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.databrew.model.Threshold = Builder(this).apply(block).build()
public class Builder {
/**
* The type of a threshold. Used for comparison of an actual count of rows that satisfy the rule to the threshold value.
*/
public var type: aws.sdk.kotlin.services.databrew.model.ThresholdType? = null
/**
* Unit of threshold value. Can be either a COUNT or PERCENTAGE of the full sample size used for validation.
*/
public var unit: aws.sdk.kotlin.services.databrew.model.ThresholdUnit? = null
/**
* The value of a threshold.
*/
public var value: kotlin.Double = 0.0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.databrew.model.Threshold) : this() {
this.type = x.type
this.unit = x.unit
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.databrew.model.Threshold = Threshold(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy