commonMain.aws.sdk.kotlin.services.glue.model.S3ParquetSource.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
/**
* Specifies an Apache Parquet data store stored in Amazon S3.
*/
public class S3ParquetSource private constructor(builder: Builder) {
/**
* Specifies additional connection options.
*/
public val additionalOptions: aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions? = builder.additionalOptions
/**
* Specifies how the data is compressed. This is generally not necessary if the data has a standard file extension. Possible values are `"gzip"` and `"bzip"`).
*/
public val compressionType: aws.sdk.kotlin.services.glue.model.ParquetCompressionType? = builder.compressionType
/**
* A string containing a JSON list of Unix-style glob patterns to exclude. For example, "[\"**.pdf\"]" excludes all PDF files.
*/
public val exclusions: List? = builder.exclusions
/**
* Grouping files is turned on by default when the input contains more than 50,000 files. To turn on grouping with fewer than 50,000 files, set this parameter to "inPartition". To disable grouping when there are more than 50,000 files, set this parameter to `"none"`.
*/
public val groupFiles: kotlin.String? = builder.groupFiles
/**
* The target group size in bytes. The default is computed based on the input data size and the size of your cluster. When there are fewer than 50,000 input files, `"groupFiles"` must be set to `"inPartition"` for this to take effect.
*/
public val groupSize: kotlin.String? = builder.groupSize
/**
* This option controls the duration in milliseconds after which the s3 listing is likely to be consistent. Files with modification timestamps falling within the last maxBand milliseconds are tracked specially when using JobBookmarks to account for Amazon S3 eventual consistency. Most users don't need to set this option. The default is 900000 milliseconds, or 15 minutes.
*/
public val maxBand: kotlin.Int? = builder.maxBand
/**
* This option specifies the maximum number of files to save from the last maxBand seconds. If this number is exceeded, extra files are skipped and only processed in the next job run.
*/
public val maxFilesInBand: kotlin.Int? = builder.maxFilesInBand
/**
* The name of the data store.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Specifies the data schema for the S3 Parquet 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" }
/**
* If set to true, recursively reads files in all subdirectories under the specified paths.
*/
public val recurse: kotlin.Boolean? = builder.recurse
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.S3ParquetSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("S3ParquetSource(")
append("additionalOptions=$additionalOptions,")
append("compressionType=$compressionType,")
append("exclusions=$exclusions,")
append("groupFiles=$groupFiles,")
append("groupSize=$groupSize,")
append("maxBand=$maxBand,")
append("maxFilesInBand=$maxFilesInBand,")
append("name=$name,")
append("outputSchemas=$outputSchemas,")
append("paths=$paths,")
append("recurse=$recurse")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalOptions?.hashCode() ?: 0
result = 31 * result + (compressionType?.hashCode() ?: 0)
result = 31 * result + (exclusions?.hashCode() ?: 0)
result = 31 * result + (groupFiles?.hashCode() ?: 0)
result = 31 * result + (groupSize?.hashCode() ?: 0)
result = 31 * result + (maxBand ?: 0)
result = 31 * result + (maxFilesInBand ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (outputSchemas?.hashCode() ?: 0)
result = 31 * result + (paths.hashCode())
result = 31 * result + (recurse?.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 S3ParquetSource
if (additionalOptions != other.additionalOptions) return false
if (compressionType != other.compressionType) return false
if (exclusions != other.exclusions) return false
if (groupFiles != other.groupFiles) return false
if (groupSize != other.groupSize) return false
if (maxBand != other.maxBand) return false
if (maxFilesInBand != other.maxFilesInBand) return false
if (name != other.name) return false
if (outputSchemas != other.outputSchemas) return false
if (paths != other.paths) return false
if (recurse != other.recurse) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.S3ParquetSource = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies additional connection options.
*/
public var additionalOptions: aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions? = null
/**
* Specifies how the data is compressed. This is generally not necessary if the data has a standard file extension. Possible values are `"gzip"` and `"bzip"`).
*/
public var compressionType: aws.sdk.kotlin.services.glue.model.ParquetCompressionType? = null
/**
* A string containing a JSON list of Unix-style glob patterns to exclude. For example, "[\"**.pdf\"]" excludes all PDF files.
*/
public var exclusions: List? = null
/**
* Grouping files is turned on by default when the input contains more than 50,000 files. To turn on grouping with fewer than 50,000 files, set this parameter to "inPartition". To disable grouping when there are more than 50,000 files, set this parameter to `"none"`.
*/
public var groupFiles: kotlin.String? = null
/**
* The target group size in bytes. The default is computed based on the input data size and the size of your cluster. When there are fewer than 50,000 input files, `"groupFiles"` must be set to `"inPartition"` for this to take effect.
*/
public var groupSize: kotlin.String? = null
/**
* This option controls the duration in milliseconds after which the s3 listing is likely to be consistent. Files with modification timestamps falling within the last maxBand milliseconds are tracked specially when using JobBookmarks to account for Amazon S3 eventual consistency. Most users don't need to set this option. The default is 900000 milliseconds, or 15 minutes.
*/
public var maxBand: kotlin.Int? = null
/**
* This option specifies the maximum number of files to save from the last maxBand seconds. If this number is exceeded, extra files are skipped and only processed in the next job run.
*/
public var maxFilesInBand: kotlin.Int? = null
/**
* The name of the data store.
*/
public var name: kotlin.String? = null
/**
* Specifies the data schema for the S3 Parquet source.
*/
public var outputSchemas: List? = null
/**
* A list of the Amazon S3 paths to read from.
*/
public var paths: List? = null
/**
* If set to true, recursively reads files in all subdirectories under the specified paths.
*/
public var recurse: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.S3ParquetSource) : this() {
this.additionalOptions = x.additionalOptions
this.compressionType = x.compressionType
this.exclusions = x.exclusions
this.groupFiles = x.groupFiles
this.groupSize = x.groupSize
this.maxBand = x.maxBand
this.maxFilesInBand = x.maxFilesInBand
this.name = x.name
this.outputSchemas = x.outputSchemas
this.paths = x.paths
this.recurse = x.recurse
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.S3ParquetSource = S3ParquetSource(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
}
}
}