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

commonMain.aws.sdk.kotlin.services.lookoutvision.model.PixelAnomaly.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lookoutvision.model



/**
 * Information about the pixels in an anomaly mask. For more information, see Anomaly. `PixelAnomaly` is only returned by image segmentation models.
 */
public class PixelAnomaly private constructor(builder: Builder) {
    /**
     * A hex color value for the mask that covers an anomaly type. Each anomaly type has a different mask color. The color maps to the color of the anomaly type used in the training dataset.
     */
    public val color: kotlin.String? = builder.color
    /**
     * The percentage area of the image that the anomaly type covers.
     */
    public val totalPercentageArea: kotlin.Float? = builder.totalPercentageArea

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

    override fun toString(): kotlin.String = buildString {
        append("PixelAnomaly(")
        append("color=$color,")
        append("totalPercentageArea=$totalPercentageArea")
        append(")")
    }

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

        if (color != other.color) return false
        if (totalPercentageArea != other.totalPercentageArea) return false

        return true
    }

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

    public class Builder {
        /**
         * A hex color value for the mask that covers an anomaly type. Each anomaly type has a different mask color. The color maps to the color of the anomaly type used in the training dataset.
         */
        public var color: kotlin.String? = null
        /**
         * The percentage area of the image that the anomaly type covers.
         */
        public var totalPercentageArea: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutvision.model.PixelAnomaly) : this() {
            this.color = x.color
            this.totalPercentageArea = x.totalPercentageArea
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy