AWS SDK for C++  1.8.95
AWS SDK for C++
Tag.h
Go to the documentation of this file.
1 
6 #pragma once
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17  class JsonValue;
18  class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace Lightsail
22 {
23 namespace Model
24 {
25 
35  {
36  public:
37  Tag();
39  Tag& operator=(Aws::Utils::Json::JsonView jsonValue);
40  Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
48  inline const Aws::String& GetKey() const{ return m_key; }
49 
55  inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
56 
62  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
63 
69  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
70 
76  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
77 
83  inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;}
84 
90  inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
91 
97  inline Tag& WithKey(const char* value) { SetKey(value); return *this;}
98 
99 
105  inline const Aws::String& GetValue() const{ return m_value; }
106 
112  inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
113 
119  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
120 
126  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
127 
133  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
134 
140  inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;}
141 
147  inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
148 
154  inline Tag& WithValue(const char* value) { SetValue(value); return *this;}
155 
156  private:
157 
158  Aws::String m_key;
159  bool m_keyHasBeenSet;
160 
161  Aws::String m_value;
162  bool m_valueHasBeenSet;
163  };
164 
165 } // namespace Model
166 } // namespace Lightsail
167 } // namespace Aws
void SetValue(const char *value)
Definition: Tag.h:133
void SetKey(const Aws::String &value)
Definition: Tag.h:62
const Aws::String & GetKey() const
Definition: Tag.h:48
Tag & WithValue(Aws::String &&value)
Definition: Tag.h:147
bool ValueHasBeenSet() const
Definition: Tag.h:112
bool KeyHasBeenSet() const
Definition: Tag.h:55
const Aws::String & GetValue() const
Definition: Tag.h:105
void SetValue(const Aws::String &value)
Definition: Tag.h:119
Tag & WithValue(const Aws::String &value)
Definition: Tag.h:140
Tag & WithKey(const Aws::String &value)
Definition: Tag.h:83
void SetKey(const char *value)
Definition: Tag.h:76
void SetKey(Aws::String &&value)
Definition: Tag.h:69
Tag & WithKey(Aws::String &&value)
Definition: Tag.h:90
void SetValue(Aws::String &&value)
Definition: Tag.h:126
Tag & WithValue(const char *value)
Definition: Tag.h:154
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_LIGHTSAIL_API
Tag & WithKey(const char *value)
Definition: Tag.h:97