
commonMain.aws.sdk.kotlin.services.rekognition.model.ComparedSourceImageFace.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
/**
* Type that describes the face Amazon Rekognition chose to compare with the faces in the target. This contains a bounding box for the selected face and confidence level that the bounding box contains a face. Note that Amazon Rekognition selects the largest face in the source image for this comparison.
*/
public class ComparedSourceImageFace private constructor(builder: Builder) {
/**
* Bounding box of the face.
*/
public val boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = builder.boundingBox
/**
* Confidence level that the selected bounding box contains a face.
*/
public val confidence: kotlin.Float? = builder.confidence
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.ComparedSourceImageFace = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ComparedSourceImageFace(")
append("boundingBox=$boundingBox,")
append("confidence=$confidence")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = boundingBox?.hashCode() ?: 0
result = 31 * result + (confidence?.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 ComparedSourceImageFace
if (boundingBox != other.boundingBox) return false
if (!(confidence?.equals(other.confidence) ?: (other.confidence == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.ComparedSourceImageFace = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Bounding box of the face.
*/
public var boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = null
/**
* Confidence level that the selected bounding box contains a face.
*/
public var confidence: kotlin.Float? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.ComparedSourceImageFace) : this() {
this.boundingBox = x.boundingBox
this.confidence = x.confidence
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.ComparedSourceImageFace = ComparedSourceImageFace(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.BoundingBox] inside the given [block]
*/
public fun boundingBox(block: aws.sdk.kotlin.services.rekognition.model.BoundingBox.Builder.() -> kotlin.Unit) {
this.boundingBox = aws.sdk.kotlin.services.rekognition.model.BoundingBox.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy