
commonMain.aws.sdk.kotlin.services.rekognition.model.ProtectiveEquipmentPerson.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
/**
* A person detected by a call to DetectProtectiveEquipment. The API returns all persons detected in the input image in an array of `ProtectiveEquipmentPerson` objects.
*/
public class ProtectiveEquipmentPerson private constructor(builder: Builder) {
/**
* An array of body parts detected on a person's body (including body parts without PPE).
*/
public val bodyParts: List? = builder.bodyParts
/**
* A bounding box around the detected person.
*/
public val boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = builder.boundingBox
/**
* The confidence that Amazon Rekognition has that the bounding box contains a person.
*/
public val confidence: kotlin.Float? = builder.confidence
/**
* The identifier for the detected person. The identifier is only unique for a single call to `DetectProtectiveEquipment`.
*/
public val id: kotlin.Int? = builder.id
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.ProtectiveEquipmentPerson = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ProtectiveEquipmentPerson(")
append("bodyParts=$bodyParts,")
append("boundingBox=$boundingBox,")
append("confidence=$confidence,")
append("id=$id")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = bodyParts?.hashCode() ?: 0
result = 31 * result + (boundingBox?.hashCode() ?: 0)
result = 31 * result + (confidence?.hashCode() ?: 0)
result = 31 * result + (id ?: 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 ProtectiveEquipmentPerson
if (bodyParts != other.bodyParts) return false
if (boundingBox != other.boundingBox) return false
if (confidence != other.confidence) return false
if (id != other.id) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.ProtectiveEquipmentPerson = Builder(this).apply(block).build()
public class Builder {
/**
* An array of body parts detected on a person's body (including body parts without PPE).
*/
public var bodyParts: List? = null
/**
* A bounding box around the detected person.
*/
public var boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = null
/**
* The confidence that Amazon Rekognition has that the bounding box contains a person.
*/
public var confidence: kotlin.Float? = null
/**
* The identifier for the detected person. The identifier is only unique for a single call to `DetectProtectiveEquipment`.
*/
public var id: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.ProtectiveEquipmentPerson) : this() {
this.bodyParts = x.bodyParts
this.boundingBox = x.boundingBox
this.confidence = x.confidence
this.id = x.id
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.ProtectiveEquipmentPerson = ProtectiveEquipmentPerson(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