commonMain.aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.SdkDsl
public class BatchDetectTargetedSentimentRequest private constructor(builder: Builder) {
/**
* The language of the input documents. Currently, English is the only supported language.
*/
public val languageCode: aws.sdk.kotlin.services.comprehend.model.LanguageCode? = builder.languageCode
/**
* A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
*/
public val textList: List? = builder.textList
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchDetectTargetedSentimentRequest(")
append("languageCode=$languageCode,")
append("textList=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = languageCode?.hashCode() ?: 0
result = 31 * result + (textList?.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 BatchDetectTargetedSentimentRequest
if (languageCode != other.languageCode) return false
if (textList != other.textList) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The language of the input documents. Currently, English is the only supported language.
*/
public var languageCode: aws.sdk.kotlin.services.comprehend.model.LanguageCode? = null
/**
* A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
*/
public var textList: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentRequest) : this() {
this.languageCode = x.languageCode
this.textList = x.textList
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentRequest = BatchDetectTargetedSentimentRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}