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

commonMain.aws.sdk.kotlin.services.timestreamquery.model.MultiMeasureMappings.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.timestreamquery.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided. MultiMeasureMappings can be used to ingest data as multi measures in the derived table.
 */
public class MultiMeasureMappings private constructor(builder: Builder) {
    /**
     * Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.
     */
    public val multiMeasureAttributeMappings: List = requireNotNull(builder.multiMeasureAttributeMappings) { "A non-null value must be provided for multiMeasureAttributeMappings" }
    /**
     * The name of the target multi-measure name in the derived table. This input is required when measureNameColumn is not provided. If MeasureNameColumn is provided, then value from that column will be used as multi-measure name.
     */
    public val targetMultiMeasureName: kotlin.String? = builder.targetMultiMeasureName

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

    override fun toString(): kotlin.String = buildString {
        append("MultiMeasureMappings(")
        append("multiMeasureAttributeMappings=$multiMeasureAttributeMappings,")
        append("targetMultiMeasureName=$targetMultiMeasureName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = multiMeasureAttributeMappings.hashCode()
        result = 31 * result + (targetMultiMeasureName?.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 MultiMeasureMappings

        if (multiMeasureAttributeMappings != other.multiMeasureAttributeMappings) return false
        if (targetMultiMeasureName != other.targetMultiMeasureName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.
         */
        public var multiMeasureAttributeMappings: List? = null
        /**
         * The name of the target multi-measure name in the derived table. This input is required when measureNameColumn is not provided. If MeasureNameColumn is provided, then value from that column will be used as multi-measure name.
         */
        public var targetMultiMeasureName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.MultiMeasureMappings) : this() {
            this.multiMeasureAttributeMappings = x.multiMeasureAttributeMappings
            this.targetMultiMeasureName = x.targetMultiMeasureName
        }

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

        internal fun correctErrors(): Builder {
            if (multiMeasureAttributeMappings == null) multiMeasureAttributeMappings = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy