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

commonMain.aws.sdk.kotlin.services.dynamodb.model.TransactGetItem.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.dynamodb.model



/**
 * Specifies an item to be retrieved as part of the transaction.
 */
public class TransactGetItem private constructor(builder: Builder) {
    /**
     * Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.
     */
    public val get: aws.sdk.kotlin.services.dynamodb.model.Get? = builder.get

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

    override fun toString(): kotlin.String = buildString {
        append("TransactGetItem(")
        append("get=$get")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = get?.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 TransactGetItem

        if (get != other.get) return false

        return true
    }

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

    public class Builder {
        /**
         * Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.
         */
        public var get: aws.sdk.kotlin.services.dynamodb.model.Get? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.TransactGetItem) : this() {
            this.get = x.get
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy