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

commonMain.aws.sdk.kotlin.services.mediaconvert.model.Rectangle.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.mediaconvert.model



/**
 * Use Rectangle to identify a specific area of the video frame.
 */
public class Rectangle private constructor(builder: Builder) {
    /**
     * Height of rectangle in pixels. Specify only even numbers.
     */
    public val height: kotlin.Int? = builder.height
    /**
     * Width of rectangle in pixels. Specify only even numbers.
     */
    public val width: kotlin.Int? = builder.width
    /**
     * The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
     */
    public val x: kotlin.Int? = builder.x
    /**
     * The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
     */
    public val y: kotlin.Int? = builder.y

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

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

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

        if (height != other.height) return false
        if (width != other.width) 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.mediaconvert.model.Rectangle = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Height of rectangle in pixels. Specify only even numbers.
         */
        public var height: kotlin.Int? = null
        /**
         * Width of rectangle in pixels. Specify only even numbers.
         */
        public var width: kotlin.Int? = null
        /**
         * The distance, in pixels, between the rectangle and the left edge of the video frame. Specify only even numbers.
         */
        public var x: kotlin.Int? = null
        /**
         * The distance, in pixels, between the rectangle and the top edge of the video frame. Specify only even numbers.
         */
        public var y: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediaconvert.model.Rectangle) : this() {
            this.height = x.height
            this.width = x.width
            this.x = x.x
            this.y = x.y
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy