AttributeValue

sealed class AttributeValue

Represents the data for an attribute.

Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.

For more information, see Data Types in the Amazon DynamoDB Developer Guide.

Inheritors

Types

Link copied to clipboard
data class B(val value: ByteArray) : AttributeValue

An attribute of type Binary. For example:

Link copied to clipboard
data class Bool(val value: Boolean) : AttributeValue

An attribute of type Boolean. For example:

Link copied to clipboard
data class Bs(val value: List<ByteArray>) : AttributeValue

An attribute of type Binary Set. For example:

Link copied to clipboard
data class L(val value: List<AttributeValue>) : AttributeValue

An attribute of type List. For example:

Link copied to clipboard
data class M(val value: Map<String, AttributeValue>) : AttributeValue

An attribute of type Map. For example:

Link copied to clipboard
data class N(val value: String) : AttributeValue

An attribute of type Number. For example:

Link copied to clipboard
data class Ns(val value: List<String>) : AttributeValue

An attribute of type Number Set. For example:

Link copied to clipboard
data class Null(val value: Boolean) : AttributeValue

An attribute of type Null. For example:

Link copied to clipboard
data class S(val value: String) : AttributeValue

An attribute of type String. For example:

Link copied to clipboard
Link copied to clipboard
data class Ss(val value: List<String>) : AttributeValue

An attribute of type String Set. For example:

Functions

Link copied to clipboard
fun asB(): ByteArray

Casts this AttributeValue as a B and retrieves its kotlin.ByteArray value. Throws an exception if the AttributeValue is not a B.

Link copied to clipboard

Casts this AttributeValue as a Bool and retrieves its kotlin.Boolean value. Throws an exception if the AttributeValue is not a Bool.

Link copied to clipboard

Casts this AttributeValue as a Bool and retrieves its kotlin.Boolean value. Returns null if the AttributeValue is not a Bool.

Link copied to clipboard

Casts this AttributeValue as a B and retrieves its kotlin.ByteArray value. Returns null if the AttributeValue is not a B.

Link copied to clipboard

Casts this AttributeValue as a Bs and retrieves its kotlin.collections.List value. Throws an exception if the AttributeValue is not a Bs.

Link copied to clipboard

Casts this AttributeValue as a Bs and retrieves its kotlin.collections.List value. Returns null if the AttributeValue is not a Bs.

Link copied to clipboard

Casts this AttributeValue as a L and retrieves its kotlin.collections.List value. Throws an exception if the AttributeValue is not a L.

Link copied to clipboard

Casts this AttributeValue as a L and retrieves its kotlin.collections.List value. Returns null if the AttributeValue is not a L.

Link copied to clipboard

Casts this AttributeValue as a M and retrieves its kotlin.collections.Map value. Throws an exception if the AttributeValue is not a M.

Link copied to clipboard

Casts this AttributeValue as a M and retrieves its kotlin.collections.Map value. Returns null if the AttributeValue is not a M.

Link copied to clipboard
fun asN(): String

Casts this AttributeValue as a N and retrieves its kotlin.String value. Throws an exception if the AttributeValue is not a N.

Link copied to clipboard

Casts this AttributeValue as a N and retrieves its kotlin.String value. Returns null if the AttributeValue is not a N.

Link copied to clipboard
fun asNs(): List<String>

Casts this AttributeValue as a Ns and retrieves its kotlin.collections.List value. Throws an exception if the AttributeValue is not a Ns.

Link copied to clipboard

Casts this AttributeValue as a Ns and retrieves its kotlin.collections.List value. Returns null if the AttributeValue is not a Ns.

Link copied to clipboard

Casts this AttributeValue as a Null and retrieves its kotlin.Boolean value. Throws an exception if the AttributeValue is not a Null.

Link copied to clipboard

Casts this AttributeValue as a Null and retrieves its kotlin.Boolean value. Returns null if the AttributeValue is not a Null.

Link copied to clipboard
fun asS(): String

Casts this AttributeValue as a S and retrieves its kotlin.String value. Throws an exception if the AttributeValue is not a S.

Link copied to clipboard

Casts this AttributeValue as a S and retrieves its kotlin.String value. Returns null if the AttributeValue is not a S.

Link copied to clipboard
fun asSs(): List<String>

Casts this AttributeValue as a Ss and retrieves its kotlin.collections.List value. Throws an exception if the AttributeValue is not a Ss.

Link copied to clipboard

Casts this AttributeValue as a Ss and retrieves its kotlin.collections.List value. Returns null if the AttributeValue is not a Ss.