All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.entityresolution.model.ResolutionTechniques.kt Maven / Gradle / Ivy

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 `resolutionType` and the `ruleBasedProperties`.
 */
public class ResolutionTechniques private constructor(builder: Builder) {
    /**
     * The properties of the provider service.
     */
    public val providerProperties: aws.sdk.kotlin.services.entityresolution.model.ProviderProperties? = builder.providerProperties
    /**
     * The type of matching. There are three types of matching: `RULE_MATCHING`, `ML_MATCHING`, and `PROVIDER`.
     */
    public val resolutionType: aws.sdk.kotlin.services.entityresolution.model.ResolutionType = requireNotNull(builder.resolutionType) { "A non-null value must be provided for resolutionType" }
    /**
     * An object which defines the list of matching rules to run and has a field `Rules`, which is a list of rule objects.
     */
    public val ruleBasedProperties: aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties? = builder.ruleBasedProperties

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.entityresolution.model.ResolutionTechniques = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ResolutionTechniques(")
        append("providerProperties=$providerProperties,")
        append("resolutionType=$resolutionType,")
        append("ruleBasedProperties=$ruleBasedProperties")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = providerProperties?.hashCode() ?: 0
        result = 31 * result + (resolutionType.hashCode())
        result = 31 * result + (ruleBasedProperties?.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 ResolutionTechniques

        if (providerProperties != other.providerProperties) return false
        if (resolutionType != other.resolutionType) return false
        if (ruleBasedProperties != other.ruleBasedProperties) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.entityresolution.model.ResolutionTechniques = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The properties of the provider service.
         */
        public var providerProperties: aws.sdk.kotlin.services.entityresolution.model.ProviderProperties? = null
        /**
         * The type of matching. There are three types of matching: `RULE_MATCHING`, `ML_MATCHING`, and `PROVIDER`.
         */
        public var resolutionType: aws.sdk.kotlin.services.entityresolution.model.ResolutionType? = null
        /**
         * An object which defines the list of matching rules to run and has a field `Rules`, which is a list of rule objects.
         */
        public var ruleBasedProperties: aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.entityresolution.model.ResolutionTechniques) : this() {
            this.providerProperties = x.providerProperties
            this.resolutionType = x.resolutionType
            this.ruleBasedProperties = x.ruleBasedProperties
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.entityresolution.model.ResolutionTechniques = ResolutionTechniques(this)

        /**
         * construct an [aws.sdk.kotlin.services.entityresolution.model.ProviderProperties] inside the given [block]
         */
        public fun providerProperties(block: aws.sdk.kotlin.services.entityresolution.model.ProviderProperties.Builder.() -> kotlin.Unit) {
            this.providerProperties = aws.sdk.kotlin.services.entityresolution.model.ProviderProperties.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties] inside the given [block]
         */
        public fun ruleBasedProperties(block: aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties.Builder.() -> kotlin.Unit) {
            this.ruleBasedProperties = aws.sdk.kotlin.services.entityresolution.model.RuleBasedProperties.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (resolutionType == null) resolutionType = ResolutionType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy