
commonMain.aws.sdk.kotlin.services.dynamodb.model.Get.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dynamodb.model
/**
* Specifies an item and related attribute values to retrieve in a `TransactGetItem` object.
*/
public class Get private constructor(builder: Builder) {
/**
* One or more substitution tokens for attribute names in the ProjectionExpression parameter.
*/
public val expressionAttributeNames: Map? = builder.expressionAttributeNames
/**
* A map of attribute names to `AttributeValue` objects that specifies the primary key of the item to retrieve.
*/
public val key: Map = requireNotNull(builder.key) { "A non-null value must be provided for key" }
/**
* A string that identifies one or more attributes of the specified item to retrieve from the table. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes of the specified item are returned. If any of the requested attributes are not found, they do not appear in the result.
*/
public val projectionExpression: kotlin.String? = builder.projectionExpression
/**
* The name of the table from which to retrieve the specified item.
*/
public val tableName: kotlin.String = requireNotNull(builder.tableName) { "A non-null value must be provided for tableName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dynamodb.model.Get = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Get(")
append("expressionAttributeNames=$expressionAttributeNames,")
append("key=$key,")
append("projectionExpression=$projectionExpression,")
append("tableName=$tableName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = expressionAttributeNames?.hashCode() ?: 0
result = 31 * result + (key.hashCode())
result = 31 * result + (projectionExpression?.hashCode() ?: 0)
result = 31 * result + (tableName.hashCode())
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 Get
if (expressionAttributeNames != other.expressionAttributeNames) return false
if (key != other.key) return false
if (projectionExpression != other.projectionExpression) return false
if (tableName != other.tableName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dynamodb.model.Get = Builder(this).apply(block).build()
public class Builder {
/**
* One or more substitution tokens for attribute names in the ProjectionExpression parameter.
*/
public var expressionAttributeNames: Map? = null
/**
* A map of attribute names to `AttributeValue` objects that specifies the primary key of the item to retrieve.
*/
public var key: Map? = null
/**
* A string that identifies one or more attributes of the specified item to retrieve from the table. The attributes in the expression must be separated by commas. If no attribute names are specified, then all attributes of the specified item are returned. If any of the requested attributes are not found, they do not appear in the result.
*/
public var projectionExpression: kotlin.String? = null
/**
* The name of the table from which to retrieve the specified item.
*/
public var tableName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.Get) : this() {
this.expressionAttributeNames = x.expressionAttributeNames
this.key = x.key
this.projectionExpression = x.projectionExpression
this.tableName = x.tableName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dynamodb.model.Get = Get(this)
internal fun correctErrors(): Builder {
if (key == null) key = emptyMap()
if (tableName == null) tableName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy