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

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

/**
 * Indicates the pose of the face as determined by its pitch, roll, and yaw.
 */
public class Pose private constructor(builder: Builder) {
    /**
     * Value representing the face rotation on the pitch axis.
     */
    public val pitch: kotlin.Float? = builder.pitch
    /**
     * Value representing the face rotation on the roll axis.
     */
    public val roll: kotlin.Float? = builder.roll
    /**
     * Value representing the face rotation on the yaw axis.
     */
    public val yaw: kotlin.Float? = builder.yaw

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

    override fun toString(): kotlin.String = buildString {
        append("Pose(")
        append("pitch=$pitch,")
        append("roll=$roll,")
        append("yaw=$yaw")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = pitch?.hashCode() ?: 0
        result = 31 * result + (roll?.hashCode() ?: 0)
        result = 31 * result + (yaw?.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 Pose

        if (!(pitch?.equals(other.pitch) ?: (other.pitch == null))) return false
        if (!(roll?.equals(other.roll) ?: (other.roll == null))) return false
        if (!(yaw?.equals(other.yaw) ?: (other.yaw == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Value representing the face rotation on the pitch axis.
         */
        public var pitch: kotlin.Float? = null
        /**
         * Value representing the face rotation on the roll axis.
         */
        public var roll: kotlin.Float? = null
        /**
         * Value representing the face rotation on the yaw axis.
         */
        public var yaw: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.Pose) : this() {
            this.pitch = x.pitch
            this.roll = x.roll
            this.yaw = x.yaw
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.rekognition.model.Pose = Pose(this)

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy