commonMain.aws.sdk.kotlin.services.lookoutvision.model.Anomaly.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lookoutvision-jvm Show documentation
Show all versions of lookoutvision-jvm Show documentation
The AWS SDK for Kotlin client for LookoutVision
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lookoutvision.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about an anomaly type found on an image by an image segmentation model. For more information, see DetectAnomalies.
*/
public class Anomaly private constructor(builder: Builder) {
/**
* The name of an anomaly type found in an image. `Name` maps to an anomaly type in the training dataset, apart from the anomaly type `background`. The service automatically inserts the `background` anomaly type into the response from `DetectAnomalies`.
*/
public val name: kotlin.String? = builder.name
/**
* Information about the pixel mask that covers an anomaly type.
*/
public val pixelAnomaly: aws.sdk.kotlin.services.lookoutvision.model.PixelAnomaly? = builder.pixelAnomaly
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lookoutvision.model.Anomaly = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Anomaly(")
append("name=$name,")
append("pixelAnomaly=$pixelAnomaly")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (pixelAnomaly?.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 Anomaly
if (name != other.name) return false
if (pixelAnomaly != other.pixelAnomaly) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lookoutvision.model.Anomaly = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of an anomaly type found in an image. `Name` maps to an anomaly type in the training dataset, apart from the anomaly type `background`. The service automatically inserts the `background` anomaly type into the response from `DetectAnomalies`.
*/
public var name: kotlin.String? = null
/**
* Information about the pixel mask that covers an anomaly type.
*/
public var pixelAnomaly: aws.sdk.kotlin.services.lookoutvision.model.PixelAnomaly? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lookoutvision.model.Anomaly) : this() {
this.name = x.name
this.pixelAnomaly = x.pixelAnomaly
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lookoutvision.model.Anomaly = Anomaly(this)
/**
* construct an [aws.sdk.kotlin.services.lookoutvision.model.PixelAnomaly] inside the given [block]
*/
public fun pixelAnomaly(block: aws.sdk.kotlin.services.lookoutvision.model.PixelAnomaly.Builder.() -> kotlin.Unit) {
this.pixelAnomaly = aws.sdk.kotlin.services.lookoutvision.model.PixelAnomaly.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}