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

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

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

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

import aws.smithy.kotlin.runtime.content.ByteStream

public class DetectAnomaliesRequest private constructor(builder: Builder) {
    /**
     * The unencrypted image bytes that you want to analyze.
     */
    public val body: aws.smithy.kotlin.runtime.content.ByteStream? = builder.body
    /**
     * The type of the image passed in `Body`. Valid values are `image/png` (PNG format images) and `image/jpeg` (JPG format images).
     */
    public val contentType: kotlin.String? = builder.contentType
    /**
     * The version of the model that you want to use.
     */
    public val modelVersion: kotlin.String? = builder.modelVersion
    /**
     * The name of the project that contains the model version that you want to use.
     */
    public val projectName: kotlin.String? = builder.projectName

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

    override fun toString(): kotlin.String = buildString {
        append("DetectAnomaliesRequest(")
        append("body=$body,")
        append("contentType=$contentType,")
        append("modelVersion=$modelVersion,")
        append("projectName=$projectName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = body?.hashCode() ?: 0
        result = 31 * result + (contentType?.hashCode() ?: 0)
        result = 31 * result + (modelVersion?.hashCode() ?: 0)
        result = 31 * result + (projectName?.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 DetectAnomaliesRequest

        if (body != other.body) return false
        if (contentType != other.contentType) return false
        if (modelVersion != other.modelVersion) return false
        if (projectName != other.projectName) return false

        return true
    }

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

    public class Builder {
        /**
         * The unencrypted image bytes that you want to analyze.
         */
        public var body: aws.smithy.kotlin.runtime.content.ByteStream? = null
        /**
         * The type of the image passed in `Body`. Valid values are `image/png` (PNG format images) and `image/jpeg` (JPG format images).
         */
        public var contentType: kotlin.String? = null
        /**
         * The version of the model that you want to use.
         */
        public var modelVersion: kotlin.String? = null
        /**
         * The name of the project that contains the model version that you want to use.
         */
        public var projectName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutvision.model.DetectAnomaliesRequest) : this() {
            this.body = x.body
            this.contentType = x.contentType
            this.modelVersion = x.modelVersion
            this.projectName = x.projectName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy