AWS SDK for C++  0.14.3
AWS SDK for C++
MessageAttributeValue.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/sqs/SQS_EXPORTS.h>
19 #include <aws/core/utils/Array.h>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace SQS
32 {
33 namespace Model
34 {
35 
47  {
48  public:
51  MessageAttributeValue& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
52 
53  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
54  void OutputToStream(Aws::OStream& oStream, const char* location) const;
55 
61  inline const Aws::String& GetStringValue() const{ return m_stringValue; }
62 
68  inline void SetStringValue(const Aws::String& value) { m_stringValueHasBeenSet = true; m_stringValue = value; }
69 
75  inline void SetStringValue(Aws::String&& value) { m_stringValueHasBeenSet = true; m_stringValue = value; }
76 
82  inline void SetStringValue(const char* value) { m_stringValueHasBeenSet = true; m_stringValue.assign(value); }
83 
89  inline MessageAttributeValue& WithStringValue(const Aws::String& value) { SetStringValue(value); return *this;}
90 
96  inline MessageAttributeValue& WithStringValue(Aws::String&& value) { SetStringValue(value); return *this;}
97 
103  inline MessageAttributeValue& WithStringValue(const char* value) { SetStringValue(value); return *this;}
104 
109  inline const Aws::Utils::ByteBuffer& GetBinaryValue() const{ return m_binaryValue; }
110 
115  inline void SetBinaryValue(const Aws::Utils::ByteBuffer& value) { m_binaryValueHasBeenSet = true; m_binaryValue = value; }
116 
121  inline void SetBinaryValue(Aws::Utils::ByteBuffer&& value) { m_binaryValueHasBeenSet = true; m_binaryValue = value; }
122 
127  inline MessageAttributeValue& WithBinaryValue(const Aws::Utils::ByteBuffer& value) { SetBinaryValue(value); return *this;}
128 
133  inline MessageAttributeValue& WithBinaryValue(Aws::Utils::ByteBuffer&& value) { SetBinaryValue(value); return *this;}
134 
138  inline const Aws::Vector<Aws::String>& GetStringListValues() const{ return m_stringListValues; }
139 
143  inline void SetStringListValues(const Aws::Vector<Aws::String>& value) { m_stringListValuesHasBeenSet = true; m_stringListValues = value; }
144 
148  inline void SetStringListValues(Aws::Vector<Aws::String>&& value) { m_stringListValuesHasBeenSet = true; m_stringListValues = value; }
149 
153  inline MessageAttributeValue& WithStringListValues(const Aws::Vector<Aws::String>& value) { SetStringListValues(value); return *this;}
154 
158  inline MessageAttributeValue& WithStringListValues(Aws::Vector<Aws::String>&& value) { SetStringListValues(value); return *this;}
159 
163  inline MessageAttributeValue& AddStringListValues(const Aws::String& value) { m_stringListValuesHasBeenSet = true; m_stringListValues.push_back(value); return *this; }
164 
168  inline MessageAttributeValue& AddStringListValues(Aws::String&& value) { m_stringListValuesHasBeenSet = true; m_stringListValues.push_back(value); return *this; }
169 
173  inline MessageAttributeValue& AddStringListValues(const char* value) { m_stringListValuesHasBeenSet = true; m_stringListValues.push_back(value); return *this; }
174 
178  inline const Aws::Vector<Aws::Utils::ByteBuffer>& GetBinaryListValues() const{ return m_binaryListValues; }
179 
183  inline void SetBinaryListValues(const Aws::Vector<Aws::Utils::ByteBuffer>& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues = value; }
184 
188  inline void SetBinaryListValues(Aws::Vector<Aws::Utils::ByteBuffer>&& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues = value; }
189 
193  inline MessageAttributeValue& WithBinaryListValues(const Aws::Vector<Aws::Utils::ByteBuffer>& value) { SetBinaryListValues(value); return *this;}
194 
198  inline MessageAttributeValue& WithBinaryListValues(Aws::Vector<Aws::Utils::ByteBuffer>&& value) { SetBinaryListValues(value); return *this;}
199 
203  inline MessageAttributeValue& AddBinaryListValues(const Aws::Utils::ByteBuffer& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues.push_back(value); return *this; }
204 
208  inline MessageAttributeValue& AddBinaryListValues(Aws::Utils::ByteBuffer&& value) { m_binaryListValuesHasBeenSet = true; m_binaryListValues.push_back(value); return *this; }
209 
217  inline const Aws::String& GetDataType() const{ return m_dataType; }
218 
226  inline void SetDataType(const Aws::String& value) { m_dataTypeHasBeenSet = true; m_dataType = value; }
227 
235  inline void SetDataType(Aws::String&& value) { m_dataTypeHasBeenSet = true; m_dataType = value; }
236 
244  inline void SetDataType(const char* value) { m_dataTypeHasBeenSet = true; m_dataType.assign(value); }
245 
253  inline MessageAttributeValue& WithDataType(const Aws::String& value) { SetDataType(value); return *this;}
254 
262  inline MessageAttributeValue& WithDataType(Aws::String&& value) { SetDataType(value); return *this;}
263 
271  inline MessageAttributeValue& WithDataType(const char* value) { SetDataType(value); return *this;}
272 
273  private:
274  Aws::String m_stringValue;
275  bool m_stringValueHasBeenSet;
276  Aws::Utils::ByteBuffer m_binaryValue;
277  bool m_binaryValueHasBeenSet;
278  Aws::Vector<Aws::String> m_stringListValues;
279  bool m_stringListValuesHasBeenSet;
280  Aws::Vector<Aws::Utils::ByteBuffer> m_binaryListValues;
281  bool m_binaryListValuesHasBeenSet;
282  Aws::String m_dataType;
283  bool m_dataTypeHasBeenSet;
284  };
285 
286 } // namespace Model
287 } // namespace SQS
288 } // namespace Aws
void SetBinaryListValues(const Aws::Vector< Aws::Utils::ByteBuffer > &value)
MessageAttributeValue & WithStringValue(Aws::String &&value)
void SetDataType(const Aws::String &value)
MessageAttributeValue & WithStringListValues(const Aws::Vector< Aws::String > &value)
MessageAttributeValue & AddStringListValues(Aws::String &&value)
MessageAttributeValue & WithDataType(const Aws::String &value)
MessageAttributeValue & AddStringListValues(const Aws::String &value)
MessageAttributeValue & AddBinaryListValues(Aws::Utils::ByteBuffer &&value)
void SetBinaryListValues(Aws::Vector< Aws::Utils::ByteBuffer > &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
MessageAttributeValue & WithBinaryListValues(Aws::Vector< Aws::Utils::ByteBuffer > &&value)
const Aws::Vector< Aws::Utils::ByteBuffer > & GetBinaryListValues() const
MessageAttributeValue & AddStringListValues(const char *value)
void SetBinaryValue(const Aws::Utils::ByteBuffer &value)
MessageAttributeValue & AddBinaryListValues(const Aws::Utils::ByteBuffer &value)
MessageAttributeValue & WithBinaryValue(const Aws::Utils::ByteBuffer &value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Aws::String & GetStringValue() const
MessageAttributeValue & WithStringListValues(Aws::Vector< Aws::String > &&value)
MessageAttributeValue & WithStringValue(const char *value)
MessageAttributeValue & WithDataType(const char *value)
void SetStringListValues(Aws::Vector< Aws::String > &&value)
MessageAttributeValue & WithBinaryListValues(const Aws::Vector< Aws::Utils::ByteBuffer > &value)
const Aws::Vector< Aws::String > & GetStringListValues() const
const Aws::String & GetDataType() const
MessageAttributeValue & WithStringValue(const Aws::String &value)
const Aws::Utils::ByteBuffer & GetBinaryValue() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetStringListValues(const Aws::Vector< Aws::String > &value)
void SetBinaryValue(Aws::Utils::ByteBuffer &&value)
#define AWS_SQS_API
Definition: SQS_EXPORTS.h:37
MessageAttributeValue & WithBinaryValue(Aws::Utils::ByteBuffer &&value)
MessageAttributeValue & WithDataType(Aws::String &&value)
void SetStringValue(const Aws::String &value)
JSON (JavaScript Object Notation).