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

commonMain.aws.sdk.kotlin.services.comprehend.model.Point.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.comprehend.model



/**
 * The X and Y coordinates of a point on a document page.
 *
 * For additional information, see [Point](https://docs.aws.amazon.com/textract/latest/dg/API_Point.html) in the Amazon Textract API reference.
 */
public class Point private constructor(builder: Builder) {
    /**
     * The value of the X coordinate for a point on a polygon
     */
    public val x: kotlin.Float? = builder.x
    /**
     * The value of the Y coordinate for a point on a polygon
     */
    public val y: kotlin.Float? = builder.y

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

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

    override fun hashCode(): kotlin.Int {
        var 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 Point

        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.comprehend.model.Point = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The value of the X coordinate for a point on a polygon
         */
        public var x: kotlin.Float? = null
        /**
         * The value of the Y coordinate for a point on a polygon
         */
        public var y: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehend.model.Point) : this() {
            this.x = x.x
            this.y = x.y
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.comprehend.model.Point = Point(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy