@Generated(value="software.amazon.awssdk:codegen") public final class AttributeValue extends Object implements SdkPojo, Serializable, 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 and Description |
---|---|
static interface |
AttributeValue.Builder |
Modifier and Type | Method and Description |
---|---|
SdkBytes |
b()
An attribute of type Binary.
|
Boolean |
bool()
An attribute of type Boolean.
|
List<SdkBytes> |
bs()
An attribute of type Binary Set.
|
static AttributeValue.Builder |
builder() |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj)
Indicates whether some other object is "equal to" this one by SDK fields.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasBs()
Returns true if the BS property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
int |
hashCode() |
boolean |
hasL()
Returns true if the L property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
boolean |
hasM()
Returns true if the M property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
boolean |
hasNs()
Returns true if the NS property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
boolean |
hasSs()
Returns true if the SS property was specified by the sender (it may be empty), or false if the sender did not
specify the value (it will be empty).
|
List<AttributeValue> |
l()
An attribute of type List.
|
Map<String,AttributeValue> |
m()
An attribute of type Map.
|
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.
|
List<SdkField<?>> |
sdkFields() |
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()
Returns a string representation of this object.
|
copy
public final String s()
An attribute of type String. For example:
"S": "Hello"
"S": "Hello"
public final 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 final SdkBytes b()
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public final boolean hasSs()
public final List<String> ss()
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasSs()
to see if a value was sent in this field.
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public final boolean hasNs()
public final 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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasNs()
to see if a value was sent in this field.
"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 final boolean hasBs()
public final List<SdkBytes> bs()
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasBs()
to see if a value was sent in this field.
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public final boolean hasM()
public final Map<String,AttributeValue> m()
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasM()
to see if a value was sent in this field.
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
public final boolean hasL()
public final List<AttributeValue> l()
An attribute of type List. For example:
"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasL()
to see if a value was sent in this field.
"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
public final Boolean bool()
An attribute of type Boolean. For example:
"BOOL": true
"BOOL": true
public final 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 final boolean equalsBySdkFields(Object obj)
SdkPojo
SdkPojo
class,
and is generated based on a service model.
If an SdkPojo
class does not have any inherited fields, equalsBySdkFields
and equals
are essentially the same.
equalsBySdkFields
in interface SdkPojo
obj
- the object to be compared withpublic final String toString()
Copyright © 2021 Amazon Web Services, Inc. All Rights Reserved.