AWS SDK for C++  1.8.95
AWS SDK for C++
Tag.h
Go to the documentation of this file.
1 
6 #pragma once
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18  class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace CloudFormation
22 {
23 namespace Model
24 {
25 
34  {
35  public:
36  Tag();
37  Tag(const Aws::Utils::Xml::XmlNode& xmlNode);
38  Tag& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39 
40  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41  void OutputToStream(Aws::OStream& oStream, const char* location) const;
42 
43 
49  inline const Aws::String& GetKey() const{ return m_key; }
50 
56  inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
57 
63  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
64 
70  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
71 
77  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
78 
84  inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;}
85 
91  inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
92 
98  inline Tag& WithKey(const char* value) { SetKey(value); return *this;}
99 
100 
105  inline const Aws::String& GetValue() const{ return m_value; }
106 
111  inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
112 
117  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
118 
123  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
124 
129  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
130 
135  inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;}
136 
141  inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
142 
147  inline Tag& WithValue(const char* value) { SetValue(value); return *this;}
148 
149  private:
150 
151  Aws::String m_key;
152  bool m_keyHasBeenSet;
153 
154  Aws::String m_value;
155  bool m_valueHasBeenSet;
156  };
157 
158 } // namespace Model
159 } // namespace CloudFormation
160 } // namespace Aws
bool ValueHasBeenSet() const
Definition: Tag.h:111
Tag & WithKey(const Aws::String &value)
Definition: Tag.h:84
void SetValue(const Aws::String &value)
Definition: Tag.h:117
void SetValue(const char *value)
Definition: Tag.h:129
Tag & WithKey(Aws::String &&value)
Definition: Tag.h:91
int index
Definition: cJSON.h:171
void SetKey(const char *value)
Definition: Tag.h:77
Tag & WithValue(Aws::String &&value)
Definition: Tag.h:141
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
void SetKey(Aws::String &&value)
Definition: Tag.h:70
Tag & WithValue(const Aws::String &value)
Definition: Tag.h:135
bool KeyHasBeenSet() const
Definition: Tag.h:56
const Aws::String & GetValue() const
Definition: Tag.h:105
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Tag & WithKey(const char *value)
Definition: Tag.h:98
#define AWS_CLOUDFORMATION_API
Tag & WithValue(const char *value)
Definition: Tag.h:147
const Aws::String & GetKey() const
Definition: Tag.h:49
void SetValue(Aws::String &&value)
Definition: Tag.h:123
void SetKey(const Aws::String &value)
Definition: Tag.h:63