commonMain.aws.sdk.kotlin.services.glue.model.Spigot.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies a transform that writes samples of the data to an Amazon S3 bucket.
*/
public class Spigot private constructor(builder: Builder) {
/**
* The data inputs identified by their node names.
*/
public val inputs: List = requireNotNull(builder.inputs) { "A non-null value must be provided for inputs" }
/**
* The name of the transform node.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A path in Amazon S3 where the transform will write a subset of records from the dataset to a JSON file in an Amazon S3 bucket.
*/
public val path: kotlin.String = requireNotNull(builder.path) { "A non-null value must be provided for path" }
/**
* The probability (a decimal value with a maximum value of 1) of picking any given record. A value of 1 indicates that each row read from the dataset should be included in the sample output.
*/
public val prob: kotlin.Double? = builder.prob
/**
* Specifies a number of records to write starting from the beginning of the dataset.
*/
public val topk: kotlin.Int? = builder.topk
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Spigot = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Spigot(")
append("inputs=$inputs,")
append("name=$name,")
append("path=$path,")
append("prob=$prob,")
append("topk=$topk")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = inputs.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (path.hashCode())
result = 31 * result + (prob?.hashCode() ?: 0)
result = 31 * result + (topk ?: 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 Spigot
if (inputs != other.inputs) return false
if (name != other.name) return false
if (path != other.path) return false
if (!(prob?.equals(other.prob) ?: (other.prob == null))) return false
if (topk != other.topk) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Spigot = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The data inputs identified by their node names.
*/
public var inputs: List? = null
/**
* The name of the transform node.
*/
public var name: kotlin.String? = null
/**
* A path in Amazon S3 where the transform will write a subset of records from the dataset to a JSON file in an Amazon S3 bucket.
*/
public var path: kotlin.String? = null
/**
* The probability (a decimal value with a maximum value of 1) of picking any given record. A value of 1 indicates that each row read from the dataset should be included in the sample output.
*/
public var prob: kotlin.Double? = null
/**
* Specifies a number of records to write starting from the beginning of the dataset.
*/
public var topk: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Spigot) : this() {
this.inputs = x.inputs
this.name = x.name
this.path = x.path
this.prob = x.prob
this.topk = x.topk
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Spigot = Spigot(this)
internal fun correctErrors(): Builder {
if (inputs == null) inputs = emptyList()
if (name == null) name = ""
if (path == null) path = ""
return this
}
}
}