commonMain.aws.sdk.kotlin.services.glue.model.DirectKinesisSource.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
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies a direct Amazon Kinesis data source.
*/
public class DirectKinesisSource private constructor(builder: Builder) {
/**
* Additional options for data preview.
*/
public val dataPreviewOptions: aws.sdk.kotlin.services.glue.model.StreamingDataPreviewOptions? = builder.dataPreviewOptions
/**
* Whether to automatically determine the schema from the incoming data.
*/
public val detectSchema: kotlin.Boolean? = builder.detectSchema
/**
* The name of the data source.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Additional options for the Kinesis streaming data source.
*/
public val streamingOptions: aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions? = builder.streamingOptions
/**
* The amount of time to spend processing each micro batch.
*/
public val windowSize: kotlin.Int? = builder.windowSize
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.DirectKinesisSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DirectKinesisSource(")
append("dataPreviewOptions=$dataPreviewOptions,")
append("detectSchema=$detectSchema,")
append("name=$name,")
append("streamingOptions=$streamingOptions,")
append("windowSize=$windowSize")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dataPreviewOptions?.hashCode() ?: 0
result = 31 * result + (detectSchema?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (streamingOptions?.hashCode() ?: 0)
result = 31 * result + (windowSize ?: 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 DirectKinesisSource
if (dataPreviewOptions != other.dataPreviewOptions) return false
if (detectSchema != other.detectSchema) return false
if (name != other.name) return false
if (streamingOptions != other.streamingOptions) return false
if (windowSize != other.windowSize) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.DirectKinesisSource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Additional options for data preview.
*/
public var dataPreviewOptions: aws.sdk.kotlin.services.glue.model.StreamingDataPreviewOptions? = null
/**
* Whether to automatically determine the schema from the incoming data.
*/
public var detectSchema: kotlin.Boolean? = null
/**
* The name of the data source.
*/
public var name: kotlin.String? = null
/**
* Additional options for the Kinesis streaming data source.
*/
public var streamingOptions: aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions? = null
/**
* The amount of time to spend processing each micro batch.
*/
public var windowSize: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.DirectKinesisSource) : this() {
this.dataPreviewOptions = x.dataPreviewOptions
this.detectSchema = x.detectSchema
this.name = x.name
this.streamingOptions = x.streamingOptions
this.windowSize = x.windowSize
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.DirectKinesisSource = DirectKinesisSource(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.StreamingDataPreviewOptions] inside the given [block]
*/
public fun dataPreviewOptions(block: aws.sdk.kotlin.services.glue.model.StreamingDataPreviewOptions.Builder.() -> kotlin.Unit) {
this.dataPreviewOptions = aws.sdk.kotlin.services.glue.model.StreamingDataPreviewOptions.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions] inside the given [block]
*/
public fun streamingOptions(block: aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions.Builder.() -> kotlin.Unit) {
this.streamingOptions = aws.sdk.kotlin.services.glue.model.KinesisStreamingSourceOptions.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}