
commonMain.aws.sdk.kotlin.services.rekognition.model.CompareFacesMatch.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
/**
* Provides information about a face in a target image that matches the source image face analyzed by `CompareFaces`. The `Face` property contains the bounding box of the face in the target image. The `Similarity` property is the confidence that the source image face matches the face in the bounding box.
*/
public class CompareFacesMatch private constructor(builder: Builder) {
/**
* Provides face metadata (bounding box and confidence that the bounding box actually contains a face).
*/
public val face: aws.sdk.kotlin.services.rekognition.model.ComparedFace? = builder.face
/**
* Level of confidence that the faces match.
*/
public val similarity: kotlin.Float? = builder.similarity
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.CompareFacesMatch = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CompareFacesMatch(")
append("face=$face,")
append("similarity=$similarity")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = face?.hashCode() ?: 0
result = 31 * result + (similarity?.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 CompareFacesMatch
if (face != other.face) return false
if (!(similarity?.equals(other.similarity) ?: (other.similarity == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.CompareFacesMatch = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Provides face metadata (bounding box and confidence that the bounding box actually contains a face).
*/
public var face: aws.sdk.kotlin.services.rekognition.model.ComparedFace? = null
/**
* Level of confidence that the faces match.
*/
public var similarity: kotlin.Float? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.CompareFacesMatch) : this() {
this.face = x.face
this.similarity = x.similarity
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.CompareFacesMatch = CompareFacesMatch(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.ComparedFace] inside the given [block]
*/
public fun face(block: aws.sdk.kotlin.services.rekognition.model.ComparedFace.Builder.() -> kotlin.Unit) {
this.face = aws.sdk.kotlin.services.rekognition.model.ComparedFace.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy