commonMain.aws.sdk.kotlin.services.glue.model.Recipe.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
/**
* A Glue Studio node that uses a Glue DataBrew recipe in Glue jobs.
*/
public class Recipe private constructor(builder: Builder) {
/**
* The nodes that are inputs to the recipe node, identified by id.
*/
public val inputs: List = requireNotNull(builder.inputs) { "A non-null value must be provided for inputs" }
/**
* The name of the Glue Studio node.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A reference to the DataBrew recipe used by the node.
*/
public val recipeReference: aws.sdk.kotlin.services.glue.model.RecipeReference? = builder.recipeReference
/**
* Transform steps used in the recipe node.
*/
public val recipeSteps: List? = builder.recipeSteps
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Recipe = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Recipe(")
append("inputs=$inputs,")
append("name=$name,")
append("recipeReference=$recipeReference,")
append("recipeSteps=$recipeSteps")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = inputs.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (recipeReference?.hashCode() ?: 0)
result = 31 * result + (recipeSteps?.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 Recipe
if (inputs != other.inputs) return false
if (name != other.name) return false
if (recipeReference != other.recipeReference) return false
if (recipeSteps != other.recipeSteps) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Recipe = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The nodes that are inputs to the recipe node, identified by id.
*/
public var inputs: List? = null
/**
* The name of the Glue Studio node.
*/
public var name: kotlin.String? = null
/**
* A reference to the DataBrew recipe used by the node.
*/
public var recipeReference: aws.sdk.kotlin.services.glue.model.RecipeReference? = null
/**
* Transform steps used in the recipe node.
*/
public var recipeSteps: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Recipe) : this() {
this.inputs = x.inputs
this.name = x.name
this.recipeReference = x.recipeReference
this.recipeSteps = x.recipeSteps
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Recipe = Recipe(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.RecipeReference] inside the given [block]
*/
public fun recipeReference(block: aws.sdk.kotlin.services.glue.model.RecipeReference.Builder.() -> kotlin.Unit) {
this.recipeReference = aws.sdk.kotlin.services.glue.model.RecipeReference.invoke(block)
}
internal fun correctErrors(): Builder {
if (inputs == null) inputs = emptyList()
if (name == null) name = ""
return this
}
}
}