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

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

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

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



public class SearchUsersResponse private constructor(builder: Builder) {
    /**
     * Version number of the face detection model associated with the input CollectionId.
     */
    public val faceModelVersion: kotlin.String? = builder.faceModelVersion
    /**
     * Contains the ID of a face that was used to search for matches in a collection.
     */
    public val searchedFace: aws.sdk.kotlin.services.rekognition.model.SearchedFace? = builder.searchedFace
    /**
     * Contains the ID of the UserID that was used to search for matches in a collection.
     */
    public val searchedUser: aws.sdk.kotlin.services.rekognition.model.SearchedUser? = builder.searchedUser
    /**
     * An array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.
     */
    public val userMatches: List? = builder.userMatches

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

    override fun toString(): kotlin.String = buildString {
        append("SearchUsersResponse(")
        append("faceModelVersion=$faceModelVersion,")
        append("searchedFace=$searchedFace,")
        append("searchedUser=$searchedUser,")
        append("userMatches=$userMatches")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = faceModelVersion?.hashCode() ?: 0
        result = 31 * result + (searchedFace?.hashCode() ?: 0)
        result = 31 * result + (searchedUser?.hashCode() ?: 0)
        result = 31 * result + (userMatches?.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 SearchUsersResponse

        if (faceModelVersion != other.faceModelVersion) return false
        if (searchedFace != other.searchedFace) return false
        if (searchedUser != other.searchedUser) return false
        if (userMatches != other.userMatches) return false

        return true
    }

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

    public class Builder {
        /**
         * Version number of the face detection model associated with the input CollectionId.
         */
        public var faceModelVersion: kotlin.String? = null
        /**
         * Contains the ID of a face that was used to search for matches in a collection.
         */
        public var searchedFace: aws.sdk.kotlin.services.rekognition.model.SearchedFace? = null
        /**
         * Contains the ID of the UserID that was used to search for matches in a collection.
         */
        public var searchedUser: aws.sdk.kotlin.services.rekognition.model.SearchedUser? = null
        /**
         * An array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.
         */
        public var userMatches: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.SearchUsersResponse) : this() {
            this.faceModelVersion = x.faceModelVersion
            this.searchedFace = x.searchedFace
            this.searchedUser = x.searchedUser
            this.userMatches = x.userMatches
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy