
commonMain.aws.sdk.kotlin.services.rekognition.model.CelebrityRecognition.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
/**
* Information about a detected celebrity and the time the celebrity was detected in a stored video. For more information, see GetCelebrityRecognition in the Amazon Rekognition Developer Guide.
*/
public class CelebrityRecognition private constructor(builder: Builder) {
/**
* Information about a recognized celebrity.
*/
public val celebrity: aws.sdk.kotlin.services.rekognition.model.CelebrityDetail? = builder.celebrity
/**
* The time, in milliseconds from the start of the video, that the celebrity was recognized. Note that `Timestamp` is not guaranteed to be accurate to the individual frame where the celebrity first appears.
*/
public val timestamp: kotlin.Long = builder.timestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.CelebrityRecognition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CelebrityRecognition(")
append("celebrity=$celebrity,")
append("timestamp=$timestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = celebrity?.hashCode() ?: 0
result = 31 * result + (timestamp.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 CelebrityRecognition
if (celebrity != other.celebrity) return false
if (timestamp != other.timestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.CelebrityRecognition = Builder(this).apply(block).build()
public class Builder {
/**
* Information about a recognized celebrity.
*/
public var celebrity: aws.sdk.kotlin.services.rekognition.model.CelebrityDetail? = null
/**
* The time, in milliseconds from the start of the video, that the celebrity was recognized. Note that `Timestamp` is not guaranteed to be accurate to the individual frame where the celebrity first appears.
*/
public var timestamp: kotlin.Long = 0L
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.CelebrityRecognition) : this() {
this.celebrity = x.celebrity
this.timestamp = x.timestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.CelebrityRecognition = CelebrityRecognition(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.CelebrityDetail] inside the given [block]
*/
public fun celebrity(block: aws.sdk.kotlin.services.rekognition.model.CelebrityDetail.Builder.() -> kotlin.Unit) {
this.celebrity = aws.sdk.kotlin.services.rekognition.model.CelebrityDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy