commonMain.aws.sdk.kotlin.services.databrew.model.FormatOptions.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
/**
* Represents a set of options that define the structure of either comma-separated value (CSV), Excel, or JSON input.
*/
public class FormatOptions private constructor(builder: Builder) {
/**
* Options that define how CSV input is to be interpreted by DataBrew.
*/
public val csv: aws.sdk.kotlin.services.databrew.model.CsvOptions? = builder.csv
/**
* Options that define how Excel input is to be interpreted by DataBrew.
*/
public val excel: aws.sdk.kotlin.services.databrew.model.ExcelOptions? = builder.excel
/**
* Options that define how JSON input is to be interpreted by DataBrew.
*/
public val json: aws.sdk.kotlin.services.databrew.model.JsonOptions? = builder.json
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.databrew.model.FormatOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FormatOptions(")
append("csv=$csv,")
append("excel=$excel,")
append("json=$json")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = csv?.hashCode() ?: 0
result = 31 * result + (excel?.hashCode() ?: 0)
result = 31 * result + (json?.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 FormatOptions
if (csv != other.csv) return false
if (excel != other.excel) return false
if (json != other.json) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.databrew.model.FormatOptions = Builder(this).apply(block).build()
public class Builder {
/**
* Options that define how CSV input is to be interpreted by DataBrew.
*/
public var csv: aws.sdk.kotlin.services.databrew.model.CsvOptions? = null
/**
* Options that define how Excel input is to be interpreted by DataBrew.
*/
public var excel: aws.sdk.kotlin.services.databrew.model.ExcelOptions? = null
/**
* Options that define how JSON input is to be interpreted by DataBrew.
*/
public var json: aws.sdk.kotlin.services.databrew.model.JsonOptions? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.databrew.model.FormatOptions) : this() {
this.csv = x.csv
this.excel = x.excel
this.json = x.json
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.databrew.model.FormatOptions = FormatOptions(this)
/**
* construct an [aws.sdk.kotlin.services.databrew.model.CsvOptions] inside the given [block]
*/
public fun csv(block: aws.sdk.kotlin.services.databrew.model.CsvOptions.Builder.() -> kotlin.Unit) {
this.csv = aws.sdk.kotlin.services.databrew.model.CsvOptions.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.databrew.model.ExcelOptions] inside the given [block]
*/
public fun excel(block: aws.sdk.kotlin.services.databrew.model.ExcelOptions.Builder.() -> kotlin.Unit) {
this.excel = aws.sdk.kotlin.services.databrew.model.ExcelOptions.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.databrew.model.JsonOptions] inside the given [block]
*/
public fun json(block: aws.sdk.kotlin.services.databrew.model.JsonOptions.Builder.() -> kotlin.Unit) {
this.json = aws.sdk.kotlin.services.databrew.model.JsonOptions.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy