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

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

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

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



/**
 * Configuration for Moderation Labels Detection.
 */
public class MediaAnalysisDetectModerationLabelsConfig private constructor(builder: Builder) {
    /**
     * Specifies the minimum confidence level for the moderation labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
     */
    public val minConfidence: kotlin.Float? = builder.minConfidence
    /**
     * Specifies the custom moderation model to be used during the label detection job. If not provided the pre-trained model is used.
     */
    public val projectVersion: kotlin.String? = builder.projectVersion

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

    override fun toString(): kotlin.String = buildString {
        append("MediaAnalysisDetectModerationLabelsConfig(")
        append("minConfidence=$minConfidence,")
        append("projectVersion=$projectVersion")
        append(")")
    }

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

        if (minConfidence != other.minConfidence) return false
        if (projectVersion != other.projectVersion) return false

        return true
    }

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

    public class Builder {
        /**
         * Specifies the minimum confidence level for the moderation labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
         */
        public var minConfidence: kotlin.Float? = null
        /**
         * Specifies the custom moderation model to be used during the label detection job. If not provided the pre-trained model is used.
         */
        public var projectVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.MediaAnalysisDetectModerationLabelsConfig) : this() {
            this.minConfidence = x.minConfidence
            this.projectVersion = x.projectVersion
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy