
commonMain.aws.sdk.kotlin.services.rekognition.model.Point.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
/**
* The X and Y coordinates of a point on an image or video frame. The X and Y values are ratios of the overall image size or video resolution. For example, if an input image is 700x200 and the values are X=0.5 and Y=0.25, then the point is at the (350,50) pixel coordinate on the image.
*
* An array of `Point` objects makes up a `Polygon`. A `Polygon` is returned by DetectText and by DetectCustomLabels`Polygon` represents a fine-grained polygon around a detected item. For more information, see Geometry in the Amazon Rekognition Developer Guide.
*/
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.rekognition.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.rekognition.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.rekognition.model.Point) : this() {
this.x = x.x
this.y = x.y
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.Point = Point(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy