commonMain.aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of entityresolution-jvm Show documentation
Show all versions of entityresolution-jvm Show documentation
The AWS SDK for Kotlin client for EntityResolution
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.entityresolution.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object which defines the list of matching rules to run and has a field `Rules`, which is a list of rule objects.
*/
public class RuleBasedProperties private constructor(builder: Builder) {
/**
* The comparison type. You can either choose `ONE_TO_ONE` or `MANY_TO_MANY` as the AttributeMatchingModel. When choosing `MANY_TO_MANY`, the system can match attributes across the sub-types of an attribute type. For example, if the value of the `Email` field of Profile A and the value of `BusinessEmail` field of Profile B matches, the two profiles are matched on the `Email` type. When choosing `ONE_TO_ONE` ,the system can only match if the sub-types are exact matches. For example, only when the value of the `Email` field of Profile A and the value of the `Email` field of Profile B matches, the two profiles are matched on the `Email` type.
*/
public val attributeMatchingModel: aws.sdk.kotlin.services.entityresolution.model.AttributeMatchingModel = requireNotNull(builder.attributeMatchingModel) { "A non-null value must be provided for attributeMatchingModel" }
/**
* A list of `Rule` objects, each of which have fields `RuleName` and `MatchingKeys`.
*/
public val rules: List = requireNotNull(builder.rules) { "A non-null value must be provided for rules" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RuleBasedProperties(")
append("attributeMatchingModel=$attributeMatchingModel,")
append("rules=$rules")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributeMatchingModel.hashCode()
result = 31 * result + (rules.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 RuleBasedProperties
if (attributeMatchingModel != other.attributeMatchingModel) return false
if (rules != other.rules) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The comparison type. You can either choose `ONE_TO_ONE` or `MANY_TO_MANY` as the AttributeMatchingModel. When choosing `MANY_TO_MANY`, the system can match attributes across the sub-types of an attribute type. For example, if the value of the `Email` field of Profile A and the value of `BusinessEmail` field of Profile B matches, the two profiles are matched on the `Email` type. When choosing `ONE_TO_ONE` ,the system can only match if the sub-types are exact matches. For example, only when the value of the `Email` field of Profile A and the value of the `Email` field of Profile B matches, the two profiles are matched on the `Email` type.
*/
public var attributeMatchingModel: aws.sdk.kotlin.services.entityresolution.model.AttributeMatchingModel? = null
/**
* A list of `Rule` objects, each of which have fields `RuleName` and `MatchingKeys`.
*/
public var rules: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties) : this() {
this.attributeMatchingModel = x.attributeMatchingModel
this.rules = x.rules
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties = RuleBasedProperties(this)
internal fun correctErrors(): Builder {
if (attributeMatchingModel == null) attributeMatchingModel = AttributeMatchingModel.SdkUnknown("no value provided")
if (rules == null) rules = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy