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
The newest version!
// 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 in a matching workflow. RuleBasedProperties contain a `Rules` field, 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`.
*
* If you choose `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` attribute type.
*
* If you choose `ONE_TO_ONE`, the system can only match attributes if the sub-types are an exact match. For example, for the `Email` attribute type, the system will only consider it a match if the value of the `Email` field of Profile A matches the value of the `Email` field of Profile B.
*/
public val attributeMatchingModel: aws.sdk.kotlin.services.entityresolution.model.AttributeMatchingModel = requireNotNull(builder.attributeMatchingModel) { "A non-null value must be provided for attributeMatchingModel" }
/**
* An indicator of whether to generate IDs and index the data or not.
*
* If you choose `IDENTIFIER_GENERATION`, the process generates IDs and indexes the data.
*
* If you choose `INDEXING`, the process indexes the data without generating IDs.
*/
public val matchPurpose: aws.sdk.kotlin.services.entityresolution.model.MatchPurpose? = builder.matchPurpose
/**
* 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("matchPurpose=$matchPurpose,")
append("rules=$rules")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributeMatchingModel.hashCode()
result = 31 * result + (matchPurpose?.hashCode() ?: 0)
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 (matchPurpose != other.matchPurpose) 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`.
*
* If you choose `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` attribute type.
*
* If you choose `ONE_TO_ONE`, the system can only match attributes if the sub-types are an exact match. For example, for the `Email` attribute type, the system will only consider it a match if the value of the `Email` field of Profile A matches the value of the `Email` field of Profile B.
*/
public var attributeMatchingModel: aws.sdk.kotlin.services.entityresolution.model.AttributeMatchingModel? = null
/**
* An indicator of whether to generate IDs and index the data or not.
*
* If you choose `IDENTIFIER_GENERATION`, the process generates IDs and indexes the data.
*
* If you choose `INDEXING`, the process indexes the data without generating IDs.
*/
public var matchPurpose: aws.sdk.kotlin.services.entityresolution.model.MatchPurpose? = 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.matchPurpose = x.matchPurpose
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