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

commonMain.aws.sdk.kotlin.services.glue.model.GetMappingRequest.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

public class GetMappingRequest private constructor(builder: Builder) {
    /**
     * Parameters for the mapping.
     */
    public val location: aws.sdk.kotlin.services.glue.model.Location? = builder.location
    /**
     * A list of target tables.
     */
    public val sinks: List? = builder.sinks
    /**
     * Specifies the source table.
     */
    public val source: aws.sdk.kotlin.services.glue.model.CatalogEntry? = builder.source

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

    override fun toString(): kotlin.String = buildString {
        append("GetMappingRequest(")
        append("location=$location,")
        append("sinks=$sinks,")
        append("source=$source")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = location?.hashCode() ?: 0
        result = 31 * result + (sinks?.hashCode() ?: 0)
        result = 31 * result + (source?.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 GetMappingRequest

        if (location != other.location) return false
        if (sinks != other.sinks) return false
        if (source != other.source) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Parameters for the mapping.
         */
        public var location: aws.sdk.kotlin.services.glue.model.Location? = null
        /**
         * A list of target tables.
         */
        public var sinks: List? = null
        /**
         * Specifies the source table.
         */
        public var source: aws.sdk.kotlin.services.glue.model.CatalogEntry? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.GetMappingRequest) : this() {
            this.location = x.location
            this.sinks = x.sinks
            this.source = x.source
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy