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

commonMain.aws.sdk.kotlin.services.devicefarm.model.Resolution.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.devicefarm.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents the screen resolution of a device in height and width, expressed in pixels.
 */
public class Resolution private constructor(builder: Builder) {
    /**
     * The screen resolution's height, expressed in pixels.
     */
    public val height: kotlin.Int? = builder.height
    /**
     * The screen resolution's width, expressed in pixels.
     */
    public val width: kotlin.Int? = builder.width

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

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

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

        if (height != other.height) return false
        if (width != other.width) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The screen resolution's height, expressed in pixels.
         */
        public var height: kotlin.Int? = null
        /**
         * The screen resolution's width, expressed in pixels.
         */
        public var width: kotlin.Int? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy