All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.rekognition.model.DatasetLabelDescription.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.rekognition.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes a dataset label. For more information, see ListDatasetLabels.
 */
public class DatasetLabelDescription private constructor(builder: Builder) {
    /**
     * The name of the label.
     */
    public val labelName: kotlin.String? = builder.labelName
    /**
     * Statistics about the label.
     */
    public val labelStats: aws.sdk.kotlin.services.rekognition.model.DatasetLabelStats? = builder.labelStats

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.DatasetLabelDescription = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DatasetLabelDescription(")
        append("labelName=$labelName,")
        append("labelStats=$labelStats")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = labelName?.hashCode() ?: 0
        result = 31 * result + (labelStats?.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 DatasetLabelDescription

        if (labelName != other.labelName) return false
        if (labelStats != other.labelStats) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.DatasetLabelDescription = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The name of the label.
         */
        public var labelName: kotlin.String? = null
        /**
         * Statistics about the label.
         */
        public var labelStats: aws.sdk.kotlin.services.rekognition.model.DatasetLabelStats? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.DatasetLabelDescription) : this() {
            this.labelName = x.labelName
            this.labelStats = x.labelStats
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.rekognition.model.DatasetLabelDescription = DatasetLabelDescription(this)

        /**
         * construct an [aws.sdk.kotlin.services.rekognition.model.DatasetLabelStats] inside the given [block]
         */
        public fun labelStats(block: aws.sdk.kotlin.services.rekognition.model.DatasetLabelStats.Builder.() -> kotlin.Unit) {
            this.labelStats = aws.sdk.kotlin.services.rekognition.model.DatasetLabelStats.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy