1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/rds-data/RDSDataService_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/core/utils/Array.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <aws/rds-data/model/Value.h> 12 #include <utility> 13 #include <memory> 14 15 namespace Aws 16 { 17 namespace Utils 18 { 19 namespace Json 20 { 21 class JsonValue; 22 class JsonView; 23 } // namespace Json 24 } // namespace Utils 25 namespace RDSDataService 26 { 27 namespace Model 28 { 29 class StructValue; 30 31 /** 32 * <p>Contains the value of a column.</p> <pre><code> <important> 33 * <p>This data type is deprecated.</p> </important> 34 * </code></pre><p><h3>See Also:</h3> <a 35 * href="http://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/Value">AWS API 36 * Reference</a></p> 37 */ 38 class AWS_RDSDATASERVICE_API Value 39 { 40 public: 41 Value(); 42 Value(Aws::Utils::Json::JsonView jsonValue); 43 Value& operator=(Aws::Utils::Json::JsonView jsonValue); 44 Aws::Utils::Json::JsonValue Jsonize() const; 45 46 47 /** 48 * <p>An array of column values.</p> 49 */ GetArrayValues()50 inline const Aws::Vector<Value>& GetArrayValues() const{ return m_arrayValues; } 51 52 /** 53 * <p>An array of column values.</p> 54 */ ArrayValuesHasBeenSet()55 inline bool ArrayValuesHasBeenSet() const { return m_arrayValuesHasBeenSet; } 56 57 /** 58 * <p>An array of column values.</p> 59 */ SetArrayValues(const Aws::Vector<Value> & value)60 inline void SetArrayValues(const Aws::Vector<Value>& value) { m_arrayValuesHasBeenSet = true; m_arrayValues = value; } 61 62 /** 63 * <p>An array of column values.</p> 64 */ SetArrayValues(Aws::Vector<Value> && value)65 inline void SetArrayValues(Aws::Vector<Value>&& value) { m_arrayValuesHasBeenSet = true; m_arrayValues = std::move(value); } 66 67 /** 68 * <p>An array of column values.</p> 69 */ WithArrayValues(const Aws::Vector<Value> & value)70 inline Value& WithArrayValues(const Aws::Vector<Value>& value) { SetArrayValues(value); return *this;} 71 72 /** 73 * <p>An array of column values.</p> 74 */ WithArrayValues(Aws::Vector<Value> && value)75 inline Value& WithArrayValues(Aws::Vector<Value>&& value) { SetArrayValues(std::move(value)); return *this;} 76 77 /** 78 * <p>An array of column values.</p> 79 */ AddArrayValues(const Value & value)80 inline Value& AddArrayValues(const Value& value) { m_arrayValuesHasBeenSet = true; m_arrayValues.push_back(value); return *this; } 81 82 /** 83 * <p>An array of column values.</p> 84 */ AddArrayValues(Value && value)85 inline Value& AddArrayValues(Value&& value) { m_arrayValuesHasBeenSet = true; m_arrayValues.push_back(std::move(value)); return *this; } 86 87 88 /** 89 * <p>A value for a column of big integer data type.</p> 90 */ GetBigIntValue()91 inline long long GetBigIntValue() const{ return m_bigIntValue; } 92 93 /** 94 * <p>A value for a column of big integer data type.</p> 95 */ BigIntValueHasBeenSet()96 inline bool BigIntValueHasBeenSet() const { return m_bigIntValueHasBeenSet; } 97 98 /** 99 * <p>A value for a column of big integer data type.</p> 100 */ SetBigIntValue(long long value)101 inline void SetBigIntValue(long long value) { m_bigIntValueHasBeenSet = true; m_bigIntValue = value; } 102 103 /** 104 * <p>A value for a column of big integer data type.</p> 105 */ WithBigIntValue(long long value)106 inline Value& WithBigIntValue(long long value) { SetBigIntValue(value); return *this;} 107 108 109 /** 110 * <p>A value for a column of BIT data type.</p> 111 */ GetBitValue()112 inline bool GetBitValue() const{ return m_bitValue; } 113 114 /** 115 * <p>A value for a column of BIT data type.</p> 116 */ BitValueHasBeenSet()117 inline bool BitValueHasBeenSet() const { return m_bitValueHasBeenSet; } 118 119 /** 120 * <p>A value for a column of BIT data type.</p> 121 */ SetBitValue(bool value)122 inline void SetBitValue(bool value) { m_bitValueHasBeenSet = true; m_bitValue = value; } 123 124 /** 125 * <p>A value for a column of BIT data type.</p> 126 */ WithBitValue(bool value)127 inline Value& WithBitValue(bool value) { SetBitValue(value); return *this;} 128 129 130 /** 131 * <p>A value for a column of BLOB data type.</p> 132 */ GetBlobValue()133 inline const Aws::Utils::ByteBuffer& GetBlobValue() const{ return m_blobValue; } 134 135 /** 136 * <p>A value for a column of BLOB data type.</p> 137 */ BlobValueHasBeenSet()138 inline bool BlobValueHasBeenSet() const { return m_blobValueHasBeenSet; } 139 140 /** 141 * <p>A value for a column of BLOB data type.</p> 142 */ SetBlobValue(const Aws::Utils::ByteBuffer & value)143 inline void SetBlobValue(const Aws::Utils::ByteBuffer& value) { m_blobValueHasBeenSet = true; m_blobValue = value; } 144 145 /** 146 * <p>A value for a column of BLOB data type.</p> 147 */ SetBlobValue(Aws::Utils::ByteBuffer && value)148 inline void SetBlobValue(Aws::Utils::ByteBuffer&& value) { m_blobValueHasBeenSet = true; m_blobValue = std::move(value); } 149 150 /** 151 * <p>A value for a column of BLOB data type.</p> 152 */ WithBlobValue(const Aws::Utils::ByteBuffer & value)153 inline Value& WithBlobValue(const Aws::Utils::ByteBuffer& value) { SetBlobValue(value); return *this;} 154 155 /** 156 * <p>A value for a column of BLOB data type.</p> 157 */ WithBlobValue(Aws::Utils::ByteBuffer && value)158 inline Value& WithBlobValue(Aws::Utils::ByteBuffer&& value) { SetBlobValue(std::move(value)); return *this;} 159 160 161 /** 162 * <p>A value for a column of double data type.</p> 163 */ GetDoubleValue()164 inline double GetDoubleValue() const{ return m_doubleValue; } 165 166 /** 167 * <p>A value for a column of double data type.</p> 168 */ DoubleValueHasBeenSet()169 inline bool DoubleValueHasBeenSet() const { return m_doubleValueHasBeenSet; } 170 171 /** 172 * <p>A value for a column of double data type.</p> 173 */ SetDoubleValue(double value)174 inline void SetDoubleValue(double value) { m_doubleValueHasBeenSet = true; m_doubleValue = value; } 175 176 /** 177 * <p>A value for a column of double data type.</p> 178 */ WithDoubleValue(double value)179 inline Value& WithDoubleValue(double value) { SetDoubleValue(value); return *this;} 180 181 182 /** 183 * <p>A value for a column of integer data type.</p> 184 */ GetIntValue()185 inline int GetIntValue() const{ return m_intValue; } 186 187 /** 188 * <p>A value for a column of integer data type.</p> 189 */ IntValueHasBeenSet()190 inline bool IntValueHasBeenSet() const { return m_intValueHasBeenSet; } 191 192 /** 193 * <p>A value for a column of integer data type.</p> 194 */ SetIntValue(int value)195 inline void SetIntValue(int value) { m_intValueHasBeenSet = true; m_intValue = value; } 196 197 /** 198 * <p>A value for a column of integer data type.</p> 199 */ WithIntValue(int value)200 inline Value& WithIntValue(int value) { SetIntValue(value); return *this;} 201 202 203 /** 204 * <p>A NULL value.</p> 205 */ GetIsNull()206 inline bool GetIsNull() const{ return m_isNull; } 207 208 /** 209 * <p>A NULL value.</p> 210 */ IsNullHasBeenSet()211 inline bool IsNullHasBeenSet() const { return m_isNullHasBeenSet; } 212 213 /** 214 * <p>A NULL value.</p> 215 */ SetIsNull(bool value)216 inline void SetIsNull(bool value) { m_isNullHasBeenSet = true; m_isNull = value; } 217 218 /** 219 * <p>A NULL value.</p> 220 */ WithIsNull(bool value)221 inline Value& WithIsNull(bool value) { SetIsNull(value); return *this;} 222 223 224 /** 225 * <p>A value for a column of real data type.</p> 226 */ GetRealValue()227 inline double GetRealValue() const{ return m_realValue; } 228 229 /** 230 * <p>A value for a column of real data type.</p> 231 */ RealValueHasBeenSet()232 inline bool RealValueHasBeenSet() const { return m_realValueHasBeenSet; } 233 234 /** 235 * <p>A value for a column of real data type.</p> 236 */ SetRealValue(double value)237 inline void SetRealValue(double value) { m_realValueHasBeenSet = true; m_realValue = value; } 238 239 /** 240 * <p>A value for a column of real data type.</p> 241 */ WithRealValue(double value)242 inline Value& WithRealValue(double value) { SetRealValue(value); return *this;} 243 244 245 /** 246 * <p>A value for a column of string data type.</p> 247 */ GetStringValue()248 inline const Aws::String& GetStringValue() const{ return m_stringValue; } 249 250 /** 251 * <p>A value for a column of string data type.</p> 252 */ StringValueHasBeenSet()253 inline bool StringValueHasBeenSet() const { return m_stringValueHasBeenSet; } 254 255 /** 256 * <p>A value for a column of string data type.</p> 257 */ SetStringValue(const Aws::String & value)258 inline void SetStringValue(const Aws::String& value) { m_stringValueHasBeenSet = true; m_stringValue = value; } 259 260 /** 261 * <p>A value for a column of string data type.</p> 262 */ SetStringValue(Aws::String && value)263 inline void SetStringValue(Aws::String&& value) { m_stringValueHasBeenSet = true; m_stringValue = std::move(value); } 264 265 /** 266 * <p>A value for a column of string data type.</p> 267 */ SetStringValue(const char * value)268 inline void SetStringValue(const char* value) { m_stringValueHasBeenSet = true; m_stringValue.assign(value); } 269 270 /** 271 * <p>A value for a column of string data type.</p> 272 */ WithStringValue(const Aws::String & value)273 inline Value& WithStringValue(const Aws::String& value) { SetStringValue(value); return *this;} 274 275 /** 276 * <p>A value for a column of string data type.</p> 277 */ WithStringValue(Aws::String && value)278 inline Value& WithStringValue(Aws::String&& value) { SetStringValue(std::move(value)); return *this;} 279 280 /** 281 * <p>A value for a column of string data type.</p> 282 */ WithStringValue(const char * value)283 inline Value& WithStringValue(const char* value) { SetStringValue(value); return *this;} 284 285 286 /** 287 * <p>A value for a column of STRUCT data type.</p> 288 */ 289 const StructValue& GetStructValue() const; 290 291 /** 292 * <p>A value for a column of STRUCT data type.</p> 293 */ 294 bool StructValueHasBeenSet() const; 295 296 /** 297 * <p>A value for a column of STRUCT data type.</p> 298 */ 299 void SetStructValue(const StructValue& value); 300 301 /** 302 * <p>A value for a column of STRUCT data type.</p> 303 */ 304 void SetStructValue(StructValue&& value); 305 306 /** 307 * <p>A value for a column of STRUCT data type.</p> 308 */ 309 Value& WithStructValue(const StructValue& value); 310 311 /** 312 * <p>A value for a column of STRUCT data type.</p> 313 */ 314 Value& WithStructValue(StructValue&& value); 315 316 private: 317 318 Aws::Vector<Value> m_arrayValues; 319 bool m_arrayValuesHasBeenSet; 320 321 long long m_bigIntValue; 322 bool m_bigIntValueHasBeenSet; 323 324 bool m_bitValue; 325 bool m_bitValueHasBeenSet; 326 327 Aws::Utils::ByteBuffer m_blobValue; 328 bool m_blobValueHasBeenSet; 329 330 double m_doubleValue; 331 bool m_doubleValueHasBeenSet; 332 333 int m_intValue; 334 bool m_intValueHasBeenSet; 335 336 bool m_isNull; 337 bool m_isNullHasBeenSet; 338 339 double m_realValue; 340 bool m_realValueHasBeenSet; 341 342 Aws::String m_stringValue; 343 bool m_stringValueHasBeenSet; 344 345 std::shared_ptr<StructValue> m_structValue; 346 bool m_structValueHasBeenSet; 347 }; 348 349 } // namespace Model 350 } // namespace RDSDataService 351 } // namespace Aws 352