commonMain.aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies a custom CSV classifier for `CreateClassifier` to create.
*/
public class CreateCsvClassifierRequest private constructor(builder: Builder) {
/**
* Enables the processing of files that contain only one column.
*/
public val allowSingleColumn: kotlin.Boolean? = builder.allowSingleColumn
/**
* Indicates whether the CSV file contains a header.
*/
public val containsHeader: aws.sdk.kotlin.services.glue.model.CsvHeaderOption? = builder.containsHeader
/**
* Enables the configuration of custom datatypes.
*/
public val customDatatypeConfigured: kotlin.Boolean? = builder.customDatatypeConfigured
/**
* Creates a list of supported custom datatypes.
*/
public val customDatatypes: List? = builder.customDatatypes
/**
* A custom symbol to denote what separates each column entry in the row.
*/
public val delimiter: kotlin.String? = builder.delimiter
/**
* Specifies not to trim values before identifying the type of column values. The default value is true.
*/
public val disableValueTrimming: kotlin.Boolean? = builder.disableValueTrimming
/**
* A list of strings representing column names.
*/
public val header: List? = builder.header
/**
* The name of the classifier.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A custom symbol to denote what combines content into a single column value. Must be different from the column delimiter.
*/
public val quoteSymbol: kotlin.String? = builder.quoteSymbol
/**
* Sets the SerDe for processing CSV in the classifier, which will be applied in the Data Catalog. Valid values are `OpenCSVSerDe`, `LazySimpleSerDe`, and `None`. You can specify the `None` value when you want the crawler to do the detection.
*/
public val serde: aws.sdk.kotlin.services.glue.model.CsvSerdeOption? = builder.serde
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateCsvClassifierRequest(")
append("allowSingleColumn=$allowSingleColumn,")
append("containsHeader=$containsHeader,")
append("customDatatypeConfigured=$customDatatypeConfigured,")
append("customDatatypes=$customDatatypes,")
append("delimiter=$delimiter,")
append("disableValueTrimming=$disableValueTrimming,")
append("header=$header,")
append("name=$name,")
append("quoteSymbol=$quoteSymbol,")
append("serde=$serde")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = allowSingleColumn?.hashCode() ?: 0
result = 31 * result + (containsHeader?.hashCode() ?: 0)
result = 31 * result + (customDatatypeConfigured?.hashCode() ?: 0)
result = 31 * result + (customDatatypes?.hashCode() ?: 0)
result = 31 * result + (delimiter?.hashCode() ?: 0)
result = 31 * result + (disableValueTrimming?.hashCode() ?: 0)
result = 31 * result + (header?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (quoteSymbol?.hashCode() ?: 0)
result = 31 * result + (serde?.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 CreateCsvClassifierRequest
if (allowSingleColumn != other.allowSingleColumn) return false
if (containsHeader != other.containsHeader) return false
if (customDatatypeConfigured != other.customDatatypeConfigured) return false
if (customDatatypes != other.customDatatypes) return false
if (delimiter != other.delimiter) return false
if (disableValueTrimming != other.disableValueTrimming) return false
if (header != other.header) return false
if (name != other.name) return false
if (quoteSymbol != other.quoteSymbol) return false
if (serde != other.serde) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Enables the processing of files that contain only one column.
*/
public var allowSingleColumn: kotlin.Boolean? = null
/**
* Indicates whether the CSV file contains a header.
*/
public var containsHeader: aws.sdk.kotlin.services.glue.model.CsvHeaderOption? = null
/**
* Enables the configuration of custom datatypes.
*/
public var customDatatypeConfigured: kotlin.Boolean? = null
/**
* Creates a list of supported custom datatypes.
*/
public var customDatatypes: List? = null
/**
* A custom symbol to denote what separates each column entry in the row.
*/
public var delimiter: kotlin.String? = null
/**
* Specifies not to trim values before identifying the type of column values. The default value is true.
*/
public var disableValueTrimming: kotlin.Boolean? = null
/**
* A list of strings representing column names.
*/
public var header: List? = null
/**
* The name of the classifier.
*/
public var name: kotlin.String? = null
/**
* A custom symbol to denote what combines content into a single column value. Must be different from the column delimiter.
*/
public var quoteSymbol: kotlin.String? = null
/**
* Sets the SerDe for processing CSV in the classifier, which will be applied in the Data Catalog. Valid values are `OpenCSVSerDe`, `LazySimpleSerDe`, and `None`. You can specify the `None` value when you want the crawler to do the detection.
*/
public var serde: aws.sdk.kotlin.services.glue.model.CsvSerdeOption? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest) : this() {
this.allowSingleColumn = x.allowSingleColumn
this.containsHeader = x.containsHeader
this.customDatatypeConfigured = x.customDatatypeConfigured
this.customDatatypes = x.customDatatypes
this.delimiter = x.delimiter
this.disableValueTrimming = x.disableValueTrimming
this.header = x.header
this.name = x.name
this.quoteSymbol = x.quoteSymbol
this.serde = x.serde
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.CreateCsvClassifierRequest = CreateCsvClassifierRequest(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}