commonMain.aws.sdk.kotlin.services.rekognition.model.Label.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rekognition-jvm Show documentation
Show all versions of rekognition-jvm Show documentation
The AWS SDK for Kotlin client for Rekognition
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Structure containing details about the detected label, including the name, detected instances, parent labels, and level of confidence.
*/
public class Label private constructor(builder: Builder) {
/**
* A list of potential aliases for a given label.
*/
public val aliases: List? = builder.aliases
/**
* A list of the categories associated with a given label.
*/
public val categories: List? = builder.categories
/**
* Level of confidence.
*/
public val confidence: kotlin.Float? = builder.confidence
/**
* If `Label` represents an object, `Instances` contains the bounding boxes for each instance of the detected object. Bounding boxes are returned for common object labels such as people, cars, furniture, apparel or pets.
*/
public val instances: List? = builder.instances
/**
* The name (label) of the object or scene.
*/
public val name: kotlin.String? = builder.name
/**
* The parent labels for a label. The response includes all ancestor labels.
*/
public val parents: List? = builder.parents
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.Label = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Label(")
append("aliases=$aliases,")
append("categories=$categories,")
append("confidence=$confidence,")
append("instances=$instances,")
append("name=$name,")
append("parents=$parents")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = aliases?.hashCode() ?: 0
result = 31 * result + (categories?.hashCode() ?: 0)
result = 31 * result + (confidence?.hashCode() ?: 0)
result = 31 * result + (instances?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (parents?.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 Label
if (aliases != other.aliases) return false
if (categories != other.categories) return false
if (!(confidence?.equals(other.confidence) ?: (other.confidence == null))) return false
if (instances != other.instances) return false
if (name != other.name) return false
if (parents != other.parents) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.Label = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of potential aliases for a given label.
*/
public var aliases: List? = null
/**
* A list of the categories associated with a given label.
*/
public var categories: List? = null
/**
* Level of confidence.
*/
public var confidence: kotlin.Float? = null
/**
* If `Label` represents an object, `Instances` contains the bounding boxes for each instance of the detected object. Bounding boxes are returned for common object labels such as people, cars, furniture, apparel or pets.
*/
public var instances: List? = null
/**
* The name (label) of the object or scene.
*/
public var name: kotlin.String? = null
/**
* The parent labels for a label. The response includes all ancestor labels.
*/
public var parents: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.Label) : this() {
this.aliases = x.aliases
this.categories = x.categories
this.confidence = x.confidence
this.instances = x.instances
this.name = x.name
this.parents = x.parents
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.Label = Label(this)
internal fun correctErrors(): Builder {
return this
}
}
}