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

commonMain.aws.sdk.kotlin.services.kinesisanalytics.model.MappingParameters.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.kinesisanalytics.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * When configuring application input at the time of creating or updating an application, provides additional mapping information specific to the record format (such as JSON, CSV, or record fields delimited by some delimiter) on the streaming source.
 */
public class MappingParameters private constructor(builder: Builder) {
    /**
     * Provides additional mapping information when the record format uses delimiters (for example, CSV).
     */
    public val csvMappingParameters: aws.sdk.kotlin.services.kinesisanalytics.model.CsvMappingParameters? = builder.csvMappingParameters
    /**
     * Provides additional mapping information when JSON is the record format on the streaming source.
     */
    public val jsonMappingParameters: aws.sdk.kotlin.services.kinesisanalytics.model.JsonMappingParameters? = builder.jsonMappingParameters

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

    override fun toString(): kotlin.String = buildString {
        append("MappingParameters(")
        append("csvMappingParameters=$csvMappingParameters,")
        append("jsonMappingParameters=$jsonMappingParameters")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = csvMappingParameters?.hashCode() ?: 0
        result = 31 * result + (jsonMappingParameters?.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 MappingParameters

        if (csvMappingParameters != other.csvMappingParameters) return false
        if (jsonMappingParameters != other.jsonMappingParameters) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Provides additional mapping information when the record format uses delimiters (for example, CSV).
         */
        public var csvMappingParameters: aws.sdk.kotlin.services.kinesisanalytics.model.CsvMappingParameters? = null
        /**
         * Provides additional mapping information when JSON is the record format on the streaming source.
         */
        public var jsonMappingParameters: aws.sdk.kotlin.services.kinesisanalytics.model.JsonMappingParameters? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesisanalytics.model.MappingParameters) : this() {
            this.csvMappingParameters = x.csvMappingParameters
            this.jsonMappingParameters = x.jsonMappingParameters
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.kinesisanalytics.model.CsvMappingParameters] inside the given [block]
         */
        public fun csvMappingParameters(block: aws.sdk.kotlin.services.kinesisanalytics.model.CsvMappingParameters.Builder.() -> kotlin.Unit) {
            this.csvMappingParameters = aws.sdk.kotlin.services.kinesisanalytics.model.CsvMappingParameters.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.kinesisanalytics.model.JsonMappingParameters] inside the given [block]
         */
        public fun jsonMappingParameters(block: aws.sdk.kotlin.services.kinesisanalytics.model.JsonMappingParameters.Builder.() -> kotlin.Unit) {
            this.jsonMappingParameters = aws.sdk.kotlin.services.kinesisanalytics.model.JsonMappingParameters.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy