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

commonMain.aws.sdk.kotlin.services.glue.model.UpdatePartitionRequest.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

public class UpdatePartitionRequest private constructor(builder: Builder) {
    /**
     * The ID of the Data Catalog where the partition to be updated resides. If none is provided, the Amazon Web Services account ID is used by default.
     */
    public val catalogId: kotlin.String? = builder.catalogId
    /**
     * The name of the catalog database in which the table in question resides.
     */
    public val databaseName: kotlin.String? = builder.databaseName
    /**
     * The new partition object to update the partition to.
     *
     * The `Values` property can't be changed. If you want to change the partition key values for a partition, delete and recreate the partition.
     */
    public val partitionInput: aws.sdk.kotlin.services.glue.model.PartitionInput? = builder.partitionInput
    /**
     * List of partition key values that define the partition to update.
     */
    public val partitionValueList: List? = builder.partitionValueList
    /**
     * The name of the table in which the partition to be updated is located.
     */
    public val tableName: kotlin.String? = builder.tableName

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

    override fun toString(): kotlin.String = buildString {
        append("UpdatePartitionRequest(")
        append("catalogId=$catalogId,")
        append("databaseName=$databaseName,")
        append("partitionInput=$partitionInput,")
        append("partitionValueList=$partitionValueList,")
        append("tableName=$tableName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = catalogId?.hashCode() ?: 0
        result = 31 * result + (databaseName?.hashCode() ?: 0)
        result = 31 * result + (partitionInput?.hashCode() ?: 0)
        result = 31 * result + (partitionValueList?.hashCode() ?: 0)
        result = 31 * result + (tableName?.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 UpdatePartitionRequest

        if (catalogId != other.catalogId) return false
        if (databaseName != other.databaseName) return false
        if (partitionInput != other.partitionInput) return false
        if (partitionValueList != other.partitionValueList) return false
        if (tableName != other.tableName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the Data Catalog where the partition to be updated resides. If none is provided, the Amazon Web Services account ID is used by default.
         */
        public var catalogId: kotlin.String? = null
        /**
         * The name of the catalog database in which the table in question resides.
         */
        public var databaseName: kotlin.String? = null
        /**
         * The new partition object to update the partition to.
         *
         * The `Values` property can't be changed. If you want to change the partition key values for a partition, delete and recreate the partition.
         */
        public var partitionInput: aws.sdk.kotlin.services.glue.model.PartitionInput? = null
        /**
         * List of partition key values that define the partition to update.
         */
        public var partitionValueList: List? = null
        /**
         * The name of the table in which the partition to be updated is located.
         */
        public var tableName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.UpdatePartitionRequest) : this() {
            this.catalogId = x.catalogId
            this.databaseName = x.databaseName
            this.partitionInput = x.partitionInput
            this.partitionValueList = x.partitionValueList
            this.tableName = x.tableName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.UpdatePartitionRequest = UpdatePartitionRequest(this)

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.PartitionInput] inside the given [block]
         */
        public fun partitionInput(block: aws.sdk.kotlin.services.glue.model.PartitionInput.Builder.() -> kotlin.Unit) {
            this.partitionInput = aws.sdk.kotlin.services.glue.model.PartitionInput.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy