
commonMain.aws.sdk.kotlin.services.voiceid.model.AuthenticationConfiguration.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
/**
* The configuration used to authenticate a speaker during a session.
*/
public class AuthenticationConfiguration private constructor(builder: Builder) {
/**
* The minimum threshold needed to successfully authenticate a speaker.
*/
public val acceptanceThreshold: kotlin.Int = requireNotNull(builder.acceptanceThreshold) { "A non-null value must be provided for acceptanceThreshold" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.voiceid.model.AuthenticationConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AuthenticationConfiguration(")
append("acceptanceThreshold=$acceptanceThreshold")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = acceptanceThreshold
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 AuthenticationConfiguration
if (acceptanceThreshold != other.acceptanceThreshold) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.voiceid.model.AuthenticationConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The minimum threshold needed to successfully authenticate a speaker.
*/
public var acceptanceThreshold: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.voiceid.model.AuthenticationConfiguration) : this() {
this.acceptanceThreshold = x.acceptanceThreshold
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.voiceid.model.AuthenticationConfiguration = AuthenticationConfiguration(this)
internal fun correctErrors(): Builder {
if (acceptanceThreshold == null) acceptanceThreshold = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy