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

commonMain.aws.sdk.kotlin.services.rekognition.model.Landmark.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.rekognition.model



/**
 * Indicates the location of the landmark on the face.
 */
public class Landmark private constructor(builder: Builder) {
    /**
     * Type of landmark.
     */
    public val type: aws.sdk.kotlin.services.rekognition.model.LandmarkType? = builder.type
    /**
     * The x-coordinate of the landmark expressed as a ratio of the width of the image. The x-coordinate is measured from the left-side of the image. For example, if the image is 700 pixels wide and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.
     */
    public val x: kotlin.Float? = builder.x
    /**
     * The y-coordinate of the landmark expressed as a ratio of the height of the image. The y-coordinate is measured from the top of the image. For example, if the image height is 200 pixels and the y-coordinate of the landmark is at 50 pixels, this value is 0.25.
     */
    public val y: kotlin.Float? = builder.y

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

    override fun toString(): kotlin.String = buildString {
        append("Landmark(")
        append("type=$type,")
        append("x=$x,")
        append("y=$y")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = type?.hashCode() ?: 0
        result = 31 * result + (x?.hashCode() ?: 0)
        result = 31 * result + (y?.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 Landmark

        if (type != other.type) return false
        if (x != other.x) return false
        if (y != other.y) return false

        return true
    }

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

    public class Builder {
        /**
         * Type of landmark.
         */
        public var type: aws.sdk.kotlin.services.rekognition.model.LandmarkType? = null
        /**
         * The x-coordinate of the landmark expressed as a ratio of the width of the image. The x-coordinate is measured from the left-side of the image. For example, if the image is 700 pixels wide and the x-coordinate of the landmark is at 350 pixels, this value is 0.5.
         */
        public var x: kotlin.Float? = null
        /**
         * The y-coordinate of the landmark expressed as a ratio of the height of the image. The y-coordinate is measured from the top of the image. For example, if the image height is 200 pixels and the y-coordinate of the landmark is at 50 pixels, this value is 0.25.
         */
        public var y: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.Landmark) : this() {
            this.type = x.type
            this.x = x.x
            this.y = x.y
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy