commonMain.aws.sdk.kotlin.services.glue.model.JdbcConnectorSource.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies a connector to a JDBC data source.
*/
public class JdbcConnectorSource private constructor(builder: Builder) {
/**
* Additional connection options for the connector.
*/
public val additionalOptions: aws.sdk.kotlin.services.glue.model.JdbcConnectorOptions? = builder.additionalOptions
/**
* The name of the connection that is associated with the connector.
*/
public val connectionName: kotlin.String = requireNotNull(builder.connectionName) { "A non-null value must be provided for connectionName" }
/**
* The name of the table in the data source.
*/
public val connectionTable: kotlin.String? = builder.connectionTable
/**
* The type of connection, such as marketplace.jdbc or custom.jdbc, designating a connection to a JDBC data store.
*/
public val connectionType: kotlin.String = requireNotNull(builder.connectionType) { "A non-null value must be provided for connectionType" }
/**
* The name of a connector that assists with accessing the data store in Glue Studio.
*/
public val connectorName: kotlin.String = requireNotNull(builder.connectorName) { "A non-null value must be provided for connectorName" }
/**
* The name of the data source.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Specifies the data schema for the custom JDBC source.
*/
public val outputSchemas: List? = builder.outputSchemas
/**
* The table or SQL query to get the data from. You can specify either `ConnectionTable` or `query`, but not both.
*/
public val query: kotlin.String? = builder.query
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.JdbcConnectorSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("JdbcConnectorSource(")
append("additionalOptions=$additionalOptions,")
append("connectionName=$connectionName,")
append("connectionTable=$connectionTable,")
append("connectionType=$connectionType,")
append("connectorName=$connectorName,")
append("name=$name,")
append("outputSchemas=$outputSchemas,")
append("query=$query")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalOptions?.hashCode() ?: 0
result = 31 * result + (connectionName.hashCode())
result = 31 * result + (connectionTable?.hashCode() ?: 0)
result = 31 * result + (connectionType.hashCode())
result = 31 * result + (connectorName.hashCode())
result = 31 * result + (name.hashCode())
result = 31 * result + (outputSchemas?.hashCode() ?: 0)
result = 31 * result + (query?.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 JdbcConnectorSource
if (additionalOptions != other.additionalOptions) return false
if (connectionName != other.connectionName) return false
if (connectionTable != other.connectionTable) return false
if (connectionType != other.connectionType) return false
if (connectorName != other.connectorName) return false
if (name != other.name) return false
if (outputSchemas != other.outputSchemas) return false
if (query != other.query) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.JdbcConnectorSource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Additional connection options for the connector.
*/
public var additionalOptions: aws.sdk.kotlin.services.glue.model.JdbcConnectorOptions? = null
/**
* The name of the connection that is associated with the connector.
*/
public var connectionName: kotlin.String? = null
/**
* The name of the table in the data source.
*/
public var connectionTable: kotlin.String? = null
/**
* The type of connection, such as marketplace.jdbc or custom.jdbc, designating a connection to a JDBC data store.
*/
public var connectionType: kotlin.String? = null
/**
* The name of a connector that assists with accessing the data store in Glue Studio.
*/
public var connectorName: kotlin.String? = null
/**
* The name of the data source.
*/
public var name: kotlin.String? = null
/**
* Specifies the data schema for the custom JDBC source.
*/
public var outputSchemas: List? = null
/**
* The table or SQL query to get the data from. You can specify either `ConnectionTable` or `query`, but not both.
*/
public var query: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.JdbcConnectorSource) : this() {
this.additionalOptions = x.additionalOptions
this.connectionName = x.connectionName
this.connectionTable = x.connectionTable
this.connectionType = x.connectionType
this.connectorName = x.connectorName
this.name = x.name
this.outputSchemas = x.outputSchemas
this.query = x.query
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.JdbcConnectorSource = JdbcConnectorSource(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.JdbcConnectorOptions] inside the given [block]
*/
public fun additionalOptions(block: aws.sdk.kotlin.services.glue.model.JdbcConnectorOptions.Builder.() -> kotlin.Unit) {
this.additionalOptions = aws.sdk.kotlin.services.glue.model.JdbcConnectorOptions.invoke(block)
}
internal fun correctErrors(): Builder {
if (connectionName == null) connectionName = ""
if (connectionType == null) connectionType = ""
if (connectorName == null) connectorName = ""
if (name == null) name = ""
return this
}
}
}