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

commonMain.aws.sdk.kotlin.services.voiceid.model.EnrollmentConfig.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.voiceid.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains configurations defining enrollment behavior for the batch job.
 */
public class EnrollmentConfig private constructor(builder: Builder) {
    /**
     * The action to take when the specified speaker is already enrolled in the specified domain. The default value is `SKIP`, which skips the enrollment for the existing speaker. Setting the value to `OVERWRITE` replaces the existing voice prints and enrollment audio stored for that speaker with new data generated from the latest audio.
     */
    public val existingEnrollmentAction: aws.sdk.kotlin.services.voiceid.model.ExistingEnrollmentAction? = builder.existingEnrollmentAction
    /**
     * The fraud detection configuration to use for the speaker enrollment job.
     */
    public val fraudDetectionConfig: aws.sdk.kotlin.services.voiceid.model.EnrollmentJobFraudDetectionConfig? = builder.fraudDetectionConfig

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

    override fun toString(): kotlin.String = buildString {
        append("EnrollmentConfig(")
        append("existingEnrollmentAction=$existingEnrollmentAction,")
        append("fraudDetectionConfig=$fraudDetectionConfig")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = existingEnrollmentAction?.hashCode() ?: 0
        result = 31 * result + (fraudDetectionConfig?.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 EnrollmentConfig

        if (existingEnrollmentAction != other.existingEnrollmentAction) return false
        if (fraudDetectionConfig != other.fraudDetectionConfig) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The action to take when the specified speaker is already enrolled in the specified domain. The default value is `SKIP`, which skips the enrollment for the existing speaker. Setting the value to `OVERWRITE` replaces the existing voice prints and enrollment audio stored for that speaker with new data generated from the latest audio.
         */
        public var existingEnrollmentAction: aws.sdk.kotlin.services.voiceid.model.ExistingEnrollmentAction? = null
        /**
         * The fraud detection configuration to use for the speaker enrollment job.
         */
        public var fraudDetectionConfig: aws.sdk.kotlin.services.voiceid.model.EnrollmentJobFraudDetectionConfig? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.voiceid.model.EnrollmentConfig) : this() {
            this.existingEnrollmentAction = x.existingEnrollmentAction
            this.fraudDetectionConfig = x.fraudDetectionConfig
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy