/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #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. You can set one, and only one, of the * elements.

Each attribute in an item is a name-value pair. An attribute * can be single-valued or multi-valued set. For example, a book item can have * title and authors attributes. Each book has one title but can have many authors. * The multi-valued attribute is a set; duplicate values are not allowed.

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

A String data type.

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

A String data type.

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

A String data type.

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

A String data type.

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

A String data type.

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

A String data type.

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

A String data type.

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

A String data type.

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

A Number data type.

*/ inline const Aws::String& GetN() const{ return m_n; } /** *

A Number data type.

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

A Number data type.

*/ inline void SetN(const Aws::String& value) { m_nHasBeenSet = true; m_n = value; } /** *

A Number data type.

*/ inline void SetN(Aws::String&& value) { m_nHasBeenSet = true; m_n = std::move(value); } /** *

A Number data type.

*/ inline void SetN(const char* value) { m_nHasBeenSet = true; m_n.assign(value); } /** *

A Number data type.

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

A Number data type.

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

A Number data type.

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

A Binary data type.

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

A Binary data type.

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

A Binary data type.

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

A Binary data type.

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

A Binary data type.

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

A Binary data type.

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

A String Set data type.

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

A String Set data type.

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

A String Set data type.

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

A String Set data type.

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

A String Set data type.

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

A String Set data type.

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

A String Set data type.

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

A String Set data type.

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

A String Set data type.

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

A Number Set data type.

*/ inline const Aws::Vector& GetNS() const{ return m_nS; } /** *

A Number Set data type.

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

A Number Set data type.

*/ inline void SetNS(const Aws::Vector& value) { m_nSHasBeenSet = true; m_nS = value; } /** *

A Number Set data type.

*/ inline void SetNS(Aws::Vector&& value) { m_nSHasBeenSet = true; m_nS = std::move(value); } /** *

A Number Set data type.

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

A Number Set data type.

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

A Number Set data type.

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

A Number Set data type.

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

A Number Set data type.

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

A Binary Set data type.

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

A Binary Set data type.

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

A Binary Set data type.

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

A Binary Set data type.

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

A Binary Set data type.

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

A Binary Set data type.

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

A Binary Set data type.

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

A Binary Set data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A Map data type.

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

A List data type.

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

A List data type.

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

A List data type.

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

A List data type.

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

A List data type.

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

A List data type.

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

A List data type.

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

A List data type.

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

A Null data type.

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

A Null data type.

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

A Null data type.

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

A Null data type.

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

A Boolean data type.

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

A Boolean data type.

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

A Boolean data type.

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

A Boolean data type.

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