commonMain.aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentItemResult.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
/**
* Analysis results for one of the documents in the batch.
*/
public class BatchDetectTargetedSentimentItemResult private constructor(builder: Builder) {
/**
* An array of targeted sentiment entities.
*/
public val entities: List? = builder.entities
/**
* The zero-based index of this result in the input list.
*/
public val index: kotlin.Int? = builder.index
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentItemResult = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchDetectTargetedSentimentItemResult(")
append("entities=$entities,")
append("index=$index")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = entities?.hashCode() ?: 0
result = 31 * result + (index ?: 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 BatchDetectTargetedSentimentItemResult
if (entities != other.entities) return false
if (index != other.index) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentItemResult = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of targeted sentiment entities.
*/
public var entities: List? = null
/**
* The zero-based index of this result in the input list.
*/
public var index: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentItemResult) : this() {
this.entities = x.entities
this.index = x.index
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.BatchDetectTargetedSentimentItemResult = BatchDetectTargetedSentimentItemResult(this)
internal fun correctErrors(): Builder {
return this
}
}
}