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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about an inappropriate, unwanted, or offensive content label detection in a stored video.
 */
public class ContentModerationDetection private constructor(builder: Builder) {
    /**
     * A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game.
     */
    public val contentTypes: List? = builder.contentTypes
    /**
     * The time duration of a segment in milliseconds, I.e. time elapsed from StartTimestampMillis to EndTimestampMillis.
     */
    public val durationMillis: kotlin.Long? = builder.durationMillis
    /**
     * The time in milliseconds defining the end of the timeline segment containing a continuously detected moderation label.
     */
    public val endTimestampMillis: kotlin.Long? = builder.endTimestampMillis
    /**
     * The content moderation label detected by in the stored video.
     */
    public val moderationLabel: aws.sdk.kotlin.services.rekognition.model.ModerationLabel? = builder.moderationLabel
    /**
     * The time in milliseconds defining the start of the timeline segment containing a continuously detected moderation label.
     */
    public val startTimestampMillis: kotlin.Long? = builder.startTimestampMillis
    /**
     * Time, in milliseconds from the beginning of the video, that the content moderation label was detected. Note that `Timestamp` is not guaranteed to be accurate to the individual frame where the moderated content 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.ContentModerationDetection = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("ContentModerationDetection(")
        append("contentTypes=$contentTypes,")
        append("durationMillis=$durationMillis,")
        append("endTimestampMillis=$endTimestampMillis,")
        append("moderationLabel=$moderationLabel,")
        append("startTimestampMillis=$startTimestampMillis,")
        append("timestamp=$timestamp")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contentTypes?.hashCode() ?: 0
        result = 31 * result + (durationMillis?.hashCode() ?: 0)
        result = 31 * result + (endTimestampMillis?.hashCode() ?: 0)
        result = 31 * result + (moderationLabel?.hashCode() ?: 0)
        result = 31 * result + (startTimestampMillis?.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 ContentModerationDetection

        if (contentTypes != other.contentTypes) return false
        if (durationMillis != other.durationMillis) return false
        if (endTimestampMillis != other.endTimestampMillis) return false
        if (moderationLabel != other.moderationLabel) return false
        if (startTimestampMillis != other.startTimestampMillis) return false
        if (timestamp != other.timestamp) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of predicted results for the type of content an image contains. For example, the image content might be from animation, sports, or a video game.
         */
        public var contentTypes: List? = null
        /**
         * The time duration of a segment in milliseconds, I.e. time elapsed from StartTimestampMillis to EndTimestampMillis.
         */
        public var durationMillis: kotlin.Long? = null
        /**
         * The time in milliseconds defining the end of the timeline segment containing a continuously detected moderation label.
         */
        public var endTimestampMillis: kotlin.Long? = null
        /**
         * The content moderation label detected by in the stored video.
         */
        public var moderationLabel: aws.sdk.kotlin.services.rekognition.model.ModerationLabel? = null
        /**
         * The time in milliseconds defining the start of the timeline segment containing a continuously detected moderation label.
         */
        public var startTimestampMillis: kotlin.Long? = null
        /**
         * Time, in milliseconds from the beginning of the video, that the content moderation label was detected. Note that `Timestamp` is not guaranteed to be accurate to the individual frame where the moderated content first appears.
         */
        public var timestamp: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.ContentModerationDetection) : this() {
            this.contentTypes = x.contentTypes
            this.durationMillis = x.durationMillis
            this.endTimestampMillis = x.endTimestampMillis
            this.moderationLabel = x.moderationLabel
            this.startTimestampMillis = x.startTimestampMillis
            this.timestamp = x.timestamp
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy