commonMain.aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration.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 configuration settings for a sentiment analysis task.
*/
public class SentimentConfiguration private constructor(builder: Builder) {
/**
* The name of the rule in the sentiment configuration.
*/
public val ruleName: kotlin.String = requireNotNull(builder.ruleName) { "A non-null value must be provided for ruleName" }
/**
* The type of sentiment, `POSITIVE`, `NEGATIVE`, or `NEUTRAL`.
*/
public val sentimentType: aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentType = requireNotNull(builder.sentimentType) { "A non-null value must be provided for sentimentType" }
/**
* Specifies the analysis interval.
*/
public val timePeriod: kotlin.Int = requireNotNull(builder.timePeriod) { "A non-null value must be provided for timePeriod" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SentimentConfiguration(")
append("ruleName=$ruleName,")
append("sentimentType=$sentimentType,")
append("timePeriod=$timePeriod")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = ruleName.hashCode()
result = 31 * result + (sentimentType.hashCode())
result = 31 * result + (timePeriod)
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 SentimentConfiguration
if (ruleName != other.ruleName) return false
if (sentimentType != other.sentimentType) return false
if (timePeriod != other.timePeriod) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the rule in the sentiment configuration.
*/
public var ruleName: kotlin.String? = null
/**
* The type of sentiment, `POSITIVE`, `NEGATIVE`, or `NEUTRAL`.
*/
public var sentimentType: aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentType? = null
/**
* Specifies the analysis interval.
*/
public var timePeriod: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration) : this() {
this.ruleName = x.ruleName
this.sentimentType = x.sentimentType
this.timePeriod = x.timePeriod
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.chimesdkmediapipelines.model.SentimentConfiguration = SentimentConfiguration(this)
internal fun correctErrors(): Builder {
if (ruleName == null) ruleName = ""
if (sentimentType == null) sentimentType = SentimentType.SdkUnknown("no value provided")
if (timePeriod == null) timePeriod = 0
return this
}
}
}