AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
AttributeValueValue.h
1
6#pragma once
7
8#include <aws/dynamodb/DynamoDB_EXPORTS.h>
9#include <aws/dynamodb/model/AttributeValue.h>
10
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/core/utils/json/JsonSerializer.h>
14
15#include <cassert>
16
17namespace Aws
18{
19namespace DynamoDB
20{
21namespace Model
22{
23
24class AttributeValue;
25
27{
28public:
29 virtual const Aws::String GetS() const { return {}; }
30
31 virtual const Aws::String GetN() const { return {}; }
32
33 virtual const Aws::Utils::ByteBuffer GetB() const { return {}; }
34
35 virtual const Aws::Vector<Aws::String> GetSS() const { return {}; }
36
37 virtual void AddSItem(const Aws::String& ) { assert(false); }
38
39 virtual const Aws::Vector<Aws::String> GetNS() const { return {}; }
40
41 virtual void AddNItem(const Aws::String& ) { assert(false); }
42
43 virtual const Aws::Vector<Aws::Utils::ByteBuffer> GetBS() const { return {}; }
44
45 virtual void AddBItem(const Aws::Utils::ByteBuffer&) { assert(false); }
46
48
49 virtual void AddMEntry(const Aws::String& , const std::shared_ptr<AttributeValue>& ) { assert(false); }
50
51 virtual const Aws::Vector<std::shared_ptr<AttributeValue>> GetL() const { return {}; }
52
53 virtual void AddLItem(const std::shared_ptr<AttributeValue>& ) { assert(false); }
54
55 virtual bool GetBool() const { return false; }
56
57 virtual bool GetNull() const { return false; }
58
59 virtual bool IsDefault() const = 0;
60
61 virtual bool operator == (const AttributeValueValue& other) const = 0;
62
64
65 virtual ValueType GetType() const = 0;
66};
67
70{
71public:
72 explicit AttributeValueString(const Aws::String& value) : m_s(value) {}
73 explicit AttributeValueString(Aws::Utils::Json::JsonView jsonValue) : m_s(jsonValue.GetString("S")) {}
74 const Aws::String GetS() const override { return m_s; }
75 bool IsDefault() const override { return m_s.empty(); }
76 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_s == other.GetS(); }
78 ValueType GetType() const override { return ValueType::STRING; }
79
80private:
81 Aws::String m_s;
82};
83
86{
87public:
88 explicit AttributeValueNumeric(const Aws::String& value) : m_n(value) {}
89 explicit AttributeValueNumeric(Aws::Utils::Json::JsonView jsonValue) : m_n(jsonValue.GetString("N")) {}
90 const Aws::String GetN() const override { return m_n; }
91 bool IsDefault() const override { return m_n.empty(); }
92 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_n == other.GetN(); };
94 ValueType GetType() const override { return ValueType::NUMBER; }
95
96private:
97 Aws::String m_n;
98};
99
102{
103public:
104 explicit AttributeValueByteBuffer(const Aws::Utils::ByteBuffer& value) : m_b(value) {}
106 const Aws::Utils::ByteBuffer GetB() const override { return m_b; }
107 bool IsDefault() const override { return m_b.GetLength() == 0; }
108 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_b == other.GetB(); }
110 ValueType GetType() const override { return ValueType::BYTEBUFFER; }
111
112private:
114};
115
118{
119public:
120 explicit AttributeValueStringSet(const Aws::Vector<Aws::String>& value) : m_sS(value) {}
122 const Aws::Vector<Aws::String> GetSS() const override { return m_sS; }
123 void AddSItem(const Aws::String& sItem) override { m_sS.push_back(sItem); }
124 bool IsDefault() const override { return m_sS.empty(); }
125 bool operator == (const AttributeValueValue& other) const override;
127 ValueType GetType() const override { return ValueType::STRING_SET; }
128
129private:
131};
132
135{
136public:
137 explicit AttributeValueNumberSet(const Aws::Vector<Aws::String>& value) : m_nS(value) {}
139 const Aws::Vector<Aws::String> GetNS() const override { return m_nS; }
140 void AddNItem(const Aws::String& nItem) override { m_nS.push_back(nItem); }
141 bool IsDefault() const override { return m_nS.empty(); }
142 bool operator == (const AttributeValueValue& other) const override;
144 ValueType GetType() const override { return ValueType::NUMBER_SET; }
145
146private:
148};
149
152{
153public:
156 const Aws::Vector<Aws::Utils::ByteBuffer> GetBS() const override { return m_bS; }
157 void AddBItem(const Aws::Utils::ByteBuffer& bItem) override { m_bS.push_back(bItem); }
158 bool IsDefault() const override { return m_bS.empty(); }
159 bool operator == (const AttributeValueValue& other) const override;
161 ValueType GetType() const override { return ValueType::BYTEBUFFER_SET; }
162
163private:
165};
166
169{
170public:
171 explicit AttributeValueMap(const Aws::Map<Aws::String, const std::shared_ptr<AttributeValue>>& value) : m_m(value) {}
174 void AddMEntry(const Aws::String& key, const std::shared_ptr<AttributeValue>& value) override;
175 bool IsDefault() const override { return m_m.empty(); }
176 bool operator == (const AttributeValueValue& other) const override;
178 ValueType GetType() const override { return ValueType::ATTRIBUTE_MAP; }
179
180private:
182};
183
186{
187public:
188 explicit AttributeValueList(const Aws::Vector<std::shared_ptr<AttributeValue>>& value) : m_l(value) {}
190 const Aws::Vector<std::shared_ptr<AttributeValue>> GetL() const override { return m_l; }
191 void AddLItem(const std::shared_ptr<AttributeValue>& listItem) override { m_l.push_back(listItem); }
192 bool IsDefault() const override { return m_l.empty(); }
193 bool operator == (const AttributeValueValue& other) const override;
195 ValueType GetType() const override { return ValueType::ATTRIBUTE_LIST; }
196
197private:
199};
200
203{
204public:
205 explicit AttributeValueBool(bool value) : m_bool(value) {}
206 explicit AttributeValueBool(Aws::Utils::Json::JsonView jsonValue) : m_bool(jsonValue.GetBool("BOOL")) {}
207 bool GetBool() const override { return m_bool; }
208 bool IsDefault() const override { return m_bool == false; }
209 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_bool == other.GetBool(); }
211 ValueType GetType() const override { return ValueType::BOOL; }
212
213private:
214 bool m_bool;
215};
216
219{
220public:
221 explicit AttributeValueNull(bool value) : m_null(value) {}
222 explicit AttributeValueNull(Aws::Utils::Json::JsonView jsonValue) : m_null(jsonValue.GetBool("NULL")) {}
223 bool GetNull() const override { return m_null; }
224 bool IsDefault() const override { return m_null == false; }
225 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_null == other.GetNull(); }
227 ValueType GetType() const override { return ValueType::NULLVALUE; }
228
229private:
230 bool m_null;
231};
232
233} // Model
234} // DynamoDB
235} // Aws
bool operator==(const AttributeValueValue &other) const override
Aws::Utils::Json::JsonValue Jsonize() const override
AttributeValueBool(Aws::Utils::Json::JsonView jsonValue)
bool operator==(const AttributeValueValue &other) const override
const Aws::Utils::ByteBuffer GetB() const override
AttributeValueByteBuffer(Aws::Utils::Json::JsonView jsonValue)
AttributeValueByteBuffer(const Aws::Utils::ByteBuffer &value)
Aws::Utils::Json::JsonValue Jsonize() const override
void AddBItem(const Aws::Utils::ByteBuffer &bItem) override
AttributeValueByteBufferSet(const Aws::Vector< Aws::Utils::ByteBuffer > &value)
bool operator==(const AttributeValueValue &other) const override
Aws::Utils::Json::JsonValue Jsonize() const override
AttributeValueByteBufferSet(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::Utils::ByteBuffer > GetBS() const override
const Aws::Vector< std::shared_ptr< AttributeValue > > GetL() const override
AttributeValueList(const Aws::Vector< std::shared_ptr< AttributeValue > > &value)
Aws::Utils::Json::JsonValue Jsonize() const override
void AddLItem(const std::shared_ptr< AttributeValue > &listItem) override
bool operator==(const AttributeValueValue &other) const override
AttributeValueList(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue Jsonize() const override
void AddMEntry(const Aws::String &key, const std::shared_ptr< AttributeValue > &value) override
AttributeValueMap(Aws::Utils::Json::JsonView jsonValue)
bool operator==(const AttributeValueValue &other) const override
AttributeValueMap(const Aws::Map< Aws::String, const std::shared_ptr< AttributeValue > > &value)
const Aws::Map< Aws::String, const std::shared_ptr< AttributeValue > > GetM() const override
AttributeValueNull(Aws::Utils::Json::JsonView jsonValue)
bool operator==(const AttributeValueValue &other) const override
Aws::Utils::Json::JsonValue Jsonize() const override
void AddNItem(const Aws::String &nItem) override
bool operator==(const AttributeValueValue &other) const override
const Aws::Vector< Aws::String > GetNS() const override
Aws::Utils::Json::JsonValue Jsonize() const override
AttributeValueNumberSet(const Aws::Vector< Aws::String > &value)
AttributeValueNumberSet(Aws::Utils::Json::JsonView jsonValue)
AttributeValueNumeric(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue Jsonize() const override
bool operator==(const AttributeValueValue &other) const override
const Aws::String GetN() const override
const Aws::String GetS() const override
bool operator==(const AttributeValueValue &other) const override
Aws::Utils::Json::JsonValue Jsonize() const override
AttributeValueString(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue Jsonize() const override
void AddSItem(const Aws::String &sItem) override
bool operator==(const AttributeValueValue &other) const override
AttributeValueStringSet(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > GetSS() const override
AttributeValueStringSet(const Aws::Vector< Aws::String > &value)
virtual void AddSItem(const Aws::String &)
virtual void AddBItem(const Aws::Utils::ByteBuffer &)
virtual void AddMEntry(const Aws::String &, const std::shared_ptr< AttributeValue > &)
virtual Aws::Utils::Json::JsonValue Jsonize() const =0
virtual const Aws::Map< Aws::String, const std::shared_ptr< AttributeValue > > GetM() const
virtual const Aws::Vector< std::shared_ptr< AttributeValue > > GetL() const
virtual const Aws::Vector< Aws::Utils::ByteBuffer > GetBS() const
virtual const Aws::Vector< Aws::String > GetSS() const
virtual bool operator==(const AttributeValueValue &other) const =0
virtual void AddLItem(const std::shared_ptr< AttributeValue > &)
virtual const Aws::String GetS() const
virtual const Aws::Utils::ByteBuffer GetB() const
virtual const Aws::Vector< Aws::String > GetNS() const
virtual const Aws::String GetN() const
virtual ValueType GetType() const =0
virtual void AddNItem(const Aws::String &)
size_t GetLength() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector