
commonMain.aws.sdk.kotlin.services.voiceid.model.EvaluateSessionResponse.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
public class EvaluateSessionResponse private constructor(builder: Builder) {
/**
* Details resulting from the authentication process, such as authentication decision and authentication score.
*/
public val authenticationResult: aws.sdk.kotlin.services.voiceid.model.AuthenticationResult? = builder.authenticationResult
/**
* The identifier of the domain that contains the session.
*/
public val domainId: kotlin.String? = builder.domainId
/**
* Details resulting from the fraud detection process, such as fraud detection decision and risk score.
*/
public val fraudDetectionResult: aws.sdk.kotlin.services.voiceid.model.FraudDetectionResult? = builder.fraudDetectionResult
/**
* The service-generated identifier of the session.
*/
public val sessionId: kotlin.String? = builder.sessionId
/**
* The client-provided name of the session.
*/
public val sessionName: kotlin.String? = builder.sessionName
/**
* The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is `NOT_ENOUGH_SPEECH`. In this situation, if the `StreamingStatus` is `ONGOING/PENDING_CONFIGURATION`, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remains `NOT_ENOUGH_SPEECH` even after `StreamingStatus` is `ENDED`, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.
*/
public val streamingStatus: aws.sdk.kotlin.services.voiceid.model.StreamingStatus? = builder.streamingStatus
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.voiceid.model.EvaluateSessionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EvaluateSessionResponse(")
append("authenticationResult=$authenticationResult,")
append("domainId=$domainId,")
append("fraudDetectionResult=$fraudDetectionResult,")
append("sessionId=$sessionId,")
append("sessionName=$sessionName,")
append("streamingStatus=$streamingStatus")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authenticationResult?.hashCode() ?: 0
result = 31 * result + (domainId?.hashCode() ?: 0)
result = 31 * result + (fraudDetectionResult?.hashCode() ?: 0)
result = 31 * result + (sessionId?.hashCode() ?: 0)
result = 31 * result + (sessionName?.hashCode() ?: 0)
result = 31 * result + (streamingStatus?.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 EvaluateSessionResponse
if (authenticationResult != other.authenticationResult) return false
if (domainId != other.domainId) return false
if (fraudDetectionResult != other.fraudDetectionResult) return false
if (sessionId != other.sessionId) return false
if (sessionName != other.sessionName) return false
if (streamingStatus != other.streamingStatus) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.voiceid.model.EvaluateSessionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Details resulting from the authentication process, such as authentication decision and authentication score.
*/
public var authenticationResult: aws.sdk.kotlin.services.voiceid.model.AuthenticationResult? = null
/**
* The identifier of the domain that contains the session.
*/
public var domainId: kotlin.String? = null
/**
* Details resulting from the fraud detection process, such as fraud detection decision and risk score.
*/
public var fraudDetectionResult: aws.sdk.kotlin.services.voiceid.model.FraudDetectionResult? = null
/**
* The service-generated identifier of the session.
*/
public var sessionId: kotlin.String? = null
/**
* The client-provided name of the session.
*/
public var sessionName: kotlin.String? = null
/**
* The current status of audio streaming for this session. This field is useful to infer next steps when the Authentication or Fraud Detection results are empty or the decision is `NOT_ENOUGH_SPEECH`. In this situation, if the `StreamingStatus` is `ONGOING/PENDING_CONFIGURATION`, it can mean that the client should call the API again later, after Voice ID has enough audio to produce a result. If the decision remains `NOT_ENOUGH_SPEECH` even after `StreamingStatus` is `ENDED`, it means that the previously streamed session did not have enough speech to perform evaluation, and a new streaming session is needed to try again.
*/
public var streamingStatus: aws.sdk.kotlin.services.voiceid.model.StreamingStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.voiceid.model.EvaluateSessionResponse) : this() {
this.authenticationResult = x.authenticationResult
this.domainId = x.domainId
this.fraudDetectionResult = x.fraudDetectionResult
this.sessionId = x.sessionId
this.sessionName = x.sessionName
this.streamingStatus = x.streamingStatus
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.voiceid.model.EvaluateSessionResponse = EvaluateSessionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.voiceid.model.AuthenticationResult] inside the given [block]
*/
public fun authenticationResult(block: aws.sdk.kotlin.services.voiceid.model.AuthenticationResult.Builder.() -> kotlin.Unit) {
this.authenticationResult = aws.sdk.kotlin.services.voiceid.model.AuthenticationResult.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.voiceid.model.FraudDetectionResult] inside the given [block]
*/
public fun fraudDetectionResult(block: aws.sdk.kotlin.services.voiceid.model.FraudDetectionResult.Builder.() -> kotlin.Unit) {
this.fraudDetectionResult = aws.sdk.kotlin.services.voiceid.model.FraudDetectionResult.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy