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

commonMain.aws.sdk.kotlin.services.glue.model.CodeGenEdge.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model



/**
 * Represents a directional edge in a directed acyclic graph (DAG).
 */
public class CodeGenEdge private constructor(builder: Builder) {
    /**
     * The ID of the node at which the edge starts.
     */
    public val source: kotlin.String = requireNotNull(builder.source) { "A non-null value must be provided for source" }
    /**
     * The ID of the node at which the edge ends.
     */
    public val target: kotlin.String = requireNotNull(builder.target) { "A non-null value must be provided for target" }
    /**
     * The target of the edge.
     */
    public val targetParameter: kotlin.String? = builder.targetParameter

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

    override fun toString(): kotlin.String = buildString {
        append("CodeGenEdge(")
        append("source=$source,")
        append("target=$target,")
        append("targetParameter=$targetParameter")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = source.hashCode()
        result = 31 * result + (target.hashCode())
        result = 31 * result + (targetParameter?.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 CodeGenEdge

        if (source != other.source) return false
        if (target != other.target) return false
        if (targetParameter != other.targetParameter) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the node at which the edge starts.
         */
        public var source: kotlin.String? = null
        /**
         * The ID of the node at which the edge ends.
         */
        public var target: kotlin.String? = null
        /**
         * The target of the edge.
         */
        public var targetParameter: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.CodeGenEdge) : this() {
            this.source = x.source
            this.target = x.target
            this.targetParameter = x.targetParameter
        }

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

        internal fun correctErrors(): Builder {
            if (source == null) source = ""
            if (target == null) target = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy