commonMain.aws.sdk.kotlin.services.glue.model.TransformParameters.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
/**
* The algorithm-specific parameters that are associated with the machine learning transform.
*/
public class TransformParameters private constructor(builder: Builder) {
/**
* The parameters for the find matches algorithm.
*/
public val findMatchesParameters: aws.sdk.kotlin.services.glue.model.FindMatchesParameters? = builder.findMatchesParameters
/**
* The type of machine learning transform.
*
* For information about the types of machine learning transforms, see [Creating Machine Learning Transforms](https://docs.aws.amazon.com/glue/latest/dg/add-job-machine-learning-transform.html).
*/
public val transformType: aws.sdk.kotlin.services.glue.model.TransformType = requireNotNull(builder.transformType) { "A non-null value must be provided for transformType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TransformParameters = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TransformParameters(")
append("findMatchesParameters=$findMatchesParameters,")
append("transformType=$transformType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = findMatchesParameters?.hashCode() ?: 0
result = 31 * result + (transformType.hashCode())
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 TransformParameters
if (findMatchesParameters != other.findMatchesParameters) return false
if (transformType != other.transformType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TransformParameters = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The parameters for the find matches algorithm.
*/
public var findMatchesParameters: aws.sdk.kotlin.services.glue.model.FindMatchesParameters? = null
/**
* The type of machine learning transform.
*
* For information about the types of machine learning transforms, see [Creating Machine Learning Transforms](https://docs.aws.amazon.com/glue/latest/dg/add-job-machine-learning-transform.html).
*/
public var transformType: aws.sdk.kotlin.services.glue.model.TransformType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TransformParameters) : this() {
this.findMatchesParameters = x.findMatchesParameters
this.transformType = x.transformType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TransformParameters = TransformParameters(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.FindMatchesParameters] inside the given [block]
*/
public fun findMatchesParameters(block: aws.sdk.kotlin.services.glue.model.FindMatchesParameters.Builder.() -> kotlin.Unit) {
this.findMatchesParameters = aws.sdk.kotlin.services.glue.model.FindMatchesParameters.invoke(block)
}
internal fun correctErrors(): Builder {
if (transformType == null) transformType = TransformType.SdkUnknown("no value provided")
return this
}
}
}