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

commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.chimesdkmediapipelines.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A structure that contains the settings for a keyword match task.
 */
public class KeywordMatchConfiguration private constructor(builder: Builder) {
    /**
     * The keywords or phrases that you want to match.
     */
    public val keywords: List = requireNotNull(builder.keywords) { "A non-null value must be provided for keywords" }
    /**
     * Matches keywords or phrases on their presence or absence. If set to `TRUE`, the rule matches when all the specified keywords or phrases are absent. Default: `FALSE`.
     */
    public val negate: kotlin.Boolean = builder.negate
    /**
     * The name of the keyword match rule.
     */
    public val ruleName: kotlin.String = requireNotNull(builder.ruleName) { "A non-null value must be provided for ruleName" }

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

    override fun toString(): kotlin.String = buildString {
        append("KeywordMatchConfiguration(")
        append("keywords=$keywords,")
        append("negate=$negate,")
        append("ruleName=$ruleName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = keywords.hashCode()
        result = 31 * result + (negate.hashCode())
        result = 31 * result + (ruleName.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 KeywordMatchConfiguration

        if (keywords != other.keywords) return false
        if (negate != other.negate) return false
        if (ruleName != other.ruleName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The keywords or phrases that you want to match.
         */
        public var keywords: List? = null
        /**
         * Matches keywords or phrases on their presence or absence. If set to `TRUE`, the rule matches when all the specified keywords or phrases are absent. Default: `FALSE`.
         */
        public var negate: kotlin.Boolean = false
        /**
         * The name of the keyword match rule.
         */
        public var ruleName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration) : this() {
            this.keywords = x.keywords
            this.negate = x.negate
            this.ruleName = x.ruleName
        }

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

        internal fun correctErrors(): Builder {
            if (keywords == null) keywords = emptyList()
            if (ruleName == null) ruleName = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy