AWS SDK for C++  1.9.17
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);
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
Aws::CloudFormation::Model::Tag::SetValue
void SetValue(const Aws::String &value)
Definition: Tag.h:117
Aws::CloudFormation::Model::Tag::operator=
Tag & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::CloudFormation::Model::Tag::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::CloudFormation::Model::Tag::WithKey
Tag & WithKey(const Aws::String &value)
Definition: Tag.h:84
CloudFormation_EXPORTS.h
Aws::CloudFormation::Model::Tag
Definition: Tag.h:34
Aws::CloudFormation::Model::Tag::SetKey
void SetKey(const char *value)
Definition: Tag.h:77
AWSStreamFwd.h
Aws::CloudFormation::Model::Tag::GetValue
const Aws::String & GetValue() const
Definition: Tag.h:105
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::CloudFormation::Model::Tag::SetKey
void SetKey(Aws::String &&value)
Definition: Tag.h:70
Aws::CloudFormation::Model::Tag::ValueHasBeenSet
bool ValueHasBeenSet() const
Definition: Tag.h:111
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::CloudFormation::Model::Tag::Tag
Tag()
Aws::CloudFormation::Model::Tag::SetValue
void SetValue(Aws::String &&value)
Definition: Tag.h:123
Aws::CloudFormation::Model::Tag::SetValue
void SetValue(const char *value)
Definition: Tag.h:129
AWSString.h
Aws::CloudFormation::Model::Tag::WithValue
Tag & WithValue(const char *value)
Definition: Tag.h:147
Aws::CloudFormation::Model::Tag::WithValue
Tag & WithValue(Aws::String &&value)
Definition: Tag.h:141
Aws::CloudFormation::Model::Tag::KeyHasBeenSet
bool KeyHasBeenSet() const
Definition: Tag.h:56
AWS_CLOUDFORMATION_API
#define AWS_CLOUDFORMATION_API
Definition: CloudFormation_EXPORTS.h:28
Aws::CloudFormation::Model::Tag::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws
Definition: AccessManagementClient.h:15
Aws::CloudFormation::Model::Tag::WithKey
Tag & WithKey(const char *value)
Definition: Tag.h:98
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::CloudFormation::Model::Tag::Tag
Tag(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::CloudFormation::Model::Tag::SetKey
void SetKey(const Aws::String &value)
Definition: Tag.h:63
index
int index
Definition: cJSON.h:171
Aws::CloudFormation::Model::Tag::GetKey
const Aws::String & GetKey() const
Definition: Tag.h:49
Aws::CloudFormation::Model::Tag::WithValue
Tag & WithValue(const Aws::String &value)
Definition: Tag.h:135
Aws::CloudFormation::Model::Tag::WithKey
Tag & WithKey(Aws::String &&value)
Definition: Tag.h:91