commonMain.aws.sdk.kotlin.services.glue.model.SparkConnectorTarget.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 that uses an Apache Spark connector.
*/
public class SparkConnectorTarget private constructor(builder: Builder) {
/**
* Additional connection options for the connector.
*/
public val additionalOptions: Map? = builder.additionalOptions
/**
* The name of a connection for an Apache Spark 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 an Apache Spark connector.
*/
public val connectorName: kotlin.String = requireNotNull(builder.connectorName) { "A non-null value must be provided for connectorName" }
/**
* The nodes that are inputs to the data target.
*/
public val inputs: List = requireNotNull(builder.inputs) { "A non-null value must be provided for inputs" }
/**
* The name of the data target.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Specifies the data schema for the custom spark target.
*/
public val outputSchemas: List? = builder.outputSchemas
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.SparkConnectorTarget = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SparkConnectorTarget(")
append("additionalOptions=$additionalOptions,")
append("connectionName=$connectionName,")
append("connectionType=$connectionType,")
append("connectorName=$connectorName,")
append("inputs=$inputs,")
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 + (inputs.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 SparkConnectorTarget
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 (inputs != other.inputs) 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.SparkConnectorTarget = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Additional connection options for the connector.
*/
public var additionalOptions: Map? = null
/**
* The name of a connection for an Apache Spark 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 an Apache Spark connector.
*/
public var connectorName: kotlin.String? = null
/**
* The nodes that are inputs to the data target.
*/
public var inputs: List? = null
/**
* The name of the data target.
*/
public var name: kotlin.String? = null
/**
* Specifies the data schema for the custom spark target.
*/
public var outputSchemas: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.SparkConnectorTarget) : this() {
this.additionalOptions = x.additionalOptions
this.connectionName = x.connectionName
this.connectionType = x.connectionType
this.connectorName = x.connectorName
this.inputs = x.inputs
this.name = x.name
this.outputSchemas = x.outputSchemas
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.SparkConnectorTarget = SparkConnectorTarget(this)
internal fun correctErrors(): Builder {
if (connectionName == null) connectionName = ""
if (connectionType == null) connectionType = ""
if (connectorName == null) connectorName = ""
if (inputs == null) inputs = emptyList()
if (name == null) name = ""
return this
}
}
}