commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.model.RealTimeAlertRule.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
/**
* Specifies the words or phrases that trigger an alert.
*/
public class RealTimeAlertRule private constructor(builder: Builder) {
/**
* Specifies the issue detection settings for a real-time alert rule.
*/
public val issueDetectionConfiguration: aws.sdk.kotlin.services.chimesdkmediapipelines.model.IssueDetectionConfiguration? = builder.issueDetectionConfiguration
/**
* Specifies the settings for matching the keywords in a real-time alert rule.
*/
public val keywordMatchConfiguration: aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration? = builder.keywordMatchConfiguration
/**
* Specifies the settings for predicting sentiment in a real-time alert rule.
*/
public val sentimentConfiguration: aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration? = builder.sentimentConfiguration
/**
* The type of alert rule.
*/
public val type: aws.sdk.kotlin.services.chimesdkmediapipelines.model.RealTimeAlertRuleType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmediapipelines.model.RealTimeAlertRule = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RealTimeAlertRule(")
append("issueDetectionConfiguration=$issueDetectionConfiguration,")
append("keywordMatchConfiguration=$keywordMatchConfiguration,")
append("sentimentConfiguration=$sentimentConfiguration,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = issueDetectionConfiguration?.hashCode() ?: 0
result = 31 * result + (keywordMatchConfiguration?.hashCode() ?: 0)
result = 31 * result + (sentimentConfiguration?.hashCode() ?: 0)
result = 31 * result + (type.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 RealTimeAlertRule
if (issueDetectionConfiguration != other.issueDetectionConfiguration) return false
if (keywordMatchConfiguration != other.keywordMatchConfiguration) return false
if (sentimentConfiguration != other.sentimentConfiguration) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmediapipelines.model.RealTimeAlertRule = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the issue detection settings for a real-time alert rule.
*/
public var issueDetectionConfiguration: aws.sdk.kotlin.services.chimesdkmediapipelines.model.IssueDetectionConfiguration? = null
/**
* Specifies the settings for matching the keywords in a real-time alert rule.
*/
public var keywordMatchConfiguration: aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration? = null
/**
* Specifies the settings for predicting sentiment in a real-time alert rule.
*/
public var sentimentConfiguration: aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration? = null
/**
* The type of alert rule.
*/
public var type: aws.sdk.kotlin.services.chimesdkmediapipelines.model.RealTimeAlertRuleType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chimesdkmediapipelines.model.RealTimeAlertRule) : this() {
this.issueDetectionConfiguration = x.issueDetectionConfiguration
this.keywordMatchConfiguration = x.keywordMatchConfiguration
this.sentimentConfiguration = x.sentimentConfiguration
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chimesdkmediapipelines.model.RealTimeAlertRule = RealTimeAlertRule(this)
/**
* construct an [aws.sdk.kotlin.services.chimesdkmediapipelines.model.IssueDetectionConfiguration] inside the given [block]
*/
public fun issueDetectionConfiguration(block: aws.sdk.kotlin.services.chimesdkmediapipelines.model.IssueDetectionConfiguration.Builder.() -> kotlin.Unit) {
this.issueDetectionConfiguration = aws.sdk.kotlin.services.chimesdkmediapipelines.model.IssueDetectionConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration] inside the given [block]
*/
public fun keywordMatchConfiguration(block: aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration.Builder.() -> kotlin.Unit) {
this.keywordMatchConfiguration = aws.sdk.kotlin.services.chimesdkmediapipelines.model.KeywordMatchConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration] inside the given [block]
*/
public fun sentimentConfiguration(block: aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration.Builder.() -> kotlin.Unit) {
this.sentimentConfiguration = aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
if (type == null) type = RealTimeAlertRuleType.SdkUnknown("no value provided")
return this
}
}
}