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

commonMain.aws.sdk.kotlin.services.sagemakergeospatial.model.Operation.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.sagemakergeospatial.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents an arithmetic operation to compute spectral index.
 */
public class Operation private constructor(builder: Builder) {
    /**
     * Textual representation of the math operation; Equation used to compute the spectral index.
     */
    public val equation: kotlin.String = requireNotNull(builder.equation) { "A non-null value must be provided for equation" }
    /**
     * The name of the operation.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The type of the operation.
     */
    public val outputType: aws.sdk.kotlin.services.sagemakergeospatial.model.OutputType? = builder.outputType

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

    override fun toString(): kotlin.String = buildString {
        append("Operation(")
        append("equation=$equation,")
        append("name=$name,")
        append("outputType=$outputType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = equation.hashCode()
        result = 31 * result + (name.hashCode())
        result = 31 * result + (outputType?.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 Operation

        if (equation != other.equation) return false
        if (name != other.name) return false
        if (outputType != other.outputType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Textual representation of the math operation; Equation used to compute the spectral index.
         */
        public var equation: kotlin.String? = null
        /**
         * The name of the operation.
         */
        public var name: kotlin.String? = null
        /**
         * The type of the operation.
         */
        public var outputType: aws.sdk.kotlin.services.sagemakergeospatial.model.OutputType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sagemakergeospatial.model.Operation) : this() {
            this.equation = x.equation
            this.name = x.name
            this.outputType = x.outputType
        }

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

        internal fun correctErrors(): Builder {
            if (equation == null) equation = ""
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy