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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents a node in a directed acyclic graph (DAG)
 */
public class CodeGenNode private constructor(builder: Builder) {
    /**
     * Properties of the node, in the form of name-value pairs.
     */
    public val args: List = requireNotNull(builder.args) { "A non-null value must be provided for args" }
    /**
     * A node identifier that is unique within the node's graph.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The line number of the node.
     */
    public val lineNumber: kotlin.Int = builder.lineNumber
    /**
     * The type of node that this is.
     */
    public val nodeType: kotlin.String = requireNotNull(builder.nodeType) { "A non-null value must be provided for nodeType" }

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

    override fun toString(): kotlin.String = buildString {
        append("CodeGenNode(")
        append("args=$args,")
        append("id=$id,")
        append("lineNumber=$lineNumber,")
        append("nodeType=$nodeType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = args.hashCode()
        result = 31 * result + (id.hashCode())
        result = 31 * result + (lineNumber)
        result = 31 * result + (nodeType.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 CodeGenNode

        if (args != other.args) return false
        if (id != other.id) return false
        if (lineNumber != other.lineNumber) return false
        if (nodeType != other.nodeType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Properties of the node, in the form of name-value pairs.
         */
        public var args: List? = null
        /**
         * A node identifier that is unique within the node's graph.
         */
        public var id: kotlin.String? = null
        /**
         * The line number of the node.
         */
        public var lineNumber: kotlin.Int = 0
        /**
         * The type of node that this is.
         */
        public var nodeType: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.CodeGenNode) : this() {
            this.args = x.args
            this.id = x.id
            this.lineNumber = x.lineNumber
            this.nodeType = x.nodeType
        }

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

        internal fun correctErrors(): Builder {
            if (args == null) args = emptyList()
            if (id == null) id = ""
            if (nodeType == null) nodeType = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy