AWS SDK for C++  0.12.9
AWS SDK for C++
Item.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
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace SimpleDB
32 {
33 namespace Model
34 {
35 
40  {
41  public:
42  Item();
43  Item(const Aws::Utils::Xml::XmlNode& xmlNode);
44  Item& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
52  inline const Aws::String& GetName() const{ return m_name; }
53 
57  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
58 
62  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
63 
67  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
68 
72  inline Item& WithName(const Aws::String& value) { SetName(value); return *this;}
73 
77  inline Item& WithName(Aws::String&& value) { SetName(value); return *this;}
78 
82  inline Item& WithName(const char* value) { SetName(value); return *this;}
83 
87  inline const Aws::String& GetAlternateNameEncoding() const{ return m_alternateNameEncoding; }
88 
92  inline void SetAlternateNameEncoding(const Aws::String& value) { m_alternateNameEncodingHasBeenSet = true; m_alternateNameEncoding = value; }
93 
97  inline void SetAlternateNameEncoding(Aws::String&& value) { m_alternateNameEncodingHasBeenSet = true; m_alternateNameEncoding = value; }
98 
102  inline void SetAlternateNameEncoding(const char* value) { m_alternateNameEncodingHasBeenSet = true; m_alternateNameEncoding.assign(value); }
103 
107  inline Item& WithAlternateNameEncoding(const Aws::String& value) { SetAlternateNameEncoding(value); return *this;}
108 
112  inline Item& WithAlternateNameEncoding(Aws::String&& value) { SetAlternateNameEncoding(value); return *this;}
113 
117  inline Item& WithAlternateNameEncoding(const char* value) { SetAlternateNameEncoding(value); return *this;}
118 
122  inline const Aws::Vector<Attribute>& GetAttributes() const{ return m_attributes; }
123 
127  inline void SetAttributes(const Aws::Vector<Attribute>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
128 
132  inline void SetAttributes(Aws::Vector<Attribute>&& value) { m_attributesHasBeenSet = true; m_attributes = value; }
133 
137  inline Item& WithAttributes(const Aws::Vector<Attribute>& value) { SetAttributes(value); return *this;}
138 
142  inline Item& WithAttributes(Aws::Vector<Attribute>&& value) { SetAttributes(value); return *this;}
143 
147  inline Item& AddAttributes(const Attribute& value) { m_attributesHasBeenSet = true; m_attributes.push_back(value); return *this; }
148 
152  inline Item& AddAttributes(Attribute&& value) { m_attributesHasBeenSet = true; m_attributes.push_back(value); return *this; }
153 
154  private:
155  Aws::String m_name;
156  bool m_nameHasBeenSet;
157  Aws::String m_alternateNameEncoding;
158  bool m_alternateNameEncodingHasBeenSet;
159  Aws::Vector<Attribute> m_attributes;
160  bool m_attributesHasBeenSet;
161  };
162 
163 } // namespace Model
164 } // namespace SimpleDB
165 } // namespace Aws
Item & WithAttributes(const Aws::Vector< Attribute > &value)
Definition: Item.h:137
Item & WithName(const char *value)
Definition: Item.h:82
Item & WithAlternateNameEncoding(Aws::String &&value)
Definition: Item.h:112
void SetAttributes(const Aws::Vector< Attribute > &value)
Definition: Item.h:127
Item & AddAttributes(const Attribute &value)
Definition: Item.h:147
void SetAlternateNameEncoding(Aws::String &&value)
Definition: Item.h:97
void SetAlternateNameEncoding(const Aws::String &value)
Definition: Item.h:92
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::Vector< Attribute > & GetAttributes() const
Definition: Item.h:122
Item & WithAlternateNameEncoding(const Aws::String &value)
Definition: Item.h:107
void SetAlternateNameEncoding(const char *value)
Definition: Item.h:102
Item & WithAlternateNameEncoding(const char *value)
Definition: Item.h:117
void SetName(const Aws::String &value)
Definition: Item.h:57
void SetAttributes(Aws::Vector< Attribute > &&value)
Definition: Item.h:132
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Aws::String & GetAlternateNameEncoding() const
Definition: Item.h:87
#define AWS_SIMPLEDB_API
const Aws::String & GetName() const
Definition: Item.h:52
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Item & WithName(const Aws::String &value)
Definition: Item.h:72
Item & WithAttributes(Aws::Vector< Attribute > &&value)
Definition: Item.h:142
Item & WithName(Aws::String &&value)
Definition: Item.h:77
void SetName(Aws::String &&value)
Definition: Item.h:62
void SetName(const char *value)
Definition: Item.h:67
Item & AddAttributes(Attribute &&value)
Definition: Item.h:152
JSON (JavaScript Object Notation).