All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.Partition.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Represents a slice of table data.
 */
public class Partition private constructor(builder: Builder) {
    /**
     * The ID of the Data Catalog in which the partition resides.
     */
    public val catalogId: kotlin.String? = builder.catalogId
    /**
     * The time at which the partition was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The name of the catalog database in which to create the partition.
     */
    public val databaseName: kotlin.String? = builder.databaseName
    /**
     * The last time at which the partition was accessed.
     */
    public val lastAccessTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastAccessTime
    /**
     * The last time at which column statistics were computed for this partition.
     */
    public val lastAnalyzedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastAnalyzedTime
    /**
     * These key-value pairs define partition parameters.
     */
    public val parameters: Map? = builder.parameters
    /**
     * Provides information about the physical location where the partition is stored.
     */
    public val storageDescriptor: aws.sdk.kotlin.services.glue.model.StorageDescriptor? = builder.storageDescriptor
    /**
     * The name of the database table in which to create the partition.
     */
    public val tableName: kotlin.String? = builder.tableName
    /**
     * The values of the partition.
     */
    public val values: List? = builder.values

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Partition = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("Partition(")
        append("catalogId=$catalogId,")
        append("creationTime=$creationTime,")
        append("databaseName=$databaseName,")
        append("lastAccessTime=$lastAccessTime,")
        append("lastAnalyzedTime=$lastAnalyzedTime,")
        append("parameters=$parameters,")
        append("storageDescriptor=$storageDescriptor,")
        append("tableName=$tableName,")
        append("values=$values")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = catalogId?.hashCode() ?: 0
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (databaseName?.hashCode() ?: 0)
        result = 31 * result + (lastAccessTime?.hashCode() ?: 0)
        result = 31 * result + (lastAnalyzedTime?.hashCode() ?: 0)
        result = 31 * result + (parameters?.hashCode() ?: 0)
        result = 31 * result + (storageDescriptor?.hashCode() ?: 0)
        result = 31 * result + (tableName?.hashCode() ?: 0)
        result = 31 * result + (values?.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 Partition

        if (catalogId != other.catalogId) return false
        if (creationTime != other.creationTime) return false
        if (databaseName != other.databaseName) return false
        if (lastAccessTime != other.lastAccessTime) return false
        if (lastAnalyzedTime != other.lastAnalyzedTime) return false
        if (parameters != other.parameters) return false
        if (storageDescriptor != other.storageDescriptor) return false
        if (tableName != other.tableName) return false
        if (values != other.values) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Partition = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The ID of the Data Catalog in which the partition resides.
         */
        public var catalogId: kotlin.String? = null
        /**
         * The time at which the partition was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the catalog database in which to create the partition.
         */
        public var databaseName: kotlin.String? = null
        /**
         * The last time at which the partition was accessed.
         */
        public var lastAccessTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The last time at which column statistics were computed for this partition.
         */
        public var lastAnalyzedTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * These key-value pairs define partition parameters.
         */
        public var parameters: Map? = null
        /**
         * Provides information about the physical location where the partition is stored.
         */
        public var storageDescriptor: aws.sdk.kotlin.services.glue.model.StorageDescriptor? = null
        /**
         * The name of the database table in which to create the partition.
         */
        public var tableName: kotlin.String? = null
        /**
         * The values of the partition.
         */
        public var values: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.Partition) : this() {
            this.catalogId = x.catalogId
            this.creationTime = x.creationTime
            this.databaseName = x.databaseName
            this.lastAccessTime = x.lastAccessTime
            this.lastAnalyzedTime = x.lastAnalyzedTime
            this.parameters = x.parameters
            this.storageDescriptor = x.storageDescriptor
            this.tableName = x.tableName
            this.values = x.values
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.Partition = Partition(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)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy