
commonMain.aws.sdk.kotlin.services.rekognition.model.FaceMatch.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 face metadata. In addition, it also provides the confidence in the match of this face with the input face.
*/
public class FaceMatch private constructor(builder: Builder) {
/**
* Describes the face properties such as the bounding box, face ID, image ID of the source image, and external image ID that you assigned.
*/
public val face: aws.sdk.kotlin.services.rekognition.model.Face? = builder.face
/**
* Confidence in the match of this face with the input face.
*/
public val similarity: kotlin.Float? = builder.similarity
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.FaceMatch = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FaceMatch(")
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 FaceMatch
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.FaceMatch = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Describes the face properties such as the bounding box, face ID, image ID of the source image, and external image ID that you assigned.
*/
public var face: aws.sdk.kotlin.services.rekognition.model.Face? = null
/**
* Confidence in the match of this face with the input face.
*/
public var similarity: kotlin.Float? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.FaceMatch) : this() {
this.face = x.face
this.similarity = x.similarity
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.FaceMatch = FaceMatch(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.Face] inside the given [block]
*/
public fun face(block: aws.sdk.kotlin.services.rekognition.model.Face.Builder.() -> kotlin.Unit) {
this.face = aws.sdk.kotlin.services.rekognition.model.Face.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy