AWS SDK for C++

AWS SDK for C++ Version 1.11.943

Loading...
Searching...
No Matches
SqlValue.h
1
6#pragma once
7#include <aws/context/Context_EXPORTS.h>
8#include <aws/core/utils/Array.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/crt/cbor/Cbor.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Cbor {
17class CborValue;
18} // namespace Cbor
19} // namespace Utils
20namespace Context {
21namespace Model {
22
29class SqlValue {
30 public:
31 AWS_CONTEXT_API SqlValue() = default;
32 AWS_CONTEXT_API SqlValue(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
33 AWS_CONTEXT_API SqlValue& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
34 AWS_CONTEXT_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
35
37
41 inline bool GetNullValue() const { return m_nullValue; }
42 inline bool NullValueHasBeenSet() const { return m_nullValueHasBeenSet; }
43 inline void SetNullValue(bool value) {
44 m_nullValueHasBeenSet = true;
45 m_nullValue = value;
46 }
47 inline SqlValue& WithNullValue(bool value) {
48 SetNullValue(value);
49 return *this;
50 }
52
54
57 inline bool GetBooleanValue() const { return m_booleanValue; }
58 inline bool BooleanValueHasBeenSet() const { return m_booleanValueHasBeenSet; }
59 inline void SetBooleanValue(bool value) {
60 m_booleanValueHasBeenSet = true;
61 m_booleanValue = value;
62 }
63 inline SqlValue& WithBooleanValue(bool value) {
64 SetBooleanValue(value);
65 return *this;
66 }
68
70
73 inline long long GetLongValue() const { return m_longValue; }
74 inline bool LongValueHasBeenSet() const { return m_longValueHasBeenSet; }
75 inline void SetLongValue(long long value) {
76 m_longValueHasBeenSet = true;
77 m_longValue = value;
78 }
79 inline SqlValue& WithLongValue(long long value) {
80 SetLongValue(value);
81 return *this;
82 }
84
86
91 inline double GetDoubleValue() const { return m_doubleValue; }
92 inline bool DoubleValueHasBeenSet() const { return m_doubleValueHasBeenSet; }
93 inline void SetDoubleValue(double value) {
94 m_doubleValueHasBeenSet = true;
95 m_doubleValue = value;
96 }
97 inline SqlValue& WithDoubleValue(double value) {
98 SetDoubleValue(value);
99 return *this;
100 }
102
104
112 inline const Aws::String& GetStringValue() const { return m_stringValue; }
113 inline bool StringValueHasBeenSet() const { return m_stringValueHasBeenSet; }
114 template <typename StringValueT = Aws::String>
115 void SetStringValue(StringValueT&& value) {
116 m_stringValueHasBeenSet = true;
117 m_stringValue = std::forward<StringValueT>(value);
118 }
119 template <typename StringValueT = Aws::String>
120 SqlValue& WithStringValue(StringValueT&& value) {
121 SetStringValue(std::forward<StringValueT>(value));
122 return *this;
123 }
125
127
130 inline const Aws::Utils::ByteBuffer& GetBlobValue() const { return m_blobValue; }
131 inline bool BlobValueHasBeenSet() const { return m_blobValueHasBeenSet; }
132 template <typename BlobValueT = Aws::Utils::ByteBuffer>
133 void SetBlobValue(BlobValueT&& value) {
134 m_blobValueHasBeenSet = true;
135 m_blobValue = std::forward<BlobValueT>(value);
136 }
137 template <typename BlobValueT = Aws::Utils::ByteBuffer>
138 SqlValue& WithBlobValue(BlobValueT&& value) {
139 SetBlobValue(std::forward<BlobValueT>(value));
140 return *this;
141 }
143
145
150 inline const Aws::String& GetJsonValue() const { return m_jsonValue; }
151 inline bool JsonValueHasBeenSet() const { return m_jsonValueHasBeenSet; }
152 template <typename JsonValueT = Aws::String>
153 void SetJsonValue(JsonValueT&& value) {
154 m_jsonValueHasBeenSet = true;
155 m_jsonValue = std::forward<JsonValueT>(value);
156 }
157 template <typename JsonValueT = Aws::String>
158 SqlValue& WithJsonValue(JsonValueT&& value) {
159 SetJsonValue(std::forward<JsonValueT>(value));
160 return *this;
161 }
163 private:
164 bool m_nullValue{false};
165
166 bool m_booleanValue{false};
167
168 long long m_longValue{0};
169
170 double m_doubleValue{0.0};
171
172 Aws::String m_stringValue;
173
174 Aws::Utils::ByteBuffer m_blobValue{};
175
176 Aws::String m_jsonValue;
177 bool m_nullValueHasBeenSet = false;
178 bool m_booleanValueHasBeenSet = false;
179 bool m_longValueHasBeenSet = false;
180 bool m_doubleValueHasBeenSet = false;
181 bool m_stringValueHasBeenSet = false;
182 bool m_blobValueHasBeenSet = false;
183 bool m_jsonValueHasBeenSet = false;
184};
185
186} // namespace Model
187} // namespace Context
188} // namespace Aws
const Aws::String & GetStringValue() const
Definition SqlValue.h:112
const Aws::String & GetJsonValue() const
Definition SqlValue.h:150
SqlValue & WithNullValue(bool value)
Definition SqlValue.h:47
long long GetLongValue() const
Definition SqlValue.h:73
bool BlobValueHasBeenSet() const
Definition SqlValue.h:131
AWS_CONTEXT_API SqlValue & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
SqlValue & WithJsonValue(JsonValueT &&value)
Definition SqlValue.h:158
double GetDoubleValue() const
Definition SqlValue.h:91
void SetLongValue(long long value)
Definition SqlValue.h:75
const Aws::Utils::ByteBuffer & GetBlobValue() const
Definition SqlValue.h:130
SqlValue & WithStringValue(StringValueT &&value)
Definition SqlValue.h:120
bool NullValueHasBeenSet() const
Definition SqlValue.h:42
AWS_CONTEXT_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
bool LongValueHasBeenSet() const
Definition SqlValue.h:74
bool DoubleValueHasBeenSet() const
Definition SqlValue.h:92
bool BooleanValueHasBeenSet() const
Definition SqlValue.h:58
AWS_CONTEXT_API SqlValue()=default
SqlValue & WithBlobValue(BlobValueT &&value)
Definition SqlValue.h:138
void SetNullValue(bool value)
Definition SqlValue.h:43
SqlValue & WithDoubleValue(double value)
Definition SqlValue.h:97
bool StringValueHasBeenSet() const
Definition SqlValue.h:113
void SetDoubleValue(double value)
Definition SqlValue.h:93
AWS_CONTEXT_API SqlValue(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
bool JsonValueHasBeenSet() const
Definition SqlValue.h:151
SqlValue & WithBooleanValue(bool value)
Definition SqlValue.h:63
void SetJsonValue(JsonValueT &&value)
Definition SqlValue.h:153
void SetStringValue(StringValueT &&value)
Definition SqlValue.h:115
SqlValue & WithLongValue(long long value)
Definition SqlValue.h:79
void SetBlobValue(BlobValueT &&value)
Definition SqlValue.h:133
void SetBooleanValue(bool value)
Definition SqlValue.h:59
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String