commonMain.aws.sdk.kotlin.services.glue.model.SparkConnectorSource.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
/**
* Specifies a connector to an Apache Spark data source.
*/
public class SparkConnectorSource private constructor(builder: Builder) {
/**
* Additional connection options for the connector.
*/
public val additionalOptions: Map? = 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 type of connection, such as marketplace.spark or custom.spark, designating a connection to an Apache Spark 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 data schema for the custom spark source.
*/
public val outputSchemas: List? = builder.outputSchemas
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.SparkConnectorSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SparkConnectorSource(")
append("additionalOptions=$additionalOptions,")
append("connectionName=$connectionName,")
append("connectionType=$connectionType,")
append("connectorName=$connectorName,")
append("name=$name,")
append("outputSchemas=$outputSchemas")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = additionalOptions?.hashCode() ?: 0
result = 31 * result + (connectionName.hashCode())
result = 31 * result + (connectionType.hashCode())
result = 31 * result + (connectorName.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 SparkConnectorSource
if (additionalOptions != other.additionalOptions) return false
if (connectionName != other.connectionName) 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
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.SparkConnectorSource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Additional connection options for the connector.
*/
public var additionalOptions: Map? = null
/**
* The name of the connection that is associated with the connector.
*/
public var connectionName: kotlin.String? = null
/**
* The type of connection, such as marketplace.spark or custom.spark, designating a connection to an Apache Spark 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 data schema for the custom spark source.
*/
public var outputSchemas: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.SparkConnectorSource) : this() {
this.additionalOptions = x.additionalOptions
this.connectionName = x.connectionName
this.connectionType = x.connectionType
this.connectorName = x.connectorName
this.name = x.name
this.outputSchemas = x.outputSchemas
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.SparkConnectorSource = SparkConnectorSource(this)
internal fun correctErrors(): Builder {
if (connectionName == null) connectionName = ""
if (connectionType == null) connectionType = ""
if (connectorName == null) connectorName = ""
if (name == null) name = ""
return this
}
}
}