
commonMain.aws.sdk.kotlin.services.rekognition.model.DetectLabelsSettings.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
/**
* Settings for the DetectLabels request. Settings can include filters for both GENERAL_LABELS and IMAGE_PROPERTIES. GENERAL_LABELS filters can be inclusive or exclusive and applied to individual labels or label categories. IMAGE_PROPERTIES filters allow specification of a maximum number of dominant colors.
*/
public class DetectLabelsSettings private constructor(builder: Builder) {
/**
* Contains the specified filters for GENERAL_LABELS.
*/
public val generalLabels: aws.sdk.kotlin.services.rekognition.model.GeneralLabelsSettings? = builder.generalLabels
/**
* Contains the chosen number of maximum dominant colors in an image.
*/
public val imageProperties: aws.sdk.kotlin.services.rekognition.model.DetectLabelsImagePropertiesSettings? = builder.imageProperties
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.DetectLabelsSettings = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DetectLabelsSettings(")
append("generalLabels=$generalLabels,")
append("imageProperties=$imageProperties")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = generalLabels?.hashCode() ?: 0
result = 31 * result + (imageProperties?.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 DetectLabelsSettings
if (generalLabels != other.generalLabels) return false
if (imageProperties != other.imageProperties) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.DetectLabelsSettings = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains the specified filters for GENERAL_LABELS.
*/
public var generalLabels: aws.sdk.kotlin.services.rekognition.model.GeneralLabelsSettings? = null
/**
* Contains the chosen number of maximum dominant colors in an image.
*/
public var imageProperties: aws.sdk.kotlin.services.rekognition.model.DetectLabelsImagePropertiesSettings? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.DetectLabelsSettings) : this() {
this.generalLabels = x.generalLabels
this.imageProperties = x.imageProperties
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.DetectLabelsSettings = DetectLabelsSettings(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.GeneralLabelsSettings] inside the given [block]
*/
public fun generalLabels(block: aws.sdk.kotlin.services.rekognition.model.GeneralLabelsSettings.Builder.() -> kotlin.Unit) {
this.generalLabels = aws.sdk.kotlin.services.rekognition.model.GeneralLabelsSettings.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.DetectLabelsImagePropertiesSettings] inside the given [block]
*/
public fun imageProperties(block: aws.sdk.kotlin.services.rekognition.model.DetectLabelsImagePropertiesSettings.Builder.() -> kotlin.Unit) {
this.imageProperties = aws.sdk.kotlin.services.rekognition.model.DetectLabelsImagePropertiesSettings.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy