commonMain.aws.sdk.kotlin.services.databrew.model.CsvOptions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databrew-jvm Show documentation
Show all versions of databrew-jvm Show documentation
The AWS Kotlin client for DataBrew
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databrew.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Represents a set of options that define how DataBrew will read a comma-separated value (CSV) file when creating a dataset from that file.
*/
public class CsvOptions private constructor(builder: Builder) {
/**
* A single character that specifies the delimiter being used in the CSV file.
*/
public val delimiter: kotlin.String? = builder.delimiter
/**
* A variable that specifies whether the first row in the file is parsed as the header. If this value is false, column names are auto-generated.
*/
public val headerRow: kotlin.Boolean? = builder.headerRow
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.databrew.model.CsvOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CsvOptions(")
append("delimiter=$delimiter,")
append("headerRow=$headerRow")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = delimiter?.hashCode() ?: 0
result = 31 * result + (headerRow?.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 CsvOptions
if (delimiter != other.delimiter) return false
if (headerRow != other.headerRow) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.databrew.model.CsvOptions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A single character that specifies the delimiter being used in the CSV file.
*/
public var delimiter: kotlin.String? = null
/**
* A variable that specifies whether the first row in the file is parsed as the header. If this value is false, column names are auto-generated.
*/
public var headerRow: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.databrew.model.CsvOptions) : this() {
this.delimiter = x.delimiter
this.headerRow = x.headerRow
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.databrew.model.CsvOptions = CsvOptions(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy