
commonMain.aws.sdk.kotlin.services.rekognition.model.DetectModerationLabelsRequest.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
public class DetectModerationLabelsRequest private constructor(builder: Builder) {
/**
* Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
*/
public val humanLoopConfig: aws.sdk.kotlin.services.rekognition.model.HumanLoopConfig? = builder.humanLoopConfig
/**
* The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
*
* If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the `Bytes` field. For more information, see Images in the Amazon Rekognition developer guide.
*/
public val image: aws.sdk.kotlin.services.rekognition.model.Image? = builder.image
/**
* Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
*
* If you don't specify `MinConfidence`, the operation returns labels with confidence values greater than or equal to 50 percent.
*/
public val minConfidence: kotlin.Float? = builder.minConfidence
/**
* Identifier for the custom adapter. Expects the ProjectVersionArn as a value. Use the CreateProject or CreateProjectVersion APIs to create a custom adapter.
*/
public val projectVersion: kotlin.String? = builder.projectVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.DetectModerationLabelsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DetectModerationLabelsRequest(")
append("humanLoopConfig=$humanLoopConfig,")
append("image=$image,")
append("minConfidence=$minConfidence,")
append("projectVersion=$projectVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = humanLoopConfig?.hashCode() ?: 0
result = 31 * result + (image?.hashCode() ?: 0)
result = 31 * result + (minConfidence?.hashCode() ?: 0)
result = 31 * result + (projectVersion?.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 DetectModerationLabelsRequest
if (humanLoopConfig != other.humanLoopConfig) return false
if (image != other.image) return false
if (!(minConfidence?.equals(other.minConfidence) ?: (other.minConfidence == null))) return false
if (projectVersion != other.projectVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.DetectModerationLabelsRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Sets up the configuration for human evaluation, including the FlowDefinition the image will be sent to.
*/
public var humanLoopConfig: aws.sdk.kotlin.services.rekognition.model.HumanLoopConfig? = null
/**
* The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.
*
* If you are using an AWS SDK to call Amazon Rekognition, you might not need to base64-encode image bytes passed using the `Bytes` field. For more information, see Images in the Amazon Rekognition developer guide.
*/
public var image: aws.sdk.kotlin.services.rekognition.model.Image? = null
/**
* Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels with a confidence level lower than this specified value.
*
* If you don't specify `MinConfidence`, the operation returns labels with confidence values greater than or equal to 50 percent.
*/
public var minConfidence: kotlin.Float? = null
/**
* Identifier for the custom adapter. Expects the ProjectVersionArn as a value. Use the CreateProject or CreateProjectVersion APIs to create a custom adapter.
*/
public var projectVersion: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.DetectModerationLabelsRequest) : this() {
this.humanLoopConfig = x.humanLoopConfig
this.image = x.image
this.minConfidence = x.minConfidence
this.projectVersion = x.projectVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.DetectModerationLabelsRequest = DetectModerationLabelsRequest(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.HumanLoopConfig] inside the given [block]
*/
public fun humanLoopConfig(block: aws.sdk.kotlin.services.rekognition.model.HumanLoopConfig.Builder.() -> kotlin.Unit) {
this.humanLoopConfig = aws.sdk.kotlin.services.rekognition.model.HumanLoopConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.Image] inside the given [block]
*/
public fun image(block: aws.sdk.kotlin.services.rekognition.model.Image.Builder.() -> kotlin.Unit) {
this.image = aws.sdk.kotlin.services.rekognition.model.Image.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy