AWS SDK for C++  1.9.126
AWS SDK for C++
Tag.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
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 EC2
22 {
23 namespace Model
24 {
25 
32  {
33  public:
34  Tag();
35  Tag(const Aws::Utils::Xml::XmlNode& xmlNode);
37 
38  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39  void OutputToStream(Aws::OStream& oStream, const char* location) const;
40 
41 
47  inline const Aws::String& GetKey() const{ return m_key; }
48 
54  inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
55 
61  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
62 
68  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
69 
75  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
76 
82  inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;}
83 
89  inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
90 
96  inline Tag& WithKey(const char* value) { SetKey(value); return *this;}
97 
98 
103  inline const Aws::String& GetValue() const{ return m_value; }
104 
109  inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
110 
115  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
116 
121  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
122 
127  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
128 
133  inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;}
134 
139  inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
140 
145  inline Tag& WithValue(const char* value) { SetValue(value); return *this;}
146 
147  private:
148 
149  Aws::String m_key;
150  bool m_keyHasBeenSet;
151 
152  Aws::String m_value;
153  bool m_valueHasBeenSet;
154  };
155 
156 } // namespace Model
157 } // namespace EC2
158 } // namespace Aws
Aws::EC2::Model::Tag::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::Tag::Tag
Tag()
Aws::EC2::Model::Tag::SetValue
void SetValue(Aws::String &&value)
Definition: Tag.h:121
Aws::EC2::Model::Tag
Definition: Tag.h:32
Aws::EC2::Model::Tag::Tag
Tag(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::Tag::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::Tag::WithKey
Tag & WithKey(const char *value)
Definition: Tag.h:96
Aws::EC2::Model::Tag::WithValue
Tag & WithValue(Aws::String &&value)
Definition: Tag.h:139
Aws::EC2::Model::Tag::KeyHasBeenSet
bool KeyHasBeenSet() const
Definition: Tag.h:54
Aws::EC2::Model::Tag::GetKey
const Aws::String & GetKey() const
Definition: Tag.h:47
AWSStreamFwd.h
Aws::EC2::Model::Tag::SetKey
void SetKey(const char *value)
Definition: Tag.h:75
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::Tag::SetKey
void SetKey(Aws::String &&value)
Definition: Tag.h:68
Aws::EC2::Model::Tag::SetValue
void SetValue(const char *value)
Definition: Tag.h:127
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::Tag::ValueHasBeenSet
bool ValueHasBeenSet() const
Definition: Tag.h:109
Aws::EC2::Model::Tag::SetValue
void SetValue(const Aws::String &value)
Definition: Tag.h:115
Aws::EC2::Model::Tag::WithKey
Tag & WithKey(Aws::String &&value)
Definition: Tag.h:89
AWSString.h
Aws::EC2::Model::Tag::WithValue
Tag & WithValue(const Aws::String &value)
Definition: Tag.h:133
Aws::EC2::Model::Tag::GetValue
const Aws::String & GetValue() const
Definition: Tag.h:103
Aws::EC2::Model::Tag::WithValue
Tag & WithValue(const char *value)
Definition: Tag.h:145
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::Tag::WithKey
Tag & WithKey(const Aws::String &value)
Definition: Tag.h:82
Aws::EC2::Model::Tag::operator=
Tag & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::Tag::SetKey
void SetKey(const Aws::String &value)
Definition: Tag.h:61
EC2_EXPORTS.h