commonMain.aws.sdk.kotlin.services.glue.model.S3DeltaSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
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
/**
* Specifies a Delta Lake data source stored in Amazon S3.
*/
public class S3DeltaSource private constructor(builder: Builder) {
/**
* Specifies additional connection options.
*/
public val additionalDeltaOptions: Map? = builder.additionalDeltaOptions
/**
* Specifies additional options for the connector.
*/
public val additionalOptions: aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions? = builder.additionalOptions
/**
* The name of the Delta Lake source.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Specifies the data schema for the Delta Lake source.
*/
public val outputSchemas: List? = builder.outputSchemas
/**
* A list of the Amazon S3 paths to read from.
*/
public val paths: List = requireNotNull(builder.paths) { "A non-null value must be provided for paths" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.S3DeltaSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("S3DeltaSource(")
append("additionalDeltaOptions=$additionalDeltaOptions,")
append("additionalOptions=$additionalOptions,")
append("name=$name,")
append("outputSchemas=$outputSchemas,")
append("paths=$paths")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalDeltaOptions?.hashCode() ?: 0
result = 31 * result + (additionalOptions?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (outputSchemas?.hashCode() ?: 0)
result = 31 * result + (paths.hashCode())
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 S3DeltaSource
if (additionalDeltaOptions != other.additionalDeltaOptions) return false
if (additionalOptions != other.additionalOptions) return false
if (name != other.name) return false
if (outputSchemas != other.outputSchemas) return false
if (paths != other.paths) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.S3DeltaSource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies additional connection options.
*/
public var additionalDeltaOptions: Map? = null
/**
* Specifies additional options for the connector.
*/
public var additionalOptions: aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions? = null
/**
* The name of the Delta Lake source.
*/
public var name: kotlin.String? = null
/**
* Specifies the data schema for the Delta Lake source.
*/
public var outputSchemas: List? = null
/**
* A list of the Amazon S3 paths to read from.
*/
public var paths: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.S3DeltaSource) : this() {
this.additionalDeltaOptions = x.additionalDeltaOptions
this.additionalOptions = x.additionalOptions
this.name = x.name
this.outputSchemas = x.outputSchemas
this.paths = x.paths
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.S3DeltaSource = S3DeltaSource(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions] inside the given [block]
*/
public fun additionalOptions(block: aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions.Builder.() -> kotlin.Unit) {
this.additionalOptions = aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (paths == null) paths = emptyList()
return this
}
}
}