commonMain.aws.sdk.kotlin.services.glue.model.ConnectorDataSource.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 source generated with standard connection options.
*/
public class ConnectorDataSource 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 name of this source node.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Specifies the data schema for this source.
*/
public val outputSchemas: List? = builder.outputSchemas
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.ConnectorDataSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConnectorDataSource(")
append("connectionType=$connectionType,")
append("data=$data,")
append("name=$name,")
append("outputSchemas=$outputSchemas")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectionType.hashCode()
result = 31 * result + (data.hashCode())
result = 31 * result + (name.hashCode())
result = 31 * result + (outputSchemas?.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 ConnectorDataSource
if (connectionType != other.connectionType) return false
if (data != other.data) return false
if (name != other.name) return false
if (outputSchemas != other.outputSchemas) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ConnectorDataSource = 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 name of this source node.
*/
public var name: kotlin.String? = null
/**
* Specifies the data schema for this source.
*/
public var outputSchemas: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.ConnectorDataSource) : this() {
this.connectionType = x.connectionType
this.data = x.data
this.name = x.name
this.outputSchemas = x.outputSchemas
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.ConnectorDataSource = ConnectorDataSource(this)
internal fun correctErrors(): Builder {
if (connectionType == null) connectionType = ""
if (data == null) data = emptyMap()
if (name == null) name = ""
return this
}
}
}