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

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

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

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



public class SearchFacesByImageResponse private constructor(builder: Builder) {
    /**
     * An array of faces that match the input face, along with the confidence in the match.
     */
    public val faceMatches: List? = builder.faceMatches
    /**
     * Version number of the face detection model associated with the input collection (`CollectionId`).
     */
    public val faceModelVersion: kotlin.String? = builder.faceModelVersion
    /**
     * The bounding box around the face in the input image that Amazon Rekognition used for the search.
     */
    public val searchedFaceBoundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = builder.searchedFaceBoundingBox
    /**
     * The level of confidence that the `searchedFaceBoundingBox`, contains a face.
     */
    public val searchedFaceConfidence: kotlin.Float? = builder.searchedFaceConfidence

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

    override fun toString(): kotlin.String = buildString {
        append("SearchFacesByImageResponse(")
        append("faceMatches=$faceMatches,")
        append("faceModelVersion=$faceModelVersion,")
        append("searchedFaceBoundingBox=$searchedFaceBoundingBox,")
        append("searchedFaceConfidence=$searchedFaceConfidence")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = faceMatches?.hashCode() ?: 0
        result = 31 * result + (faceModelVersion?.hashCode() ?: 0)
        result = 31 * result + (searchedFaceBoundingBox?.hashCode() ?: 0)
        result = 31 * result + (searchedFaceConfidence?.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 SearchFacesByImageResponse

        if (faceMatches != other.faceMatches) return false
        if (faceModelVersion != other.faceModelVersion) return false
        if (searchedFaceBoundingBox != other.searchedFaceBoundingBox) return false
        if (searchedFaceConfidence != other.searchedFaceConfidence) return false

        return true
    }

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

    public class Builder {
        /**
         * An array of faces that match the input face, along with the confidence in the match.
         */
        public var faceMatches: List? = null
        /**
         * Version number of the face detection model associated with the input collection (`CollectionId`).
         */
        public var faceModelVersion: kotlin.String? = null
        /**
         * The bounding box around the face in the input image that Amazon Rekognition used for the search.
         */
        public var searchedFaceBoundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = null
        /**
         * The level of confidence that the `searchedFaceBoundingBox`, contains a face.
         */
        public var searchedFaceConfidence: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.SearchFacesByImageResponse) : this() {
            this.faceMatches = x.faceMatches
            this.faceModelVersion = x.faceModelVersion
            this.searchedFaceBoundingBox = x.searchedFaceBoundingBox
            this.searchedFaceConfidence = x.searchedFaceConfidence
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy