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/sns/SNS_EXPORTS.h>
19 #include <aws/core/utils/Array.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace SNS
31 {
32 namespace Model
33 {
34 
48  {
49  public:
52  MessageAttributeValue& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
53 
54  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
55  void OutputToStream(Aws::OStream& oStream, const char* location) const;
56 
63  inline const Aws::String& GetDataType() const{ return m_dataType; }
64 
71  inline void SetDataType(const Aws::String& value) { m_dataTypeHasBeenSet = true; m_dataType = value; }
72 
79  inline void SetDataType(Aws::String&& value) { m_dataTypeHasBeenSet = true; m_dataType = value; }
80 
87  inline void SetDataType(const char* value) { m_dataTypeHasBeenSet = true; m_dataType.assign(value); }
88 
95  inline MessageAttributeValue& WithDataType(const Aws::String& value) { SetDataType(value); return *this;}
96 
103  inline MessageAttributeValue& WithDataType(Aws::String&& value) { SetDataType(value); return *this;}
104 
111  inline MessageAttributeValue& WithDataType(const char* value) { SetDataType(value); return *this;}
112 
118  inline const Aws::String& GetStringValue() const{ return m_stringValue; }
119 
125  inline void SetStringValue(const Aws::String& value) { m_stringValueHasBeenSet = true; m_stringValue = value; }
126 
132  inline void SetStringValue(Aws::String&& value) { m_stringValueHasBeenSet = true; m_stringValue = value; }
133 
139  inline void SetStringValue(const char* value) { m_stringValueHasBeenSet = true; m_stringValue.assign(value); }
140 
146  inline MessageAttributeValue& WithStringValue(const Aws::String& value) { SetStringValue(value); return *this;}
147 
153  inline MessageAttributeValue& WithStringValue(Aws::String&& value) { SetStringValue(value); return *this;}
154 
160  inline MessageAttributeValue& WithStringValue(const char* value) { SetStringValue(value); return *this;}
161 
166  inline const Aws::Utils::ByteBuffer& GetBinaryValue() const{ return m_binaryValue; }
167 
172  inline void SetBinaryValue(const Aws::Utils::ByteBuffer& value) { m_binaryValueHasBeenSet = true; m_binaryValue = value; }
173 
178  inline void SetBinaryValue(Aws::Utils::ByteBuffer&& value) { m_binaryValueHasBeenSet = true; m_binaryValue = value; }
179 
184  inline MessageAttributeValue& WithBinaryValue(const Aws::Utils::ByteBuffer& value) { SetBinaryValue(value); return *this;}
185 
190  inline MessageAttributeValue& WithBinaryValue(Aws::Utils::ByteBuffer&& value) { SetBinaryValue(value); return *this;}
191 
192  private:
193  Aws::String m_dataType;
194  bool m_dataTypeHasBeenSet;
195  Aws::String m_stringValue;
196  bool m_stringValueHasBeenSet;
197  Aws::Utils::ByteBuffer m_binaryValue;
198  bool m_binaryValueHasBeenSet;
199  };
200 
201 } // namespace Model
202 } // namespace SNS
203 } // namespace Aws
MessageAttributeValue & WithStringValue(const Aws::String &value)
MessageAttributeValue & WithStringValue(const char *value)
MessageAttributeValue & WithDataType(Aws::String &&value)
void SetStringValue(const Aws::String &value)
MessageAttributeValue & WithDataType(const Aws::String &value)
const Aws::String & GetStringValue() const
MessageAttributeValue & WithStringValue(Aws::String &&value)
void SetBinaryValue(Aws::Utils::ByteBuffer &&value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Aws::String & GetDataType() const
MessageAttributeValue & WithDataType(const char *value)
const Aws::Utils::ByteBuffer & GetBinaryValue() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_SNS_API
Definition: SNS_EXPORTS.h:37
MessageAttributeValue & WithBinaryValue(Aws::Utils::ByteBuffer &&value)
MessageAttributeValue & WithBinaryValue(const Aws::Utils::ByteBuffer &value)
void SetDataType(const Aws::String &value)
JSON (JavaScript Object Notation).
void SetBinaryValue(const Aws::Utils::ByteBuffer &value)