
commonMain.aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageBackground.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
/**
* The background of the image with regard to image quality and dominant colors.
*/
public class DetectLabelsImageBackground private constructor(builder: Builder) {
/**
* The dominant colors found in the background of an image, defined with RGB values, CSS color name, simplified color name, and PixelPercentage (the percentage of image pixels that have a particular color).
*/
public val dominantColors: List? = builder.dominantColors
/**
* The quality of the image background as defined by brightness and sharpness.
*/
public val quality: aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageQuality? = builder.quality
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageBackground = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DetectLabelsImageBackground(")
append("dominantColors=$dominantColors,")
append("quality=$quality")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dominantColors?.hashCode() ?: 0
result = 31 * result + (quality?.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 DetectLabelsImageBackground
if (dominantColors != other.dominantColors) return false
if (quality != other.quality) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageBackground = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The dominant colors found in the background of an image, defined with RGB values, CSS color name, simplified color name, and PixelPercentage (the percentage of image pixels that have a particular color).
*/
public var dominantColors: List? = null
/**
* The quality of the image background as defined by brightness and sharpness.
*/
public var quality: aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageQuality? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageBackground) : this() {
this.dominantColors = x.dominantColors
this.quality = x.quality
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageBackground = DetectLabelsImageBackground(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageQuality] inside the given [block]
*/
public fun quality(block: aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageQuality.Builder.() -> kotlin.Unit) {
this.quality = aws.sdk.kotlin.services.rekognition.model.DetectLabelsImageQuality.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy