AWS SDK for C++

AWS SDK for C++ Version 1.11.612

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::Utils::ByteBuffer& AccessB() const {
36 static const Aws::Utils::ByteBuffer empty;
37 return empty;
38 }
39
40 virtual const Aws::Vector<Aws::String> GetSS() const { return {}; }
41
42 virtual void AddSItem(const Aws::String& ) { assert(false); }
43
44 virtual const Aws::Vector<Aws::String> GetNS() const { return {}; }
45
46 virtual void AddNItem(const Aws::String& ) { assert(false); }
47
48 virtual const Aws::Vector<Aws::Utils::ByteBuffer> GetBS() const { return {}; }
49
50 virtual void AddBItem(const Aws::Utils::ByteBuffer&) { assert(false); }
51
53
54 virtual void AddMEntry(const Aws::String& , const std::shared_ptr<AttributeValue>& ) { assert(false); }
55
56 virtual const Aws::Vector<std::shared_ptr<AttributeValue>> GetL() const { return {}; }
57
58 virtual void AddLItem(const std::shared_ptr<AttributeValue>& ) { assert(false); }
59
60 virtual bool GetBool() const { return false; }
61
62 virtual bool GetNull() const { return false; }
63
64 virtual bool IsDefault() const = 0;
65
66 virtual bool operator == (const AttributeValueValue& other) const = 0;
67
69
70 virtual ValueType GetType() const = 0;
71};
72
75{
76public:
77 explicit AttributeValueString(const Aws::String& value) : m_s(value) {}
78 explicit AttributeValueString(Aws::Utils::Json::JsonView jsonValue) : m_s(jsonValue.GetString("S")) {}
79 const Aws::String GetS() const override { return m_s; }
80 bool IsDefault() const override { return m_s.empty(); }
81 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_s == other.GetS(); }
83 ValueType GetType() const override { return ValueType::STRING; }
84
85private:
86 Aws::String m_s;
87};
88
91{
92public:
93 explicit AttributeValueNumeric(const Aws::String& value) : m_n(value) {}
94 explicit AttributeValueNumeric(Aws::Utils::Json::JsonView jsonValue) : m_n(jsonValue.GetString("N")) {}
95 const Aws::String GetN() const override { return m_n; }
96 bool IsDefault() const override { return m_n.empty(); }
97 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_n == other.GetN(); };
99 ValueType GetType() const override { return ValueType::NUMBER; }
100
101private:
102 Aws::String m_n;
103};
104
107{
108public:
109 explicit AttributeValueByteBuffer(const Aws::Utils::ByteBuffer& value) : m_b(value) {}
111 const Aws::Utils::ByteBuffer GetB() const override { return m_b; }
112 const Aws::Utils::ByteBuffer& AccessB() const override { return m_b; }
113 bool IsDefault() const override { return m_b.GetLength() == 0; }
114 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_b == other.GetB(); }
116 ValueType GetType() const override { return ValueType::BYTEBUFFER; }
117
118private:
120};
121
124{
125public:
126 explicit AttributeValueStringSet(const Aws::Vector<Aws::String>& value) : m_sS(value) {}
128 const Aws::Vector<Aws::String> GetSS() const override { return m_sS; }
129 void AddSItem(const Aws::String& sItem) override { m_sS.push_back(sItem); }
130 bool IsDefault() const override { return m_sS.empty(); }
131 bool operator == (const AttributeValueValue& other) const override;
133 ValueType GetType() const override { return ValueType::STRING_SET; }
134
135private:
137};
138
141{
142public:
143 explicit AttributeValueNumberSet(const Aws::Vector<Aws::String>& value) : m_nS(value) {}
145 const Aws::Vector<Aws::String> GetNS() const override { return m_nS; }
146 void AddNItem(const Aws::String& nItem) override { m_nS.push_back(nItem); }
147 bool IsDefault() const override { return m_nS.empty(); }
148 bool operator == (const AttributeValueValue& other) const override;
150 ValueType GetType() const override { return ValueType::NUMBER_SET; }
151
152private:
154};
155
158{
159public:
162 const Aws::Vector<Aws::Utils::ByteBuffer> GetBS() const override { return m_bS; }
163 void AddBItem(const Aws::Utils::ByteBuffer& bItem) override { m_bS.push_back(bItem); }
164 bool IsDefault() const override { return m_bS.empty(); }
165 bool operator == (const AttributeValueValue& other) const override;
167 ValueType GetType() const override { return ValueType::BYTEBUFFER_SET; }
168
169private:
171};
172
175{
176public:
177 explicit AttributeValueMap(const Aws::Map<Aws::String, const std::shared_ptr<AttributeValue>>& value) : m_m(value) {}
180 void AddMEntry(const Aws::String& key, const std::shared_ptr<AttributeValue>& value) override;
181 bool IsDefault() const override { return m_m.empty(); }
182 bool operator == (const AttributeValueValue& other) const override;
184 ValueType GetType() const override { return ValueType::ATTRIBUTE_MAP; }
185
186private:
188};
189
192{
193public:
194 explicit AttributeValueList(const Aws::Vector<std::shared_ptr<AttributeValue>>& value) : m_l(value) {}
196 const Aws::Vector<std::shared_ptr<AttributeValue>> GetL() const override { return m_l; }
197 void AddLItem(const std::shared_ptr<AttributeValue>& listItem) override { m_l.push_back(listItem); }
198 bool IsDefault() const override { return m_l.empty(); }
199 bool operator == (const AttributeValueValue& other) const override;
201 ValueType GetType() const override { return ValueType::ATTRIBUTE_LIST; }
202
203private:
205};
206
209{
210public:
211 explicit AttributeValueBool(bool value) : m_bool(value) {}
212 explicit AttributeValueBool(Aws::Utils::Json::JsonView jsonValue) : m_bool(jsonValue.GetBool("BOOL")) {}
213 bool GetBool() const override { return m_bool; }
214 bool IsDefault() const override { return m_bool == false; }
215 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_bool == other.GetBool(); }
217 ValueType GetType() const override { return ValueType::BOOL; }
218
219private:
220 bool m_bool;
221};
222
225{
226public:
227 explicit AttributeValueNull(bool value) : m_null(value) {}
228 explicit AttributeValueNull(Aws::Utils::Json::JsonView jsonValue) : m_null(jsonValue.GetBool("NULL")) {}
229 bool GetNull() const override { return m_null; }
230 bool IsDefault() const override { return m_null == false; }
231 bool operator == (const AttributeValueValue& other) const override { return GetType() == other.GetType() && m_null == other.GetNull(); }
233 ValueType GetType() const override { return ValueType::NULLVALUE; }
234
235private:
236 bool m_null;
237};
238
239} // Model
240} // DynamoDB
241} // 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)
const Aws::Utils::ByteBuffer & AccessB() const override
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::Utils::ByteBuffer & AccessB() 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