/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace DynamoDBStreams { namespace Model { /** *

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:

AWS * API Reference

*/ class AttributeValue { public: AWS_DYNAMODBSTREAMS_API AttributeValue(); AWS_DYNAMODBSTREAMS_API AttributeValue(Aws::Utils::Json::JsonView jsonValue); AWS_DYNAMODBSTREAMS_API AttributeValue& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_DYNAMODBSTREAMS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline const Aws::String& GetS() const{ return m_s; } /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline bool SHasBeenSet() const { return m_sHasBeenSet; } /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline void SetS(const Aws::String& value) { m_sHasBeenSet = true; m_s = value; } /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline void SetS(Aws::String&& value) { m_sHasBeenSet = true; m_s = std::move(value); } /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline void SetS(const char* value) { m_sHasBeenSet = true; m_s.assign(value); } /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline AttributeValue& WithS(const Aws::String& value) { SetS(value); return *this;} /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline AttributeValue& WithS(Aws::String&& value) { SetS(std::move(value)); return *this;} /** *

An attribute of type String. For example:

"S": "Hello" *

*/ inline AttributeValue& WithS(const char* value) { SetS(value); return *this;} /** *

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.

*/ inline const Aws::String& GetN() const{ return m_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.

*/ inline bool NHasBeenSet() const { return m_nHasBeenSet; } /** *

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.

*/ inline void SetN(const Aws::String& value) { m_nHasBeenSet = true; m_n = 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.

*/ inline void SetN(Aws::String&& value) { m_nHasBeenSet = true; m_n = std::move(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.

*/ inline void SetN(const char* value) { m_nHasBeenSet = true; m_n.assign(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.

*/ inline AttributeValue& WithN(const Aws::String& value) { SetN(value); return *this;} /** *

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.

*/ inline AttributeValue& WithN(Aws::String&& value) { SetN(std::move(value)); return *this;} /** *

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.

*/ inline AttributeValue& WithN(const char* value) { SetN(value); return *this;} /** *

An attribute of type Binary. For example:

"B": * "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

*/ inline const Aws::Utils::ByteBuffer& GetB() const{ return m_b; } /** *

An attribute of type Binary. For example:

"B": * "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

*/ inline bool BHasBeenSet() const { return m_bHasBeenSet; } /** *

An attribute of type Binary. For example:

"B": * "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

*/ inline void SetB(const Aws::Utils::ByteBuffer& value) { m_bHasBeenSet = true; m_b = value; } /** *

An attribute of type Binary. For example:

"B": * "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

*/ inline void SetB(Aws::Utils::ByteBuffer&& value) { m_bHasBeenSet = true; m_b = std::move(value); } /** *

An attribute of type Binary. For example:

"B": * "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

*/ inline AttributeValue& WithB(const Aws::Utils::ByteBuffer& value) { SetB(value); return *this;} /** *

An attribute of type Binary. For example:

"B": * "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"

*/ inline AttributeValue& WithB(Aws::Utils::ByteBuffer&& value) { SetB(std::move(value)); return *this;} /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline const Aws::Vector& GetSS() const{ return m_sS; } /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline bool SSHasBeenSet() const { return m_sSHasBeenSet; } /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline void SetSS(const Aws::Vector& value) { m_sSHasBeenSet = true; m_sS = value; } /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline void SetSS(Aws::Vector&& value) { m_sSHasBeenSet = true; m_sS = std::move(value); } /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline AttributeValue& WithSS(const Aws::Vector& value) { SetSS(value); return *this;} /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline AttributeValue& WithSS(Aws::Vector&& value) { SetSS(std::move(value)); return *this;} /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline AttributeValue& AddSS(const Aws::String& value) { m_sSHasBeenSet = true; m_sS.push_back(value); return *this; } /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline AttributeValue& AddSS(Aws::String&& value) { m_sSHasBeenSet = true; m_sS.push_back(std::move(value)); return *this; } /** *

An attribute of type String Set. For example:

"SS": ["Giraffe", * "Hippo" ,"Zebra"]

*/ inline AttributeValue& AddSS(const char* value) { m_sSHasBeenSet = true; m_sS.push_back(value); return *this; } /** *

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.

*/ inline const Aws::Vector& GetNS() const{ return m_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.

*/ inline bool NSHasBeenSet() const { return m_nSHasBeenSet; } /** *

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.

*/ inline void SetNS(const Aws::Vector& value) { m_nSHasBeenSet = true; m_nS = 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.

*/ inline void SetNS(Aws::Vector&& value) { m_nSHasBeenSet = true; m_nS = std::move(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.

*/ inline AttributeValue& WithNS(const Aws::Vector& value) { SetNS(value); return *this;} /** *

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.

*/ inline AttributeValue& WithNS(Aws::Vector&& value) { SetNS(std::move(value)); return *this;} /** *

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.

*/ inline AttributeValue& AddNS(const Aws::String& value) { m_nSHasBeenSet = true; m_nS.push_back(value); return *this; } /** *

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.

*/ inline AttributeValue& AddNS(Aws::String&& value) { m_nSHasBeenSet = true; m_nS.push_back(std::move(value)); return *this; } /** *

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.

*/ inline AttributeValue& AddNS(const char* value) { m_nSHasBeenSet = true; m_nS.push_back(value); return *this; } /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline const Aws::Vector& GetBS() const{ return m_bS; } /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline bool BSHasBeenSet() const { return m_bSHasBeenSet; } /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline void SetBS(const Aws::Vector& value) { m_bSHasBeenSet = true; m_bS = value; } /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline void SetBS(Aws::Vector&& value) { m_bSHasBeenSet = true; m_bS = std::move(value); } /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline AttributeValue& WithBS(const Aws::Vector& value) { SetBS(value); return *this;} /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline AttributeValue& WithBS(Aws::Vector&& value) { SetBS(std::move(value)); return *this;} /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline AttributeValue& AddBS(const Aws::Utils::ByteBuffer& value) { m_bSHasBeenSet = true; m_bS.push_back(value); return *this; } /** *

An attribute of type Binary Set. For example:

"BS": * ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]

*/ inline AttributeValue& AddBS(Aws::Utils::ByteBuffer&& value) { m_bSHasBeenSet = true; m_bS.push_back(std::move(value)); return *this; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline const Aws::Map& GetM() const{ return m_m; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline bool MHasBeenSet() const { return m_mHasBeenSet; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline void SetM(const Aws::Map& value) { m_mHasBeenSet = true; m_m = value; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline void SetM(Aws::Map&& value) { m_mHasBeenSet = true; m_m = std::move(value); } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& WithM(const Aws::Map& value) { SetM(value); return *this;} /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& WithM(Aws::Map&& value) { SetM(std::move(value)); return *this;} /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& AddM(const Aws::String& key, const AttributeValue& value) { m_mHasBeenSet = true; m_m.emplace(key, value); return *this; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& AddM(Aws::String&& key, const AttributeValue& value) { m_mHasBeenSet = true; m_m.emplace(std::move(key), value); return *this; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& AddM(const Aws::String& key, AttributeValue&& value) { m_mHasBeenSet = true; m_m.emplace(key, std::move(value)); return *this; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& AddM(Aws::String&& key, AttributeValue&& value) { m_mHasBeenSet = true; m_m.emplace(std::move(key), std::move(value)); return *this; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& AddM(const char* key, AttributeValue&& value) { m_mHasBeenSet = true; m_m.emplace(key, std::move(value)); return *this; } /** *

An attribute of type Map. For example:

"M": {"Name": {"S": * "Joe"}, "Age": {"N": "35"}}

*/ inline AttributeValue& AddM(const char* key, const AttributeValue& value) { m_mHasBeenSet = true; m_m.emplace(key, value); return *this; } /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline const Aws::Vector& GetL() const{ return m_l; } /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline bool LHasBeenSet() const { return m_lHasBeenSet; } /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline void SetL(const Aws::Vector& value) { m_lHasBeenSet = true; m_l = value; } /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline void SetL(Aws::Vector&& value) { m_lHasBeenSet = true; m_l = std::move(value); } /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline AttributeValue& WithL(const Aws::Vector& value) { SetL(value); return *this;} /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline AttributeValue& WithL(Aws::Vector&& value) { SetL(std::move(value)); return *this;} /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline AttributeValue& AddL(const AttributeValue& value) { m_lHasBeenSet = true; m_l.push_back(value); return *this; } /** *

An attribute of type List. For example:

"L": [ {"S": "Cookies"} * , {"S": "Coffee"}, {"N": "3.14159"}]

*/ inline AttributeValue& AddL(AttributeValue&& value) { m_lHasBeenSet = true; m_l.push_back(std::move(value)); return *this; } /** *

An attribute of type Null. For example:

"NULL": true *

*/ inline bool GetNULL() const{ return m_nULL; } /** *

An attribute of type Null. For example:

"NULL": true *

*/ inline bool NULLHasBeenSet() const { return m_nULLHasBeenSet; } /** *

An attribute of type Null. For example:

"NULL": true *

*/ inline void SetNULL(bool value) { m_nULLHasBeenSet = true; m_nULL = value; } /** *

An attribute of type Null. For example:

"NULL": true *

*/ inline AttributeValue& WithNULL(bool value) { SetNULL(value); return *this;} /** *

An attribute of type Boolean. For example:

"BOOL": true *

*/ inline bool GetBOOL() const{ return m_bOOL; } /** *

An attribute of type Boolean. For example:

"BOOL": true *

*/ inline bool BOOLHasBeenSet() const { return m_bOOLHasBeenSet; } /** *

An attribute of type Boolean. For example:

"BOOL": true *

*/ inline void SetBOOL(bool value) { m_bOOLHasBeenSet = true; m_bOOL = value; } /** *

An attribute of type Boolean. For example:

"BOOL": true *

*/ inline AttributeValue& WithBOOL(bool value) { SetBOOL(value); return *this;} private: Aws::String m_s; bool m_sHasBeenSet = false; Aws::String m_n; bool m_nHasBeenSet = false; Aws::Utils::ByteBuffer m_b; bool m_bHasBeenSet = false; Aws::Vector m_sS; bool m_sSHasBeenSet = false; Aws::Vector m_nS; bool m_nSHasBeenSet = false; Aws::Vector m_bS; bool m_bSHasBeenSet = false; Aws::Map m_m; bool m_mHasBeenSet = false; Aws::Vector m_l; bool m_lHasBeenSet = false; bool m_nULL; bool m_nULLHasBeenSet = false; bool m_bOOL; bool m_bOOLHasBeenSet = false; }; } // namespace Model } // namespace DynamoDBStreams } // namespace Aws