commonMain.aws.sdk.kotlin.services.glue.model.ConnectorDataTarget.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
/**
* Specifies a target generated with standard connection options.
*/
public class ConnectorDataTarget private constructor(builder: Builder) {
/**
* The `connectionType`, as provided to the underlying Glue library. This node type supports the following connection types:
* + `opensearch`
* + `azuresql`
* + `azurecosmos`
* + `bigquery`
* + `saphana`
* + `teradata`
* + `vertica`
*/
public val connectionType: kotlin.String = requireNotNull(builder.connectionType) { "A non-null value must be provided for connectionType" }
/**
* A map specifying connection options for the node. You can find standard connection options for the corresponding connection type in the [ Connection parameters](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-connect.html) section of the Glue documentation.
*/
public val data: Map = requireNotNull(builder.data) { "A non-null value must be provided for data" }
/**
* The nodes that are inputs to the data target.
*/
public val inputs: List? = builder.inputs
/**
* The name of this target node.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.ConnectorDataTarget = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConnectorDataTarget(")
append("connectionType=$connectionType,")
append("data=$data,")
append("inputs=$inputs,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectionType.hashCode()
result = 31 * result + (data.hashCode())
result = 31 * result + (inputs?.hashCode() ?: 0)
result = 31 * result + (name.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 ConnectorDataTarget
if (connectionType != other.connectionType) return false
if (data != other.data) return false
if (inputs != other.inputs) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ConnectorDataTarget = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The `connectionType`, as provided to the underlying Glue library. This node type supports the following connection types:
* + `opensearch`
* + `azuresql`
* + `azurecosmos`
* + `bigquery`
* + `saphana`
* + `teradata`
* + `vertica`
*/
public var connectionType: kotlin.String? = null
/**
* A map specifying connection options for the node. You can find standard connection options for the corresponding connection type in the [ Connection parameters](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-connect.html) section of the Glue documentation.
*/
public var data: Map? = null
/**
* The nodes that are inputs to the data target.
*/
public var inputs: List? = null
/**
* The name of this target node.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.ConnectorDataTarget) : this() {
this.connectionType = x.connectionType
this.data = x.data
this.inputs = x.inputs
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.ConnectorDataTarget = ConnectorDataTarget(this)
internal fun correctErrors(): Builder {
if (connectionType == null) connectionType = ""
if (data == null) data = emptyMap()
if (name == null) name = ""
return this
}
}
}