commonMain.aws.sdk.kotlin.services.glue.model.CodeGenNodeArg.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An argument or property of a node.
*/
public class CodeGenNodeArg private constructor(builder: Builder) {
/**
* The name of the argument or property.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* True if the value is used as a parameter.
*/
public val param: kotlin.Boolean = builder.param
/**
* The value of the argument or property.
*/
public val value: kotlin.String = requireNotNull(builder.value) { "A non-null value must be provided for value" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.CodeGenNodeArg = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CodeGenNodeArg(")
append("name=$name,")
append("param=$param,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name.hashCode()
result = 31 * result + (param.hashCode())
result = 31 * result + (value.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 CodeGenNodeArg
if (name != other.name) return false
if (param != other.param) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.CodeGenNodeArg = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the argument or property.
*/
public var name: kotlin.String? = null
/**
* True if the value is used as a parameter.
*/
public var param: kotlin.Boolean = false
/**
* The value of the argument or property.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.CodeGenNodeArg) : this() {
this.name = x.name
this.param = x.param
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.CodeGenNodeArg = CodeGenNodeArg(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (value == null) value = ""
return this
}
}
}