All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.RecipeReference.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 reference to a Glue DataBrew recipe.
 */
public class RecipeReference private constructor(builder: Builder) {
    /**
     * The ARN of the DataBrew recipe.
     */
    public val recipeArn: kotlin.String = requireNotNull(builder.recipeArn) { "A non-null value must be provided for recipeArn" }
    /**
     * The RecipeVersion of the DataBrew recipe.
     */
    public val recipeVersion: kotlin.String = requireNotNull(builder.recipeVersion) { "A non-null value must be provided for recipeVersion" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.RecipeReference = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("RecipeReference(")
        append("recipeArn=$recipeArn,")
        append("recipeVersion=$recipeVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = recipeArn.hashCode()
        result = 31 * result + (recipeVersion.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 RecipeReference

        if (recipeArn != other.recipeArn) return false
        if (recipeVersion != other.recipeVersion) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.RecipeReference = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the DataBrew recipe.
         */
        public var recipeArn: kotlin.String? = null
        /**
         * The RecipeVersion of the DataBrew recipe.
         */
        public var recipeVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.RecipeReference) : this() {
            this.recipeArn = x.recipeArn
            this.recipeVersion = x.recipeVersion
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.RecipeReference = RecipeReference(this)

        internal fun correctErrors(): Builder {
            if (recipeArn == null) recipeArn = ""
            if (recipeVersion == null) recipeVersion = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy