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

commonMain.aws.sdk.kotlin.services.rekognition.model.TextDetectionResult.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

/**
 * Information about text detected in a video. Incudes the detected text, the time in milliseconds from the start of the video that the text was detected, and where it was detected on the screen.
 */
public class TextDetectionResult private constructor(builder: Builder) {
    /**
     * Details about text detected in a video.
     */
    public val textDetection: aws.sdk.kotlin.services.rekognition.model.TextDetection? = builder.textDetection
    /**
     * The time, in milliseconds from the start of the video, that the text was detected. Note that `Timestamp` is not guaranteed to be accurate to the individual frame where the text first appears.
     */
    public val timestamp: kotlin.Long = builder.timestamp

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

    override fun toString(): kotlin.String = buildString {
        append("TextDetectionResult(")
        append("textDetection=$textDetection,")
        append("timestamp=$timestamp")
        append(")")
    }

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

        if (textDetection != other.textDetection) return false
        if (timestamp != other.timestamp) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Details about text detected in a video.
         */
        public var textDetection: aws.sdk.kotlin.services.rekognition.model.TextDetection? = null
        /**
         * The time, in milliseconds from the start of the video, that the text was detected. Note that `Timestamp` is not guaranteed to be accurate to the individual frame where the text first appears.
         */
        public var timestamp: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.TextDetectionResult) : this() {
            this.textDetection = x.textDetection
            this.timestamp = x.timestamp
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.rekognition.model.TextDetection] inside the given [block]
         */
        public fun textDetection(block: aws.sdk.kotlin.services.rekognition.model.TextDetection.Builder.() -> kotlin.Unit) {
            this.textDetection = aws.sdk.kotlin.services.rekognition.model.TextDetection.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy