
commonMain.aws.sdk.kotlin.services.rekognition.model.ComparedFace.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
/**
* Provides face metadata for target image faces that are analyzed by `CompareFaces` and `RecognizeCelebrities`.
*/
public class ComparedFace private constructor(builder: Builder) {
/**
* Bounding box of the face.
*/
public val boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = builder.boundingBox
/**
* Level of confidence that what the bounding box contains is a face.
*/
public val confidence: kotlin.Float? = builder.confidence
/**
* The emotions that appear to be expressed on the face, and the confidence level in the determination. Valid values include "Happy", "Sad", "Angry", "Confused", "Disgusted", "Surprised", "Calm", "Unknown", and "Fear".
*/
public val emotions: List? = builder.emotions
/**
* An array of facial landmarks.
*/
public val landmarks: List? = builder.landmarks
/**
* Indicates the pose of the face as determined by its pitch, roll, and yaw.
*/
public val pose: aws.sdk.kotlin.services.rekognition.model.Pose? = builder.pose
/**
* Identifies face image brightness and sharpness.
*/
public val quality: aws.sdk.kotlin.services.rekognition.model.ImageQuality? = builder.quality
/**
* Indicates whether or not the face is smiling, and the confidence level in the determination.
*/
public val smile: aws.sdk.kotlin.services.rekognition.model.Smile? = builder.smile
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.ComparedFace = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ComparedFace(")
append("boundingBox=$boundingBox,")
append("confidence=$confidence,")
append("emotions=$emotions,")
append("landmarks=$landmarks,")
append("pose=$pose,")
append("quality=$quality,")
append("smile=$smile")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = boundingBox?.hashCode() ?: 0
result = 31 * result + (confidence?.hashCode() ?: 0)
result = 31 * result + (emotions?.hashCode() ?: 0)
result = 31 * result + (landmarks?.hashCode() ?: 0)
result = 31 * result + (pose?.hashCode() ?: 0)
result = 31 * result + (quality?.hashCode() ?: 0)
result = 31 * result + (smile?.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 ComparedFace
if (boundingBox != other.boundingBox) return false
if (confidence != other.confidence) return false
if (emotions != other.emotions) return false
if (landmarks != other.landmarks) return false
if (pose != other.pose) return false
if (quality != other.quality) return false
if (smile != other.smile) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.ComparedFace = Builder(this).apply(block).build()
public class Builder {
/**
* Bounding box of the face.
*/
public var boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = null
/**
* Level of confidence that what the bounding box contains is a face.
*/
public var confidence: kotlin.Float? = null
/**
* The emotions that appear to be expressed on the face, and the confidence level in the determination. Valid values include "Happy", "Sad", "Angry", "Confused", "Disgusted", "Surprised", "Calm", "Unknown", and "Fear".
*/
public var emotions: List? = null
/**
* An array of facial landmarks.
*/
public var landmarks: List? = null
/**
* Indicates the pose of the face as determined by its pitch, roll, and yaw.
*/
public var pose: aws.sdk.kotlin.services.rekognition.model.Pose? = null
/**
* Identifies face image brightness and sharpness.
*/
public var quality: aws.sdk.kotlin.services.rekognition.model.ImageQuality? = null
/**
* Indicates whether or not the face is smiling, and the confidence level in the determination.
*/
public var smile: aws.sdk.kotlin.services.rekognition.model.Smile? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.ComparedFace) : this() {
this.boundingBox = x.boundingBox
this.confidence = x.confidence
this.emotions = x.emotions
this.landmarks = x.landmarks
this.pose = x.pose
this.quality = x.quality
this.smile = x.smile
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.ComparedFace = ComparedFace(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)
}
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.Pose] inside the given [block]
*/
public fun pose(block: aws.sdk.kotlin.services.rekognition.model.Pose.Builder.() -> kotlin.Unit) {
this.pose = aws.sdk.kotlin.services.rekognition.model.Pose.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.ImageQuality] inside the given [block]
*/
public fun quality(block: aws.sdk.kotlin.services.rekognition.model.ImageQuality.Builder.() -> kotlin.Unit) {
this.quality = aws.sdk.kotlin.services.rekognition.model.ImageQuality.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.Smile] inside the given [block]
*/
public fun smile(block: aws.sdk.kotlin.services.rekognition.model.Smile.Builder.() -> kotlin.Unit) {
this.smile = aws.sdk.kotlin.services.rekognition.model.Smile.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy