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

commonMain.aws.sdk.kotlin.services.rekognition.model.UnsuccessfulFaceAssociation.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.rekognition.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully associated.
 */
public class UnsuccessfulFaceAssociation private constructor(builder: Builder) {
    /**
     * Match confidence with the UserID, provides information regarding if a face association was unsuccessful because it didn't meet UserMatchThreshold.
     */
    public val confidence: kotlin.Float? = builder.confidence
    /**
     * A unique identifier assigned to the face.
     */
    public val faceId: kotlin.String? = builder.faceId
    /**
     * The reason why the association was unsuccessful.
     */
    public val reasons: List? = builder.reasons
    /**
     * A provided ID for the UserID. Unique within the collection.
     */
    public val userId: kotlin.String? = builder.userId

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

    override fun toString(): kotlin.String = buildString {
        append("UnsuccessfulFaceAssociation(")
        append("confidence=$confidence,")
        append("faceId=$faceId,")
        append("reasons=$reasons,")
        append("userId=$userId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = confidence?.hashCode() ?: 0
        result = 31 * result + (faceId?.hashCode() ?: 0)
        result = 31 * result + (reasons?.hashCode() ?: 0)
        result = 31 * result + (userId?.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 UnsuccessfulFaceAssociation

        if (!(confidence?.equals(other.confidence) ?: (other.confidence == null))) return false
        if (faceId != other.faceId) return false
        if (reasons != other.reasons) return false
        if (userId != other.userId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Match confidence with the UserID, provides information regarding if a face association was unsuccessful because it didn't meet UserMatchThreshold.
         */
        public var confidence: kotlin.Float? = null
        /**
         * A unique identifier assigned to the face.
         */
        public var faceId: kotlin.String? = null
        /**
         * The reason why the association was unsuccessful.
         */
        public var reasons: List? = null
        /**
         * A provided ID for the UserID. Unique within the collection.
         */
        public var userId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.UnsuccessfulFaceAssociation) : this() {
            this.confidence = x.confidence
            this.faceId = x.faceId
            this.reasons = x.reasons
            this.userId = x.userId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy