Serializable
, SdkPojo
, 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.
See Also:Nested Class Summary
Nested Classes
static interface
static enum
Method Summary
All MethodsStatic MethodsInstance MethodsConcrete Methods
An attribute of type Binary.
An attribute of type Boolean.
An attribute of type Binary Set.
final boolean
final boolean
Indicates whether some other object is "equal to" this one by SDK fields.
Create an instance of this class withb()
initialized to the given value. Create an instance of this class withbool()
initialized to the given value. Create an instance of this class withbs()
initialized to the given value. Create an instance of this class withl()
initialized to the given value. Create an instance of this class withm()
initialized to the given value. Create an instance of this class withn()
initialized to the given value. Create an instance of this class withns()
initialized to the given value. Create an instance of this class withnul()
initialized to the given value. Create an instance of this class withs()
initialized to the given value. Create an instance of this class withss()
initialized to the given value.final boolean
For responses, this returns true if the service returned a value for the BS property.
final int
final boolean
For responses, this returns true if the service returned a value for the L property.
final boolean
For responses, this returns true if the service returned a value for the M property.
final boolean
For responses, this returns true if the service returned a value for the NS property.
final boolean
For responses, this returns true if the service returned a value for the SS property.
An attribute of type List.
An attribute of type Map.
An attribute of type Number.
An attribute of type Number Set.
An attribute of type Null.
An attribute of type String.
An attribute of type String Set.
Take this object and create a builder that contains all of the current property values of this object.
Returns a string representation of this object.
Retrieve an enum value representing which member of this object is populated.
Method Details
s
An attribute of type String. For example:
Returns: An attribute of type String. For example:"S": "Hello"
"S": "Hello"
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.
Returns: 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.
b
An attribute of type Binary. For example:
Returns: An attribute of type Binary. For example:"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
hasSs
public final boolean hasSs()
For responses, this returns true if the service returned a value for the SS property. This DOES NOT check that the value is non-empty (for which, you should check the
isEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
Returns: An attribute of type String Set. For example:hasSs()
method."SS": ["Giraffe", "Hippo" ,"Zebra"]
hasNs
public final boolean hasNs()
For responses, this returns true if the service returned a value for the NS property. This DOES NOT check that the value is non-empty (for which, you should check the
isEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
Returns: An attribute of type Number Set. For example:hasNs()
method."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.
hasBs
public final boolean hasBs()
For responses, this returns true if the service returned a value for the BS property. This DOES NOT check that the value is non-empty (for which, you should check the
isEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
Returns: An attribute of type Binary Set. For example:hasBs()
method."BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
hasM
public final boolean hasM()
For responses, this returns true if the service returned a value for the M property. This DOES NOT check that the value is non-empty (for which, you should check the
isEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
Returns: An attribute of type Map. For example:hasM()
method."M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
hasL
public final boolean hasL()
For responses, this returns true if the service returned a value for the L property. This DOES NOT check that the value is non-empty (for which, you should check the
isEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.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.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
Returns: An attribute of type List. For example:hasL()
method."L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}]
bool
An attribute of type Boolean. For example:
Returns: An attribute of type Boolean. For example:"BOOL": true
"BOOL": true
nul
An attribute of type Null. For example:
Returns: An attribute of type Null. For example:"NULL": true
"NULL": true
toBuilder
Take this object and create a builder that contains all of the current property values of this object.
Specified by:toBuilder
in interfaceToCopyableBuilder<AttributeValue.Builder,AttributeValue>
Returns: a builder for type Tbuilder
serializableBuilderClass
hashCode
public final int hashCode()
Overrides:hashCode
in classObject
equals
public final boolean equals(Object obj) Overrides:equals
in classObject
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj) Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
Specified by:SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.equalsBySdkFields
in interfaceSdkPojo
Parameters:obj
- the object to be compared with Returns: true if the other object equals to this object by sdk fields, false otherwise.toString
public final String toString()Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
Overrides:toString
in classObject
getValueForField
fromS
Create an instance of this class withs()
initialized to the given value.An attribute of type String. For example:
Parameters:"S": "Hello"
s
- An attribute of type String. For example:"S": "Hello"
fromN
Create an instance of this class withn()
initialized to the given value.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.
Parameters: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.
fromB
Create an instance of this class withb()
initialized to the given value.An attribute of type Binary. For example:
Parameters:"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
b
- An attribute of type Binary. For example:"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
fromSs
Create an instance of this class withss()
initialized to the given value.An attribute of type String Set. For example:
Parameters:"SS": ["Giraffe", "Hippo" ,"Zebra"]
ss
- An attribute of type String Set. For example:"SS": ["Giraffe", "Hippo" ,"Zebra"]
fromNs
Create an instance of this class withns()
initialized to the given value.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.
Parameters: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.
fromBs
Create an instance of this class withbs()
initialized to the given value.An attribute of type Binary Set. For example:
Parameters:"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
bs
- An attribute of type Binary Set. For example:"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
fromM
Create an instance of this class withm()
initialized to the given value.An attribute of type Map. For example:
Parameters:"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
m
- An attribute of type Map. For example:"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
fromL
Create an instance of this class withl()
initialized to the given value.An attribute of type List. For example:
Parameters:"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}]
l
- An attribute of type List. For example:"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}]
fromBool
Create an instance of this class withbool()
initialized to the given value.An attribute of type Boolean. For example:
Parameters:"BOOL": true
bool
- An attribute of type Boolean. For example:"BOOL": true
fromNul
Create an instance of this class withnul()
initialized to the given value.An attribute of type Null. For example:
Parameters:"NULL": true
nul
- An attribute of type Null. For example:"NULL": true
type
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beAttributeValue.Type.UNKNOWN_TO_SDK_VERSION
if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beAttributeValue.Type.UNKNOWN_TO_SDK_VERSION
if zero members are set, andnull
if more than one member is set.sdkFields
Specified by:sdkFields
in interfaceSdkPojo
Returns: List ofSdkField
in this POJO. May be empty list but should never be null.
ncG1vNJzZmirlKB7ornAs6anmaeoe6S7zGihmq6RZK6xtY6lmK2do6l8tLvFra6aqpVkrq6t2ailaJmnqMClt46snKuumZiytHvDsqWapZ%2BZr3C5zp2cpWdxqcGztcGuq56OkaHCpnrHraSl