commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chimesdkmediapipelines-jvm Show documentation
Show all versions of chimesdkmediapipelines-jvm Show documentation
The AWS SDK for Kotlin client for Chime SDK Media Pipelines
// 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
}
}
}