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

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

The newest version!
// 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

/**
 * The structure used to create and update a partition.
 */
public class PartitionInput private constructor(builder: Builder) {
    /**
     * 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 values of the partition. Although this parameter is not required by the SDK, you must specify this parameter for a valid input.
     *
     * The values for the keys for the new partition must be passed as an array of String objects that must be ordered in the same order as the partition keys appearing in the Amazon S3 prefix. Otherwise Glue will add the values to the wrong keys.
     */
    public val values: List? = builder.values

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

    override fun toString(): kotlin.String = buildString {
        append("PartitionInput(")
        append("lastAccessTime=$lastAccessTime,")
        append("lastAnalyzedTime=$lastAnalyzedTime,")
        append("parameters=$parameters,")
        append("storageDescriptor=$storageDescriptor,")
        append("values=$values")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var 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 + (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 PartitionInput

        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 (values != other.values) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * 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 values of the partition. Although this parameter is not required by the SDK, you must specify this parameter for a valid input.
         *
         * The values for the keys for the new partition must be passed as an array of String objects that must be ordered in the same order as the partition keys appearing in the Amazon S3 prefix. Otherwise Glue will add the values to the wrong keys.
         */
        public var values: List? = null

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

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