Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
commonMain.aws.sdk.kotlin.services.glue.model.SnowflakeNodeData.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
/**
* Specifies configuration for Snowflake nodes in Glue Studio.
*/
public class SnowflakeNodeData private constructor(builder: Builder) {
/**
* Specifies what action to take when writing to a table with preexisting data. Valid values: ` append`, `merge`, `truncate`, `drop`.
*/
public val action: kotlin.String? = builder.action
/**
* Specifies additional options passed to the Snowflake connector. If options are specified elsewhere in this node, this will take precedence.
*/
public val additionalOptions: Map? = builder.additionalOptions
/**
* Specifies whether automatic query pushdown is enabled. If pushdown is enabled, then when a query is run on Spark, if part of the query can be "pushed down" to the Snowflake server, it is pushed down. This improves performance of some queries.
*/
public val autoPushdown: kotlin.Boolean = builder.autoPushdown
/**
* Specifies a Glue Data Catalog Connection to a Snowflake endpoint.
*/
public val connection: aws.sdk.kotlin.services.glue.model.Option? = builder.connection
/**
* Specifies a Snowflake database for your node to use.
*/
public val database: kotlin.String? = builder.database
/**
* Not currently used.
*/
public val iamRole: aws.sdk.kotlin.services.glue.model.Option? = builder.iamRole
/**
* Specifies a merge action. Valid values: `simple`, `custom`. If simple, merge behavior is defined by `MergeWhenMatched` and ` MergeWhenNotMatched`. If custom, defined by `MergeClause`.
*/
public val mergeAction: kotlin.String? = builder.mergeAction
/**
* A SQL statement that specifies a custom merge behavior.
*/
public val mergeClause: kotlin.String? = builder.mergeClause
/**
* Specifies how to resolve records that match preexisting data when merging. Valid values: ` update`, `delete`.
*/
public val mergeWhenMatched: kotlin.String? = builder.mergeWhenMatched
/**
* Specifies how to process records that do not match preexisting data when merging. Valid values: `insert`, `none`.
*/
public val mergeWhenNotMatched: kotlin.String? = builder.mergeWhenNotMatched
/**
* A SQL string run after the Snowflake connector performs its standard actions.
*/
public val postAction: kotlin.String? = builder.postAction
/**
* A SQL string run before the Snowflake connector performs its standard actions.
*/
public val preAction: kotlin.String? = builder.preAction
/**
* A SQL string used to retrieve data with the `query` sourcetype.
*/
public val sampleQuery: kotlin.String? = builder.sampleQuery
/**
* Specifies a Snowflake database schema for your node to use.
*/
public val schema: kotlin.String? = builder.schema
/**
* Specifies the columns combined to identify a record when detecting matches for merges and upserts. A list of structures with `value`, `label` and ` description` keys. Each structure describes a column.
*/
public val selectedColumns: List? = builder.selectedColumns
/**
* Specifies how retrieved data is specified. Valid values: `"table"`, ` "query"`.
*/
public val sourceType: kotlin.String? = builder.sourceType
/**
* The name of a staging table used when performing `merge` or upsert `append` actions. Data is written to this table, then moved to `table` by a generated postaction.
*/
public val stagingTable: kotlin.String? = builder.stagingTable
/**
* Specifies a Snowflake table for your node to use.
*/
public val table: kotlin.String? = builder.table
/**
* Manually defines the target schema for the node. A list of structures with `value` , `label` and `description` keys. Each structure defines a column.
*/
public val tableSchema: List ? = builder.tableSchema
/**
* Not currently used.
*/
public val tempDir: kotlin.String? = builder.tempDir
/**
* Used when Action is `append`. Specifies the resolution behavior when a row already exists. If true, preexisting rows will be updated. If false, those rows will be inserted.
*/
public val upsert: kotlin.Boolean = builder.upsert
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.SnowflakeNodeData = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SnowflakeNodeData(")
append("action=$action,")
append("additionalOptions=$additionalOptions,")
append("autoPushdown=$autoPushdown,")
append("connection=$connection,")
append("database=$database,")
append("iamRole=$iamRole,")
append("mergeAction=$mergeAction,")
append("mergeClause=$mergeClause,")
append("mergeWhenMatched=$mergeWhenMatched,")
append("mergeWhenNotMatched=$mergeWhenNotMatched,")
append("postAction=$postAction,")
append("preAction=$preAction,")
append("sampleQuery=$sampleQuery,")
append("schema=$schema,")
append("selectedColumns=$selectedColumns,")
append("sourceType=$sourceType,")
append("stagingTable=$stagingTable,")
append("table=$table,")
append("tableSchema=$tableSchema,")
append("tempDir=$tempDir,")
append("upsert=$upsert")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (additionalOptions?.hashCode() ?: 0)
result = 31 * result + (autoPushdown.hashCode())
result = 31 * result + (connection?.hashCode() ?: 0)
result = 31 * result + (database?.hashCode() ?: 0)
result = 31 * result + (iamRole?.hashCode() ?: 0)
result = 31 * result + (mergeAction?.hashCode() ?: 0)
result = 31 * result + (mergeClause?.hashCode() ?: 0)
result = 31 * result + (mergeWhenMatched?.hashCode() ?: 0)
result = 31 * result + (mergeWhenNotMatched?.hashCode() ?: 0)
result = 31 * result + (postAction?.hashCode() ?: 0)
result = 31 * result + (preAction?.hashCode() ?: 0)
result = 31 * result + (sampleQuery?.hashCode() ?: 0)
result = 31 * result + (schema?.hashCode() ?: 0)
result = 31 * result + (selectedColumns?.hashCode() ?: 0)
result = 31 * result + (sourceType?.hashCode() ?: 0)
result = 31 * result + (stagingTable?.hashCode() ?: 0)
result = 31 * result + (table?.hashCode() ?: 0)
result = 31 * result + (tableSchema?.hashCode() ?: 0)
result = 31 * result + (tempDir?.hashCode() ?: 0)
result = 31 * result + (upsert.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 SnowflakeNodeData
if (action != other.action) return false
if (additionalOptions != other.additionalOptions) return false
if (autoPushdown != other.autoPushdown) return false
if (connection != other.connection) return false
if (database != other.database) return false
if (iamRole != other.iamRole) return false
if (mergeAction != other.mergeAction) return false
if (mergeClause != other.mergeClause) return false
if (mergeWhenMatched != other.mergeWhenMatched) return false
if (mergeWhenNotMatched != other.mergeWhenNotMatched) return false
if (postAction != other.postAction) return false
if (preAction != other.preAction) return false
if (sampleQuery != other.sampleQuery) return false
if (schema != other.schema) return false
if (selectedColumns != other.selectedColumns) return false
if (sourceType != other.sourceType) return false
if (stagingTable != other.stagingTable) return false
if (table != other.table) return false
if (tableSchema != other.tableSchema) return false
if (tempDir != other.tempDir) return false
if (upsert != other.upsert) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.SnowflakeNodeData = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies what action to take when writing to a table with preexisting data. Valid values: ` append`, `merge`, `truncate`, `drop`.
*/
public var action: kotlin.String? = null
/**
* Specifies additional options passed to the Snowflake connector. If options are specified elsewhere in this node, this will take precedence.
*/
public var additionalOptions: Map? = null
/**
* Specifies whether automatic query pushdown is enabled. If pushdown is enabled, then when a query is run on Spark, if part of the query can be "pushed down" to the Snowflake server, it is pushed down. This improves performance of some queries.
*/
public var autoPushdown: kotlin.Boolean = false
/**
* Specifies a Glue Data Catalog Connection to a Snowflake endpoint.
*/
public var connection: aws.sdk.kotlin.services.glue.model.Option? = null
/**
* Specifies a Snowflake database for your node to use.
*/
public var database: kotlin.String? = null
/**
* Not currently used.
*/
public var iamRole: aws.sdk.kotlin.services.glue.model.Option? = null
/**
* Specifies a merge action. Valid values: `simple`, `custom`. If simple, merge behavior is defined by `MergeWhenMatched` and ` MergeWhenNotMatched`. If custom, defined by `MergeClause`.
*/
public var mergeAction: kotlin.String? = null
/**
* A SQL statement that specifies a custom merge behavior.
*/
public var mergeClause: kotlin.String? = null
/**
* Specifies how to resolve records that match preexisting data when merging. Valid values: ` update`, `delete`.
*/
public var mergeWhenMatched: kotlin.String? = null
/**
* Specifies how to process records that do not match preexisting data when merging. Valid values: `insert`, `none`.
*/
public var mergeWhenNotMatched: kotlin.String? = null
/**
* A SQL string run after the Snowflake connector performs its standard actions.
*/
public var postAction: kotlin.String? = null
/**
* A SQL string run before the Snowflake connector performs its standard actions.
*/
public var preAction: kotlin.String? = null
/**
* A SQL string used to retrieve data with the `query` sourcetype.
*/
public var sampleQuery: kotlin.String? = null
/**
* Specifies a Snowflake database schema for your node to use.
*/
public var schema: kotlin.String? = null
/**
* Specifies the columns combined to identify a record when detecting matches for merges and upserts. A list of structures with `value`, `label` and ` description` keys. Each structure describes a column.
*/
public var selectedColumns: List? = null
/**
* Specifies how retrieved data is specified. Valid values: `"table"`, ` "query"`.
*/
public var sourceType: kotlin.String? = null
/**
* The name of a staging table used when performing `merge` or upsert `append` actions. Data is written to this table, then moved to `table` by a generated postaction.
*/
public var stagingTable: kotlin.String? = null
/**
* Specifies a Snowflake table for your node to use.
*/
public var table: kotlin.String? = null
/**
* Manually defines the target schema for the node. A list of structures with `value` , `label` and `description` keys. Each structure defines a column.
*/
public var tableSchema: List ? = null
/**
* Not currently used.
*/
public var tempDir: kotlin.String? = null
/**
* Used when Action is `append`. Specifies the resolution behavior when a row already exists. If true, preexisting rows will be updated. If false, those rows will be inserted.
*/
public var upsert: kotlin.Boolean = false
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.SnowflakeNodeData) : this() {
this.action = x.action
this.additionalOptions = x.additionalOptions
this.autoPushdown = x.autoPushdown
this.connection = x.connection
this.database = x.database
this.iamRole = x.iamRole
this.mergeAction = x.mergeAction
this.mergeClause = x.mergeClause
this.mergeWhenMatched = x.mergeWhenMatched
this.mergeWhenNotMatched = x.mergeWhenNotMatched
this.postAction = x.postAction
this.preAction = x.preAction
this.sampleQuery = x.sampleQuery
this.schema = x.schema
this.selectedColumns = x.selectedColumns
this.sourceType = x.sourceType
this.stagingTable = x.stagingTable
this.table = x.table
this.tableSchema = x.tableSchema
this.tempDir = x.tempDir
this.upsert = x.upsert
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.SnowflakeNodeData = SnowflakeNodeData(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.Option] inside the given [block]
*/
public fun connection(block: aws.sdk.kotlin.services.glue.model.Option.Builder.() -> kotlin.Unit) {
this.connection = aws.sdk.kotlin.services.glue.model.Option.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.Option] inside the given [block]
*/
public fun iamRole(block: aws.sdk.kotlin.services.glue.model.Option.Builder.() -> kotlin.Unit) {
this.iamRole = aws.sdk.kotlin.services.glue.model.Option.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}