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

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

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Identifies face image brightness and sharpness.
 */
public class ImageQuality private constructor(builder: Builder) {
    /**
     * Value representing brightness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a brighter face image.
     */
    public val brightness: kotlin.Float? = builder.brightness
    /**
     * Value representing sharpness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a sharper face image.
     */
    public val sharpness: kotlin.Float? = builder.sharpness

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

    override fun toString(): kotlin.String = buildString {
        append("ImageQuality(")
        append("brightness=$brightness,")
        append("sharpness=$sharpness")
        append(")")
    }

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

        if (!(brightness?.equals(other.brightness) ?: (other.brightness == null))) return false
        if (!(sharpness?.equals(other.sharpness) ?: (other.sharpness == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Value representing brightness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a brighter face image.
         */
        public var brightness: kotlin.Float? = null
        /**
         * Value representing sharpness of the face. The service returns a value between 0 and 100 (inclusive). A higher value indicates a sharper face image.
         */
        public var sharpness: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.ImageQuality) : this() {
            this.brightness = x.brightness
            this.sharpness = x.sharpness
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy