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

commonMain.aws.sdk.kotlin.services.timestreamwrite.model.MixedMeasureMapping.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.timestreamwrite.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 *
 */
public class MixedMeasureMapping private constructor(builder: Builder) {
    /**
     *
     */
    public val measureName: kotlin.String? = builder.measureName
    /**
     *
     */
    public val measureValueType: aws.sdk.kotlin.services.timestreamwrite.model.MeasureValueType = requireNotNull(builder.measureValueType) { "A non-null value must be provided for measureValueType" }
    /**
     *
     */
    public val multiMeasureAttributeMappings: List? = builder.multiMeasureAttributeMappings
    /**
     *
     */
    public val sourceColumn: kotlin.String? = builder.sourceColumn
    /**
     *
     */
    public val targetMeasureName: kotlin.String? = builder.targetMeasureName

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

    override fun toString(): kotlin.String = buildString {
        append("MixedMeasureMapping(")
        append("measureName=$measureName,")
        append("measureValueType=$measureValueType,")
        append("multiMeasureAttributeMappings=$multiMeasureAttributeMappings,")
        append("sourceColumn=$sourceColumn,")
        append("targetMeasureName=$targetMeasureName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = measureName?.hashCode() ?: 0
        result = 31 * result + (measureValueType.hashCode())
        result = 31 * result + (multiMeasureAttributeMappings?.hashCode() ?: 0)
        result = 31 * result + (sourceColumn?.hashCode() ?: 0)
        result = 31 * result + (targetMeasureName?.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 MixedMeasureMapping

        if (measureName != other.measureName) return false
        if (measureValueType != other.measureValueType) return false
        if (multiMeasureAttributeMappings != other.multiMeasureAttributeMappings) return false
        if (sourceColumn != other.sourceColumn) return false
        if (targetMeasureName != other.targetMeasureName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         *
         */
        public var measureName: kotlin.String? = null
        /**
         *
         */
        public var measureValueType: aws.sdk.kotlin.services.timestreamwrite.model.MeasureValueType? = null
        /**
         *
         */
        public var multiMeasureAttributeMappings: List? = null
        /**
         *
         */
        public var sourceColumn: kotlin.String? = null
        /**
         *
         */
        public var targetMeasureName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.timestreamwrite.model.MixedMeasureMapping) : this() {
            this.measureName = x.measureName
            this.measureValueType = x.measureValueType
            this.multiMeasureAttributeMappings = x.multiMeasureAttributeMappings
            this.sourceColumn = x.sourceColumn
            this.targetMeasureName = x.targetMeasureName
        }

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

        internal fun correctErrors(): Builder {
            if (measureValueType == null) measureValueType = MeasureValueType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy