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

commonMain.aws.sdk.kotlin.services.glue.model.ConditionExpression.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Condition expression defined in the Glue Studio data preparation recipe node.
 */
public class ConditionExpression private constructor(builder: Builder) {
    /**
     * The condition of the condition expression.
     */
    public val condition: kotlin.String = requireNotNull(builder.condition) { "A non-null value must be provided for condition" }
    /**
     * The target column of the condition expressions.
     */
    public val targetColumn: kotlin.String = requireNotNull(builder.targetColumn) { "A non-null value must be provided for targetColumn" }
    /**
     * The value of the condition expression.
     */
    public val value: kotlin.String? = builder.value

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

    override fun toString(): kotlin.String = buildString {
        append("ConditionExpression(")
        append("condition=$condition,")
        append("targetColumn=$targetColumn,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = condition.hashCode()
        result = 31 * result + (targetColumn.hashCode())
        result = 31 * result + (value?.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 ConditionExpression

        if (condition != other.condition) return false
        if (targetColumn != other.targetColumn) return false
        if (value != other.value) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The condition of the condition expression.
         */
        public var condition: kotlin.String? = null
        /**
         * The target column of the condition expressions.
         */
        public var targetColumn: kotlin.String? = null
        /**
         * The value of the condition expression.
         */
        public var value: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.ConditionExpression) : this() {
            this.condition = x.condition
            this.targetColumn = x.targetColumn
            this.value = x.value
        }

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

        internal fun correctErrors(): Builder {
            if (condition == null) condition = ""
            if (targetColumn == null) targetColumn = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy