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.
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A structure used to define a table.
*/
public class TableInput private constructor(builder: Builder) {
/**
* A description of the table.
*/
public val description: kotlin.String? = builder.description
/**
* The last time that the table was accessed.
*/
public val lastAccessTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastAccessTime
/**
* The last time that column statistics were computed for this table.
*/
public val lastAnalyzedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastAnalyzedTime
/**
* The table name. For Hive compatibility, this is folded to lowercase when it is stored.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The table owner. Included for Apache Hive compatibility. Not used in the normal course of Glue operations.
*/
public val owner: kotlin.String? = builder.owner
/**
* These key-value pairs define properties associated with the table.
*/
public val parameters: Map? = builder.parameters
/**
* A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
*
* When you create a table used by Amazon Athena, and you do not specify any `partitionKeys`, you must at least set the value of `partitionKeys` to an empty list. For example:
*
* `"PartitionKeys": []`
*/
public val partitionKeys: List? = builder.partitionKeys
/**
* The retention time for this table.
*/
public val retention: kotlin.Int = builder.retention
/**
* A storage descriptor containing information about the physical storage of this table.
*/
public val storageDescriptor: aws.sdk.kotlin.services.glue.model.StorageDescriptor? = builder.storageDescriptor
/**
* The type of this table. Glue will create tables with the `EXTERNAL_TABLE` type. Other services, such as Athena, may create tables with additional table types.
*
* Glue related table types:
*
* ## EXTERNAL_TABLE
* Hive compatible attribute - indicates a non-Hive managed table.
*
* ## GOVERNED
* Used by Lake Formation. The Glue Data Catalog understands `GOVERNED`.
*/
public val tableType: kotlin.String? = builder.tableType
/**
* A `TableIdentifier` structure that describes a target table for resource linking.
*/
public val targetTable: aws.sdk.kotlin.services.glue.model.TableIdentifier? = builder.targetTable
/**
* A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.
*/
public val viewDefinition: aws.sdk.kotlin.services.glue.model.ViewDefinitionInput? = builder.viewDefinition
/**
* Included for Apache Hive compatibility. Not used in the normal course of Glue operations.
*/
public val viewExpandedText: kotlin.String? = builder.viewExpandedText
/**
* Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a `VIRTUAL_VIEW`, certain Athena configuration encoded in base64.
*/
public val viewOriginalText: kotlin.String? = builder.viewOriginalText
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TableInput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TableInput(")
append("description=$description,")
append("lastAccessTime=$lastAccessTime,")
append("lastAnalyzedTime=$lastAnalyzedTime,")
append("name=$name,")
append("owner=$owner,")
append("parameters=$parameters,")
append("partitionKeys=$partitionKeys,")
append("retention=$retention,")
append("storageDescriptor=$storageDescriptor,")
append("tableType=$tableType,")
append("targetTable=$targetTable,")
append("viewDefinition=$viewDefinition,")
append("viewExpandedText=$viewExpandedText,")
append("viewOriginalText=$viewOriginalText")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (lastAccessTime?.hashCode() ?: 0)
result = 31 * result + (lastAnalyzedTime?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (owner?.hashCode() ?: 0)
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (partitionKeys?.hashCode() ?: 0)
result = 31 * result + (retention)
result = 31 * result + (storageDescriptor?.hashCode() ?: 0)
result = 31 * result + (tableType?.hashCode() ?: 0)
result = 31 * result + (targetTable?.hashCode() ?: 0)
result = 31 * result + (viewDefinition?.hashCode() ?: 0)
result = 31 * result + (viewExpandedText?.hashCode() ?: 0)
result = 31 * result + (viewOriginalText?.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 TableInput
if (description != other.description) return false
if (lastAccessTime != other.lastAccessTime) return false
if (lastAnalyzedTime != other.lastAnalyzedTime) return false
if (name != other.name) return false
if (owner != other.owner) return false
if (parameters != other.parameters) return false
if (partitionKeys != other.partitionKeys) return false
if (retention != other.retention) return false
if (storageDescriptor != other.storageDescriptor) return false
if (tableType != other.tableType) return false
if (targetTable != other.targetTable) return false
if (viewDefinition != other.viewDefinition) return false
if (viewExpandedText != other.viewExpandedText) return false
if (viewOriginalText != other.viewOriginalText) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TableInput = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description of the table.
*/
public var description: kotlin.String? = null
/**
* The last time that the table was accessed.
*/
public var lastAccessTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The last time that column statistics were computed for this table.
*/
public var lastAnalyzedTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The table name. For Hive compatibility, this is folded to lowercase when it is stored.
*/
public var name: kotlin.String? = null
/**
* The table owner. Included for Apache Hive compatibility. Not used in the normal course of Glue operations.
*/
public var owner: kotlin.String? = null
/**
* These key-value pairs define properties associated with the table.
*/
public var parameters: Map? = null
/**
* A list of columns by which the table is partitioned. Only primitive types are supported as partition keys.
*
* When you create a table used by Amazon Athena, and you do not specify any `partitionKeys`, you must at least set the value of `partitionKeys` to an empty list. For example:
*
* `"PartitionKeys": []`
*/
public var partitionKeys: List? = null
/**
* The retention time for this table.
*/
public var retention: kotlin.Int = 0
/**
* A storage descriptor containing information about the physical storage of this table.
*/
public var storageDescriptor: aws.sdk.kotlin.services.glue.model.StorageDescriptor? = null
/**
* The type of this table. Glue will create tables with the `EXTERNAL_TABLE` type. Other services, such as Athena, may create tables with additional table types.
*
* Glue related table types:
*
* ## EXTERNAL_TABLE
* Hive compatible attribute - indicates a non-Hive managed table.
*
* ## GOVERNED
* Used by Lake Formation. The Glue Data Catalog understands `GOVERNED`.
*/
public var tableType: kotlin.String? = null
/**
* A `TableIdentifier` structure that describes a target table for resource linking.
*/
public var targetTable: aws.sdk.kotlin.services.glue.model.TableIdentifier? = null
/**
* A structure that contains all the information that defines the view, including the dialect or dialects for the view, and the query.
*/
public var viewDefinition: aws.sdk.kotlin.services.glue.model.ViewDefinitionInput? = null
/**
* Included for Apache Hive compatibility. Not used in the normal course of Glue operations.
*/
public var viewExpandedText: kotlin.String? = null
/**
* Included for Apache Hive compatibility. Not used in the normal course of Glue operations. If the table is a `VIRTUAL_VIEW`, certain Athena configuration encoded in base64.
*/
public var viewOriginalText: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TableInput) : this() {
this.description = x.description
this.lastAccessTime = x.lastAccessTime
this.lastAnalyzedTime = x.lastAnalyzedTime
this.name = x.name
this.owner = x.owner
this.parameters = x.parameters
this.partitionKeys = x.partitionKeys
this.retention = x.retention
this.storageDescriptor = x.storageDescriptor
this.tableType = x.tableType
this.targetTable = x.targetTable
this.viewDefinition = x.viewDefinition
this.viewExpandedText = x.viewExpandedText
this.viewOriginalText = x.viewOriginalText
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TableInput = TableInput(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.StorageDescriptor] inside the given [block]
*/
public fun storageDescriptor(block: aws.sdk.kotlin.services.glue.model.StorageDescriptor.Builder.() -> kotlin.Unit) {
this.storageDescriptor = aws.sdk.kotlin.services.glue.model.StorageDescriptor.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.TableIdentifier] inside the given [block]
*/
public fun targetTable(block: aws.sdk.kotlin.services.glue.model.TableIdentifier.Builder.() -> kotlin.Unit) {
this.targetTable = aws.sdk.kotlin.services.glue.model.TableIdentifier.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.ViewDefinitionInput] inside the given [block]
*/
public fun viewDefinition(block: aws.sdk.kotlin.services.glue.model.ViewDefinitionInput.Builder.() -> kotlin.Unit) {
this.viewDefinition = aws.sdk.kotlin.services.glue.model.ViewDefinitionInput.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}