All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.rekognition.model.EquipmentDetection.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

/**
 * Information about an item of Personal Protective Equipment (PPE) detected by DetectProtectiveEquipment. For more information, see DetectProtectiveEquipment.
 */
public class EquipmentDetection private constructor(builder: Builder) {
    /**
     * A bounding box surrounding the item of detected PPE.
     */
    public val boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = builder.boundingBox
    /**
     * The confidence that Amazon Rekognition has that the bounding box (`BoundingBox`) contains an item of PPE.
     */
    public val confidence: kotlin.Float? = builder.confidence
    /**
     * Information about the body part covered by the detected PPE.
     */
    public val coversBodyPart: aws.sdk.kotlin.services.rekognition.model.CoversBodyPart? = builder.coversBodyPart
    /**
     * The type of detected PPE.
     */
    public val type: aws.sdk.kotlin.services.rekognition.model.ProtectiveEquipmentType? = builder.type

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.EquipmentDetection = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("EquipmentDetection(")
        append("boundingBox=$boundingBox,")
        append("confidence=$confidence,")
        append("coversBodyPart=$coversBodyPart,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = boundingBox?.hashCode() ?: 0
        result = 31 * result + (confidence?.hashCode() ?: 0)
        result = 31 * result + (coversBodyPart?.hashCode() ?: 0)
        result = 31 * result + (type?.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 EquipmentDetection

        if (boundingBox != other.boundingBox) return false
        if (!(confidence?.equals(other.confidence) ?: (other.confidence == null))) return false
        if (coversBodyPart != other.coversBodyPart) return false
        if (type != other.type) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.EquipmentDetection = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A bounding box surrounding the item of detected PPE.
         */
        public var boundingBox: aws.sdk.kotlin.services.rekognition.model.BoundingBox? = null
        /**
         * The confidence that Amazon Rekognition has that the bounding box (`BoundingBox`) contains an item of PPE.
         */
        public var confidence: kotlin.Float? = null
        /**
         * Information about the body part covered by the detected PPE.
         */
        public var coversBodyPart: aws.sdk.kotlin.services.rekognition.model.CoversBodyPart? = null
        /**
         * The type of detected PPE.
         */
        public var type: aws.sdk.kotlin.services.rekognition.model.ProtectiveEquipmentType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.EquipmentDetection) : this() {
            this.boundingBox = x.boundingBox
            this.confidence = x.confidence
            this.coversBodyPart = x.coversBodyPart
            this.type = x.type
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.rekognition.model.EquipmentDetection = EquipmentDetection(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.CoversBodyPart] inside the given [block]
         */
        public fun coversBodyPart(block: aws.sdk.kotlin.services.rekognition.model.CoversBodyPart.Builder.() -> kotlin.Unit) {
            this.coversBodyPart = aws.sdk.kotlin.services.rekognition.model.CoversBodyPart.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy