StructuredPojo
, ToCopyableBuilder<AttributeValue.Builder,AttributeValue>
@Generated("software.amazon.awssdk:codegen") public class AttributeValue extends Object implements StructuredPojo, ToCopyableBuilder<AttributeValue.Builder,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.
Modifier and Type | Class | Description |
---|---|---|
static interface |
AttributeValue.Builder |
Modifier and Type | Method | Description |
---|---|---|
ByteBuffer |
b() |
An attribute of type Binary.
|
Boolean |
bool() |
An attribute of type Boolean.
|
List<ByteBuffer> |
bs() |
An attribute of type Binary Set.
|
static AttributeValue.Builder |
builder() |
|
boolean |
equals(Object obj) |
|
int |
hashCode() |
|
List<AttributeValue> |
l() |
An attribute of type List.
|
Map<String,AttributeValue> |
m() |
An attribute of type Map.
|
void |
marshall(ProtocolMarshaller protocolMarshaller) |
Marshalls this structured data using the given
ProtocolMarshaller . |
String |
n() |
An attribute of type Number.
|
List<String> |
ns() |
An attribute of type Number Set.
|
Boolean |
nul() |
An attribute of type Null.
|
String |
s() |
An attribute of type String.
|
static Class<? extends AttributeValue.Builder> |
serializableBuilderClass() |
|
List<String> |
ss() |
An attribute of type String Set.
|
AttributeValue.Builder |
toBuilder() |
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
public String s()
An attribute of type String. For example:
"S": "Hello"
"S": "Hello"
public String n()
An attribute of type Number. For example:
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public ByteBuffer b()
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
. Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public List<String> ss()
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public List<String> ns()
An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public List<ByteBuffer> bs()
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public Map<String,AttributeValue> m()
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
public List<AttributeValue> l()
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
"L": ["Cookies", "Coffee", 3.14159]
public Boolean bool()
An attribute of type Boolean. For example:
"BOOL": true
"BOOL": true
public Boolean nul()
An attribute of type Null. For example:
"NULL": true
"NULL": true
public AttributeValue.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<AttributeValue.Builder,AttributeValue>
public static AttributeValue.Builder builder()
public static Class<? extends AttributeValue.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.